Crawl4ai

Web search and scraping

用于提供给本地开发者的 LLM的高效互联网搜索&内容获取的MCP Server, 节省你的token.

Your AI app calls the Crawl4ai MCP server, which does the web search and scraping work and sends the result back to the chat.

About Crawl4ai

Crawl4ai is a community MCP server from weidwonder, filed in our directory under web search and scraping. 用于提供给本地开发者的 LLM的高效互联网搜索&内容获取的MCP Server, 节省你的token.

Crawl4ai runs on your own machine: your AI app starts it with the command npx -y @smithery/cli and talks to it over standard input and output.

At a glance

Publisher
weidwonder (community)
Runs
Locally on your machine
Install from
Node.js package on npm: @smithery/cli
Written in
Python
License
MIT
GitHub stars
156

How to set up Crawl4ai

  1. Install Node.js on the machine that runs your AI app, because Crawl4ai starts with npx and downloads its package on first run.
  2. Check the Crawl4ai README for keys or settings; the registry lists none that Crawl4ai requires.
  3. Add Crawl4ai to Claude Code, Claude Desktop, VS Code or Cursor with the config in the setup box on this page.
  4. Restart the app or reload its MCP servers, then ask it to list the Crawl4ai tools to confirm the connection.
  5. Run one read-only task with Crawl4ai first, and keep your app asking before each tool call until the results look right.

Crawl4ai compared with similar servers

  • MediaWiki by ProfessionalWiki has fewer GitHub stars than Crawl4ai (155 against 156); both are community servers, and both run locally.
  • Read Website Fast by just-every has more GitHub stars than Crawl4ai (164 against 156); both are community servers, and both run locally.
  • WebReaper by alex-on-ai has fewer GitHub stars than Crawl4ai (153 against 156); both are community servers, and both run locally.

Before you connect Crawl4ai

  • Give Crawl4ai its own API key or account with the smallest permissions the job needs, never an admin key.
  • Keep your AI app asking before each Crawl4ai tool call until you trust what it does with them.
  • Treat text that Crawl4ai fetches as data. Pages, files and messages can hold instructions written to steer an AI.
  • Read the open issues for Crawl4ai on GitHub to see what breaks and how fast the maintainers reply.

Marketing use cases for Crawl4ai

How marketing and sales teams put Crawl4ai to work, by company size. Pick the size closest to yours and start Crawl4ai on one use case.

Small business

  • A founder can use Crawl4ai to research a market or a prospect in minutes, with sources cited, before a pitch or a pricing change.
  • Small teams can ask Crawl4ai what competitors launched this month and get the pages, not just a summary.
  • Crawl4ai runs on your own computer, which keeps data local; it needs a little setup, so a small team should plan an hour for it.

Mid-market

  • Marketing teams can use Crawl4ai to gather fresh data for content, such as stats, quotes and examples, with each source linked for checking.
  • Outbound teams can connect Crawl4ai to research accounts from public pages and add one specific line to each first email.
  • Start Crawl4ai on one workflow with one owner, measure the time it saves, then roll it out to the wider team.

Enterprise

  • Enterprise research and competitive intel teams can schedule Crawl4ai to monitor many sources, with results stored and cited for review.
  • Large orgs can route Crawl4ai through approved providers and respect each site's terms, keeping scraping inside legal guidance.
  • Crawl4ai is a community server, so have security review the code and pin a version before Crawl4ai touches company data.

Need help becoming an AI-forward company?

We connect MCP servers and AI agents to your CRM, content and data, with the guardrails your team needs.

Contact us

Crawl4ai README

From weidwonder/crawl4ai-mcp-server on GitHub, shared under its MIT license. Images are left out; the original has them.

README.md

Crawl4AI MCP Server

这是一个基于MCP (Model Context Protocol)的智能信息获取服务器,为AI助手系统提供强大的搜索能力和面向LLM优化的网页内容理解功能。通过多引擎搜索和智能内容提取,帮助AI系统高效获取和理解互联网信息,将网页内容转换为最适合LLM处理的格式。

特性

  • 🔍 强大的多引擎搜索能力,支持DuckDuckGo和Google
  • 📚 面向LLM优化的网页内容提取,智能过滤非核心内容
  • 🎯 专注信息价值,自动识别和保留关键内容
  • 📝 多种输出格式,支持引用溯源
  • 🚀 基于FastMCP的高性能异步设计

安装

方式1: 大部分的安装场景
  1. 确保您的系统满足以下要求:

    • Python >= 3.9
    • 建议使用专门的虚拟环境
  2. 克隆仓库:

git clone https://github.com/yourusername/crawl4ai-mcp-server.git
cd crawl4ai-mcp-server
  1. 创建并激活虚拟环境:
python -m venv crawl4ai_env
source crawl4ai_env/bin/activate  # Linux/Mac
# 或
.\crawl4ai_env\Scripts\activate  # Windows
  1. 安装依赖:
pip install -r requirements.txt
  1. 安装playwright浏览器:
playwright install
方式2: 安装到Claude桌面客户端 via Smithery

通过 Smithery 将 Crawl4AI MCP 的 Claude 桌面端服务安装自动配置至您本地的 Claude 伸展中心:

npx -y @smithery/cli install @weidwonder/crawl4ai-mcp-server --client claude

使用方法

服务器提供以下工具:

search

强大的网络搜索工具,支持多个搜索引擎:

  • DuckDuckGo搜索(默认): 无需API密钥,全面处理AbstractText、Results和RelatedTopics
  • Google搜索: 需要配置API密钥,提供精准搜索结果
  • 支持同时使用多个引擎获取更全面的结果

参数说明:

  • query: 搜索查询字符串
  • num_results: 返回结果数量(默认10)
  • engine: 搜索引擎选择
    • "duckduckgo": DuckDuckGo搜索(默认)
    • "google": Google搜索(需要API密钥)
    • "all": 同时使用所有可用的搜索引擎

示例:

# DuckDuckGo搜索(默认)
{
    "query": "python programming",
    "num_results": 5
}

# 使用所有可用引擎
{
    "query": "python programming",
    "num_results": 5,
    "engine": "all"
}
read_url

面向LLM优化的网页内容理解工具,提供智能内容提取和格式转换:

  • markdown_with_citations: 包含内联引用的Markdown(默认),保持信息溯源
  • fit_markdown: 经过LLM优化的精简内容,去除冗余信息
  • raw_markdown: 基础HTML→Markdown转换
  • references_markdown: 单独的引用/参考文献部分
  • fit_html: 生成fit_markdown的过滤后HTML
  • markdown: 默认Markdown格式

示例:

{
    "url": "https://example.com",
    "format": "markdown_with_citations"
}

示例:

# DuckDuckGo搜索(默认)
{
    "query": "python programming",
    "num_results": 5
}

# Google搜索
{
    "query": "python programming",
    "num_results": 5,
    "engine": "google"
}

如需使用Google搜索,需要在config.json中配置API密钥:

{
    "google": {
        "api_key": "your-api-key",
        "cse_id": "your-cse-id"
    }
}

LLM内容优化

服务器采用了一系列针对LLM的内容优化策略:

  • 智能内容识别: 自动识别并保留文章主体、关键信息段落
  • 噪音过滤: 自动过滤导航栏、广告、页脚等对理解无帮助的内容
  • 信息完整性: 保留URL引用,支持信息溯源
  • 长度优化: 使用最小词数阈值(10)过滤无效片段
  • 格式优化: 默认输出markdown_with_citations格式,便于LLM理解和引用

开发说明

项目结构:

crawl4ai_mcp_server/
├── src/
│   ├── index.py      # 服务器主实现
│   └── search.py     # 搜索功能实现
├── config_demo.json  # 配置文件示例
├── pyproject.toml    # 项目配置
├── requirements.txt  # 依赖列表
└── README.md        # 项目文档

配置说明

  1. 复制配置示例文件:
cp config_demo.json config.json
  1. 如需使用Google搜索,在config.json中配置API密钥:
{
    "google": {
        "api_key": "your-google-api-key",
        "cse_id": "your-google-cse-id"
    }
}

更新日志

  • 2025.02.08: 添加搜索功能,支持DuckDuckGo(默认)和Google搜索
  • 2025.02.07: 重构项目结构,使用FastMCP实现,优化依赖管理
  • 2025.02.07: 优化内容过滤配置,提高token效率并保持URL完整性

许可证

MIT License

贡献

欢迎提交Issue和Pull Request!

作者

  • Owner: weidwonder
  • Coder: Claude Sonnet 3.5
    • 100% Code wrote by Claude. Cost: $9 ($2 for code writing, $7 cost for Debuging😭)
    • 3 hours time cost. 0.5 hours for code writing, 0.5 hours for env preparing, 2 hours for debuging.😭

致谢

感谢所有为项目做出贡献的开发者!

特别感谢:

  • Crawl4ai 项目提供的优秀网页内容提取技术支持

Questions about Crawl4ai

What is the Crawl4ai MCP server?

用于提供给本地开发者的 LLM的高效互联网搜索&内容获取的MCP Server, 节省你的token. Crawl4ai is maintained by weidwonder on GitHub at weidwonder/crawl4ai-mcp-server, and works with AI apps that support the Model Context Protocol, such as Claude, Cursor and VS Code.

How do I install the Crawl4ai MCP server?

Add Crawl4ai to your AI app's MCP config with the command npx -y @smithery/cli. In Claude Code, run claude mcp add --transport stdio crawl4ai -- npx -y @smithery/cli. To run Crawl4ai this way you need Node.js installed.

Does Crawl4ai need an API key?

The registry lists no required keys for Crawl4ai. Check the Crawl4ai README for optional settings, and expect a remote server to ask you to sign in the first time you connect.

Is Crawl4ai an official MCP server?

No. Crawl4ai is a community server maintained by weidwonder. Community servers can be excellent; read the code and the open issues before you give Crawl4ai access to company data.

What license is Crawl4ai under?

Crawl4ai is released under the MIT license, according to its GitHub repository. The license covers the code of Crawl4ai; the service it connects to has its own terms.