Crawl4AI MCP 服务器是一个基于 MCP(模型上下文协议)的智能信息获取服务器。它为 AI 助手系统赋予强大的搜索能力,同时具备面向大语言模型优化的网页内容理解功能。通过多引擎搜索与智能内容提取,能助力 AI 系统高效获取并理解互联网信息,且支持以 markdown_with_citations 格式输出,方便大语言模型引用与处理。
本服务器能为 AI 系统提供高效的信息获取与理解能力。你可按以下步骤进行安装与使用。
# 创建虚拟环境并激活
python -m venv env
source env/bin/activate # 在macOS/Linux下
env\Scripts\activate # 在Windows下
# 安装依赖项
pip install -r requirements.txt
# 配置服务器
cp config_demo.json config.json
# 启动服务器
python src/index.py
# 使用smithery CLI安装到Claude Sonnet 3.5
smithery plugin install @weidwonder/crawl4ai-mcp-server --development
search)示例请求:
curl -X POST "http://localhost:8000/api/search" \
-H "Content-Type: application/json" \
-d '{"query":"AI技术发展历史","gl":null,"hl":null}'
输出格式:
read_url)示例请求:
curl -X POST "http://localhost:8000/api/read_url" \
-H "Content-Type: application/json" \
-d '{"url":"https://example.com"}'
crawl4ai_mcp_server/
├── src/
│ ├── index.py # 服务器主实现
│ └── search.py # 搜索功能实现
├── config_demo.json # 配置文件示例
├── pyproject.toml # 项目配置
├── requirements.txt # 依赖列表
└── README.md # 项目文档
复制配置模板:
cp config_demo.json config.json
配置 Google 搜索(可选):
config.json中添加以下内容:{
"google": {
"api_key": "your_google_api_key",
"cse_id": "your_google_cse_id"
}
}
本项目遵循 MIT License 协议。
欢迎提交问题和 Pull Request! GitHub 仓库地址:https://github.com/weidwonder/crawl4ai-mcp-server
感谢所有为项目贡献力量的开发者!
特别鸣谢: