
MCP
Serveur de protocole de contexte de modèle (MCP) pour l'intégration de la planche à planaire avec la génération d'images et les capacités de grattage Web.
1
Github Watches
0
Github Forks
1
Github Stars
MCP Server for Windsurf/Roocode
This is a Model Context Protocol (MCP) server that provides image generation and web scraping capabilities for Windsurf.
Features
- Image Generation: Generate images using the Flux Pro model
- Web Scraping: Extract content from webpages using ScrapeGraph
Getting Started
-
Clone and set up the project:
git clone https://github.com/bananabit-dev/mcp.git cd mcp python -m venv .venv source .venv/bin/activate # On Windows: .venv\Scripts\activate pip install -r requirements.txt
-
Set up environment variables:
cp .env.example .env
Then edit
.env
to add your API keys:AIMLAPI_KEY=your_flux_pro_api_key SGAI_API_KEY=your_scrapegraph_api_key
MCP Server Configuration
- Add this configuration to
~/.codeium/windsurf/mcp_config.json
:
{
"mcpServers": {
"bananabit-mcp": {
"command": "/absolute/path/to/your/.venv/bin/python",
"args": ["-m", "app.mcp_server"],
"cwd": "/absolute/path/to/mcp",
"env": {
"PYTHONPATH": "/absolute/path/to/mcp",
"AIMLAPI_KEY": "${env:AIMLAPI_KEY}",
"SGAI_API_KEY": "${env:SGAI_API_KEY}"
}
}
}
}
- In Windsurf, click the hammer icon and "Refresh" to load the MCP server.
Example Usage
Image Generation
Let's create a cozy kawaii living room! Here's an example dialogue with Windsurf:
User: Generate a image of a cozy warm living room in kawaii and anime style.
Assistant: I'll help you generate a cozy warm living room image in kawaii and anime style!
[Generated image saved as cozy_kawaii_living_room.png]
User: Try again with an even more cozy and kawaii living room.
Assistant: I'll enhance the kawaii and cozy elements even more in this new version!
[Generated image saved as super_cozy_kawaii_living_room.png]
The MCP server will generate unique images each time, but they will follow the style and elements specified in the prompts. Try creating your own cozy spaces or other creative images!
Web Scraping
The MCP server provides powerful web scraping capabilities through the ScrapeGraph API. Here are the main features:
-
Content Extraction
# Extract main content from a webpage result = await extract_webpage_content( url="https://example.com" )
-
Markdown Conversion
# Convert webpage to clean markdown result = await markdownify_webpage( url="https://example.com", clean_level="medium" # Options: light, medium, aggressive )
-
Smart Scraping
# Extract specific information using AI result = await scrape_webpage( url="https://example.com" )
Features
- AI-Powered Extraction: Intelligently identifies and extracts main content
- Clean Output: Removes ads, navigation, and other clutter
- Format Options: Get content in raw HTML, markdown, or structured data
- Error Handling: Graceful fallbacks for failed extractions
- Customization: Control cleaning level and output format
Example Use Cases
-
Documentation Generation
# Create local documentation from online sources content = await markdownify_webpage( url="https://docs.example.com/guide", clean_level="medium" ) with open(".docs/guide.md", "w") as f: f.write(content)
-
Content Analysis
# Extract and analyze webpage sentiment content = await extract_webpage_content( url="https://example.com/article" ) sentiment = await analyze_text_sentiment( text=content["text"] )
-
Data Collection
# Extract structured data data = await scrape_webpage( url="https://example.com/products" ) # Process extracted data for item in data["structured_data"]: process_item(item)
Best Practices
-
Rate Limiting
- Respect website rate limits
- Add delays between requests
- Use caching when possible
-
Error Handling
try: content = await extract_webpage_content(url) except Exception as e: # Fall back to simpler extraction content = await markdownify_webpage(url)
-
Content Cleaning
- Start with "medium" clean_level
- Use "aggressive" for very noisy pages
- Use "light" when preserving format is important
-
Output Processing
- Validate extracted content
- Handle empty or partial results
- Process structured data appropriately
License
MIT
相关推荐
I craft unique cereal names, stories, and ridiculously cute Cereal Baby images.
I find academic articles and books for research and literature reviews.
Evaluator for marketplace product descriptions, checks for relevancy and keyword stuffing.
Confidential guide on numerology and astrology, based of GG33 Public information
Emulating Dr. Jordan B. Peterson's style in providing life advice and insights.
Advanced software engineer GPT that excels through nailing the basics.
Your go-to expert in the Rust ecosystem, specializing in precise code interpretation, up-to-date crate version checking, and in-depth source code analysis. I offer accurate, context-aware insights for all your Rust programming questions.
Découvrez la collection la plus complète et la plus à jour de serveurs MCP sur le marché. Ce référentiel sert de centre centralisé, offrant un vaste catalogue de serveurs MCP open-source et propriétaires, avec des fonctionnalités, des liens de documentation et des contributeurs.
L'application tout-en-un desktop et Docker AI avec chiffon intégré, agents AI, constructeur d'agent sans code, compatibilité MCP, etc.
Manipulation basée sur Micropython I2C de l'exposition GPIO de la série MCP, dérivée d'Adafruit_MCP230XX
Plateforme d'automatisation de workflow à code équitable avec des capacités d'IA natives. Combinez le bâtiment visuel avec du code personnalisé, de l'auto-hôte ou du cloud, 400+ intégrations.
🧑🚀 全世界最好的 LLM 资料总结 (数据处理、模型训练、模型部署、 O1 模型、 MCP 、小语言模型、视觉语言模型) | Résumé des meilleures ressources LLM du monde.
Une liste organisée des serveurs de protocole de contexte de modèle (MCP)
Reviews

user_p7FoORMt
mcp has thoroughly impressed me with its seamless integration and robust functionality. As a dedicated user, I appreciate the thoughtfully designed features and the efficient user experience. Well-maintained by bananabit-dev, mcp stands as a testament to excellent software craftsmanship. Highly recommended for anyone seeking a reliable and user-friendly tool! For more details, visit the official GitHub repository: https://github.com/bananabit-dev/mcp.