Crawl4AI MCP Server

Crawl4AI MCP Server

High-performance server enabling AI assistants to access web scraping, crawling, and deep research capabilities through Model Context Protocol.

Category
访问服务器

README

⚠️ NOTICE

MCP SERVER CURRENTLY UNDER DEVELOPMENT
NOT READY FOR PRODUCTION USE
WILL UPDATE WHEN OPERATIONAL

Crawl4AI MCP Server

🚀 High-performance MCP Server for Crawl4AI - Enable AI assistants to access web scraping, crawling, and deep research via Model Context Protocol. Faster and more efficient than FireCrawl!

Overview

This project implements a custom Model Context Protocol (MCP) Server that integrates with Crawl4AI, an open-source web scraping and crawling library. The server is deployed as a remote MCP server on CloudFlare Workers, allowing AI assistants like Claude to access Crawl4AI's powerful web scraping capabilities.

Documentation

For comprehensive details about this project, please refer to the following documentation:

Features

Web Data Acquisition

  • 🌐 Single Webpage Scraping: Extract content from individual webpages
  • 🕸️ Web Crawling: Crawl websites with configurable depth and page limits
  • 🗺️ URL Discovery: Map and discover URLs from a starting point
  • 🕸️ Asynchronous Crawling: Crawl entire websites efficiently

Content Processing

  • 🔍 Deep Research: Conduct comprehensive research across multiple pages
  • 📊 Structured Data Extraction: Extract specific data using CSS selectors or LLM-based extraction
  • 🔎 Content Search: Search through previously crawled content

Integration & Security

  • 🔄 MCP Integration: Seamless integration with MCP clients (Claude Desktop, etc.)
  • 🔒 OAuth Authentication: Secure access with proper authorization
  • 🔒 Authentication Options: Secure access via OAuth or API key (Bearer token)
  • High Performance: Optimized for speed and efficiency

Project Structure

crawl4ai-mcp/
├── src/
│   ├── index.ts               # Main entry point with OAuth provider setup
│   ├── auth-handler.ts        # Authentication handler
│   ├── mcp-server.ts          # MCP server implementation
│   ├── crawl4ai-adapter.ts    # Adapter for Crawl4AI API
│   ├── tool-schemas/          # MCP tool schema definitions
│   │   └── [...].ts           # Tool schemas
│   ├── handlers/
│   │   ├── crawl.ts           # Web crawling implementation
│   │   ├── search.ts          # Search functionality
│   │   └── extract.ts         # Content extraction
│   └── utils/                 # Utility functions
├── tests/                     # Test cases
├── .github/                   # GitHub configuration
├── wrangler.toml              # CloudFlare Workers configuration
├── tsconfig.json              # TypeScript configuration
├── package.json               # Node.js dependencies
└── README.md                  # Project documentation

Getting Started

Prerequisites

Installation

  1. Clone the repository:

    git clone https://github.com/BjornMelin/crawl4ai-mcp-server.git
    cd crawl4ai-mcp-server
    
  2. Install dependencies:

    npm install
    
  3. Set up CloudFlare KV namespace:

    wrangler kv:namespace create CRAWL_DATA
    
  4. Update wrangler.toml with the KV namespace ID:

    kv_namespaces = [
      { binding = "CRAWL_DATA", id = "your-namespace-id" }
    ]
    

Development

Local Development

  1. Start the development server:

    npm run dev
    
  2. The server will be available at http://localhost:8787

Deployment

  1. Deploy to CloudFlare Workers:

    npm run deploy
    
  2. Your server will be available at the CloudFlare Workers URL assigned to your deployed worker.

Usage with MCP Clients

This server implements the Model Context Protocol, allowing AI assistants to access its tools.

Authentication

  • Implement OAuth authentication with workers-oauth-provider
  • Add API key authentication using Bearer tokens
  • Create login page and token management

Connecting to an MCP Client

  1. Use the CloudFlare Workers URL assigned to your deployed worker
  2. In Claude Desktop or other MCP clients, add this server as a tool source

Available Tools

  • crawl: Crawl web pages from a starting URL
  • getCrawl: Retrieve crawl data by ID
  • listCrawls: List all crawls or filter by domain
  • search: Search indexed documents by query
  • extract: Extract structured content from a URL

Configuration

The server can be configured by modifying environment variables in wrangler.toml:

  • MAX_CRAWL_DEPTH: Maximum depth for web crawling (default: 3)
  • MAX_CRAWL_PAGES: Maximum pages to crawl (default: 100)
  • API_VERSION: API version string (default: "v1")
  • OAUTH_CLIENT_ID: OAuth client ID for authentication
  • OAUTH_CLIENT_SECRET: OAuth client secret for authentication

Roadmap

The project is being developed with these components in mind:

  1. Project Setup and Configuration: CloudFlare Worker setup, TypeScript configuration
  2. MCP Server and Tool Schemas: Implementation of MCP server with tool definitions
  3. Crawl4AI Adapter: Integration with the Crawl4AI functionality
  4. OAuth Authentication: Secure authentication implementation
  5. Performance Optimizations: Enhancing speed and reliability
  6. Advanced Extraction Features: Improving structured data extraction capabilities

Contributing

Contributions are welcome! Please check the open issues or create a new one before starting work on a feature or bug fix. See Contributing Guidelines for detailed guidelines.

Support

If you encounter issues or have questions:

How to Cite

If you use Crawl4AI MCP Server in your research or projects, please cite it using the following BibTeX entry:

@software{crawl4ai_mcp_2025,
  author = {Melin, Bjorn},
  title = {Crawl4AI MCP Server: High-performance Web Crawling for AI Assistants},
  url = {https://github.com/BjornMelin/crawl4ai-mcp-server},
  version = {1.0.0},
  year = {2025},
  month = {5}
}

License

MIT

推荐服务器

Baidu Map

Baidu Map

百度地图核心API现已全面兼容MCP协议,是国内首家兼容MCP协议的地图服务商。

官方
精选
JavaScript
Playwright MCP Server

Playwright MCP Server

一个模型上下文协议服务器,它使大型语言模型能够通过结构化的可访问性快照与网页进行交互,而无需视觉模型或屏幕截图。

官方
精选
TypeScript
Magic Component Platform (MCP)

Magic Component Platform (MCP)

一个由人工智能驱动的工具,可以从自然语言描述生成现代化的用户界面组件,并与流行的集成开发环境(IDE)集成,从而简化用户界面开发流程。

官方
精选
本地
TypeScript
Audiense Insights MCP Server

Audiense Insights MCP Server

通过模型上下文协议启用与 Audiense Insights 账户的交互,从而促进营销洞察和受众数据的提取和分析,包括人口统计信息、行为和影响者互动。

官方
精选
本地
TypeScript
VeyraX

VeyraX

一个单一的 MCP 工具,连接你所有喜爱的工具:Gmail、日历以及其他 40 多个工具。

官方
精选
本地
graphlit-mcp-server

graphlit-mcp-server

模型上下文协议 (MCP) 服务器实现了 MCP 客户端与 Graphlit 服务之间的集成。 除了网络爬取之外,还可以将任何内容(从 Slack 到 Gmail 再到播客订阅源)导入到 Graphlit 项目中,然后从 MCP 客户端检索相关内容。

官方
精选
TypeScript
Kagi MCP Server

Kagi MCP Server

一个 MCP 服务器,集成了 Kagi 搜索功能和 Claude AI,使 Claude 能够在回答需要最新信息的问题时执行实时网络搜索。

官方
精选
Python
e2b-mcp-server

e2b-mcp-server

使用 MCP 通过 e2b 运行代码。

官方
精选
Neon MCP Server

Neon MCP Server

用于与 Neon 管理 API 和数据库交互的 MCP 服务器

官方
精选
Exa MCP Server

Exa MCP Server

模型上下文协议(MCP)服务器允许像 Claude 这样的 AI 助手使用 Exa AI 搜索 API 进行网络搜索。这种设置允许 AI 模型以安全和受控的方式获取实时的网络信息。

官方
精选