web2mcp
Turn any website into a standalone MCP server.
README
Web2MCP
Turn any website into a standalone MCP server.
AI Agent Auto-Install: Point your agent to this repo and say "install web2mcp" — it will read this README, detect your MCP client (Kilo/Claude Desktop), and configure itself automatically.
Features
- Discovery - Analyze websites: JSON-LD, API endpoints, HTML forms, headings, links
- OpenAPI Detection - Auto-detect and parse OpenAPI/Swagger specs
- Code Generation - Generate complete MCP server projects from any website
- Credential Management - Encrypted storage for API keys, tokens, cookies, OAuth
- Multi-Protocol - Works with any HTTP API (REST, GraphQL, etc.)
Quick Install (AI Agent)
If you're an AI agent installing this for a user:
# Detect OS and MCP client, then auto-configure
git clone https://github.com/Xzeroone/web2mcp.git /tmp/web2mcp
cd /tmp/web2mcp
# Install Python package
pip install -e .
# Detect MCP client and configure
if [ -f ~/.config/kilo/kilo.jsonc ]; then
# Kilo config - add web2mcp entry
cat >> ~/.config/kilo/kilo.jsonc << 'EOF'
,
"web2mcp": {
"type": "local",
"command": ["python", "-m", "web2mcp"],
"enabled": true
}
EOF
elif [ -f ~/Library/Application\ Support/Claude/claude_desktop_config.json ]; then
# Claude Desktop config
echo '{"mcpServers": {"web2mcp": {"command": "python", "args": ["-m", "web2mcp"]}}}' >> ~/Library/Application\ Support/Claude/claude_desktop_config.json
fi
Manual Install
Prerequisites
- Python 3.10+
- pip
Option 1: pip (No build required)
pip install web2mcp
Option 2: Local Install from Source
git clone https://github.com/Xzeroone/web2mcp.git
cd web2mcp
pip install -e .
Option 3: pip install from git
pip install git+https://github.com/Xzeroone/web2mcp.git
Then configure your MCP client:
Kilo (Recommended)
// ~/.config/kilo/kilo.jsonc
{
"mcp": {
"web2mcp": {
"type": "local",
"command": ["python", "-m", "web2mcp"],
"enabled": true
}
}
}
Claude Desktop
// ~/Library/Application Support/Claude/claude_desktop_config.json
{
"mcpServers": {
"web2mcp": {
"command": "python",
"args": ["-m", "web2mcp"]
}
}
}
Available Tools
| Tool | Description |
|---|---|
web2mcp_discover |
Analyze a website |
web2mcp_request |
Make HTTP requests with auto-injected auth |
web2mcp_auth_store |
Manage credentials (save/load/list/delete) |
web2mcp_auth_oauth |
OAuth 2.0 flow helper |
web2mcp_api_spec |
Parse OpenAPI/Swagger specs |
web2mcp_schema |
Infer JSON schema from endpoints |
web2mcp_sitemap |
Parse sitemap.xml |
web2mcp_forms |
Extract HTML forms |
web2mcp_readme |
Fetch GitHub READMEs |
web2mcp_generate |
Generate a standalone MCP server |
Usage
As an MCP Server (stdio)
web2mcp
# or
python -m web2mcp
Generate an MCP Server for Any Site
# Generate an MCP server for GitHub
web2mcp_generate url=https://api.github.com name=mcp-github
# Generate an MCP server for Stripe
web2mcp_generate url=https://api.stripe.com name=mcp-stripe
# Output to specific directory
web2mcp_generate url=https://api.example.com output_dir=./my-mcps
Store Credentials
# Save API key
web2mcp_auth_store domain=api.github.com action=save headers='{"Authorization": "Bearer ghp_xxx"}'
# Save OAuth token
web2mcp_auth_store domain=api.stripe.com action=save oauth_token=sk_live_xxx oauth_type=Bearer
# List stored credentials
web2mcp_auth_store action=list
How It Works
- Discover - Web2MCP analyzes the target website
- Detect - Looks for OpenAPI specs at standard locations (
/openapi.json,/swagger.json, etc.) - Generate - Creates a complete MCP server project with typed tools per endpoint
- Use - Install, build, and run the generated MCP server
Generated MCP Servers
The generated MCP servers:
- Are standalone Python projects
- Share web2mcp's credential store (auth set up once works everywhere)
- Auto-inject credentials for every request
- Include typed tools for each API endpoint (if OpenAPI spec found)
- Fall back to generic HTTP tools if no spec available
Development
pip install -e ".[dev]"
python -m web2mcp
License
MIT
推荐服务器
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 模型以安全和受控的方式获取实时的网络信息。