loading…
Search for a command to run...
loading…
A locally-hosted MCP server that provides AI assistants with advanced web crawling capabilities, including structured data extraction, deep site crawling, and p
A locally-hosted MCP server that provides AI assistants with advanced web crawling capabilities, including structured data extraction, deep site crawling, and page screenshots. It enables users to convert single or multiple URLs into clean Markdown content for processing by LLMs without requiring external API keys for basic features.
本地运行的 Crawl4AI MCP Server,为 AI 助手提供强大的网页爬取能力。
# 克隆项目
git clone <your-repo-url>
cd crawl4ai-mcp
# 使用启动脚本(推荐)
chmod +x start.sh
./start.sh
# 或者手动安装
uv sync
uv run crawl4ai-setup
# 复制环境变量示例
cp .env.example .env
# 编辑 .env 文件,添加你的 API keys(用于结构化提取)
# stdio 模式(用于 Claude Code)
uv run crawl4ai-mcp
# HTTP 模式(用于开发调试)
uv run crawl4ai-mcp --transport http --port 8000
claude mcp add crawl4ai uv run --project /path/to/crawl4ai-mcp crawl4ai-mcp
# 1. 启动服务器
uv run crawl4ai-mcp --transport http --port 8000
# 2. 添加到 Claude Code
claude mcp add --transport http crawl4ai http://localhost:8000/mcp
crawl_url(
url="https://example.com",
word_count_threshold=10,
bypass_cache=False,
magic=False
)
crawl_multiple(
urls=["https://example.com/page1", "https://example.com/page2"],
max_concurrent=3,
word_count_threshold=10
)
extract_structured(
url="https://example.com/products",
instruction="提取所有产品名称和价格",
provider="openai/gpt-4o-mini",
api_token="your-api-key"
)
get_screenshot(
url="https://example.com",
full_page=True,
viewport_width=1920,
viewport_height=1080
)
deep_crawl(
url="https://example.com",
max_depth=2,
max_pages=10,
strategy="bfs" # 或 "dfs"
)
# 运行测试
make test
# 代码格式化
make fmt
# 代码检查
make lint
# 类型检查
make typecheck
# 运行所有检查
make check
# LLM API Keys(用于结构化提取)
OPENAI_API_KEY=sk-...
ANTHROPIC_API_KEY=sk-ant-...
# 或使用通用配置
LLM_PROVIDER=openai/gpt-4o-mini
LLM_API_KEY=sk-...
MIT License
欢迎提交 Issue 和 PR!
Добавь это в claude_desktop_config.json и перезапусти Claude Desktop.
{
"mcpServers": {
"crawl4ai-mcp-server": {
"command": "npx",
"args": []
}
}
}