docs-scraper
Enables scraping and searching documentation websites using semantic or keyword search, with support for multiple deployment modes.
README
MCP Documentation Scraper Template
A complete Python template for building Model Context Protocol (MCP) servers with documentation scraping, vector search, and flexible deployment options.
Features
- 🔍 Dual Search Modes: Semantic search (ML-powered) or keyword search (lightweight)
- 🤖 Multi-Provider Embeddings: HuggingFace (local), OpenAI, or Azure OpenAI
- 📚 Web Scraping: Configurable documentation crawler with depth control
- 💾 Vector Storage: ChromaDB with persistent storage
- ⏰ Auto-Updates: Scheduled documentation refresh
- 🔌 Dual Transport: stdio (local MCP) or HTTP/SSE (remote access)
- 🐳 Docker Ready: Containerized deployment with profiles
- ☸️ Kubernetes Ready: Production deployment with autoscaling
Quick Start
Option 1: stdio Mode (Local MCP - Default)
For: VS Code, Claude Desktop integration on your local machine
-
Configure environment:
cp .env.example .env # Edit .env and set your DOCS_URLS # Keep TRANSPORT=stdio (or leave it out, stdio is default) -
Start container:
docker-compose up -dThis starts
mcp-server-templatecontainer (no ports exposed). -
Configure MCP client (VS Code or Claude Desktop):
{ "mcpServers": { "docs-scraper": { "command": "docker", "args": ["exec", "-i", "mcp-server-template", "python", "-m", "mcp_server_template.server"] } } }
Option 2: HTTP Mode (Remote Access)
For: Testing API, remote access, or preparing for Kubernetes deployment
-
Configure environment for HTTP:
cp .env.example .env # Edit .env and set: # TRANSPORT=http # DOCS_URLS=https://your-docs-site.com/ -
Start container with HTTP profile:
docker-compose --profile http up -dThis starts
mcp-server-template-httpcontainer on port 3003. -
Test the server:
# Check health curl http://localhost:3003/health # MCP clients connect to: # http://localhost:3003/sse
Switching Between Modes
Stop current mode:
docker-compose down
Start stdio mode:
docker-compose up -d
Start HTTP mode:
docker-compose --profile http up -d
View logs:
# stdio mode
docker logs mcp-server-template -f
# HTTP mode
docker logs mcp-server-template-http -f
Configuration
Key environment variables (see .env.example for full list):
TRANSPORT: Transport mode -stdio(local MCP) orhttp(remote/Kubernetes)DOCS_URLS: Documentation URLs to scrape (comma-separated for multiple sites)- Single:
DOCS_URLS=https://docs.example.com/ - Multiple:
DOCS_URLS=https://docs.example.com/,https://api.example.com/docs/,https://guides.example.com/
- Single:
SWAGGER_URLS: Swagger/OpenAPI JSON URLs (comma-separated, optional)USE_EMBEDDINGS: Enable semantic search (true) or keyword search (false)EMBEDDING_PROVIDER:huggingface,openai, orazureCRAWL_MAX_DEPTH: Maximum crawl depth (0-3, recommended 2)AUTO_UPDATE_ENABLED: Enable scheduled documentation updates (true/false)HTTP_PORT: Port for HTTP mode (default: 3000, mapped to 3003 on host)
Transport Modes
stdio Mode (Local MCP)
Best for: Local development, VS Code, Claude Desktop
This server uses stdio transport for direct MCP client communication via stdin/stdout pipes.
VS Code (settings.json):
{
"mcp.servers": {
"docs-scraper": {
"command": "docker",
"args": ["exec", "-i", "mcp-server-template", "python", "-m", "mcp_server_template.server"]
}
}
}
Claude Desktop (claude_desktop_config.json):
{
"mcpServers": {
"docs-scraper": {
"command": "docker",
"args": ["exec", "-i", "mcp-server-template", "python", "-m", "mcp_server_template.server"]
}
}
}
HTTP Mode (Remote Access)
Best for: Remote access, multi-user, Kubernetes deployments
Set TRANSPORT=http in .env and use the HTTP profile:
docker-compose --profile http up -d
Endpoints:
GET /health- Health checkGET /sse- MCP Server-Sent Events endpoint
MCP Client Configuration (for remote HTTP clients):
{
"mcpServers": {
"docs-scraper": {
"url": "http://localhost:3003/sse",
"transport": "sse"
}
}
}
Kubernetes Deployment
See k8s-deployment.yaml for production Kubernetes deployment with:
- Horizontal Pod Autoscaling
- Persistent Volume Claims for ChromaDB
- Ingress configuration
- Health checks and readiness probes
Customization
This is a template - fork and customize for your documentation sources:
- Update
DOCS_URLSin.env - Customize scraping in
src/mcp_server_template/documentation_scraper.py - Add custom tools in
src/mcp_server_template/server.py - Adjust chunking and search parameters as needed
Requirements
- Python 3.12+
- Docker & Docker Compose (recommended)
- 500MB+ memory for semantic search (50MB for keyword-only)
推荐服务器
Baidu Map
百度地图核心API现已全面兼容MCP协议,是国内首家兼容MCP协议的地图服务商。
Playwright MCP Server
一个模型上下文协议服务器,它使大型语言模型能够通过结构化的可访问性快照与网页进行交互,而无需视觉模型或屏幕截图。
Magic Component Platform (MCP)
一个由人工智能驱动的工具,可以从自然语言描述生成现代化的用户界面组件,并与流行的集成开发环境(IDE)集成,从而简化用户界面开发流程。
Audiense Insights MCP Server
通过模型上下文协议启用与 Audiense Insights 账户的交互,从而促进营销洞察和受众数据的提取和分析,包括人口统计信息、行为和影响者互动。
VeyraX
一个单一的 MCP 工具,连接你所有喜爱的工具:Gmail、日历以及其他 40 多个工具。
graphlit-mcp-server
模型上下文协议 (MCP) 服务器实现了 MCP 客户端与 Graphlit 服务之间的集成。 除了网络爬取之外,还可以将任何内容(从 Slack 到 Gmail 再到播客订阅源)导入到 Graphlit 项目中,然后从 MCP 客户端检索相关内容。
Kagi MCP Server
一个 MCP 服务器,集成了 Kagi 搜索功能和 Claude AI,使 Claude 能够在回答需要最新信息的问题时执行实时网络搜索。
e2b-mcp-server
使用 MCP 通过 e2b 运行代码。
Neon MCP Server
用于与 Neon 管理 API 和数据库交互的 MCP 服务器
Exa MCP Server
模型上下文协议(MCP)服务器允许像 Claude 这样的 AI 助手使用 Exa AI 搜索 API 进行网络搜索。这种设置允许 AI 模型以安全和受控的方式获取实时的网络信息。