Crawl4AI MCP Server
High-performance server enabling AI assistants to access web scraping, crawling, and deep research capabilities through Model Context Protocol.
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:
- Migration Plan - Detailed plan for migrating from Firecrawl to Crawl4AI
- Enhanced Architecture - Multi-tenant architecture with cloud provider flexibility
- Implementation Guide - Technical implementation details and code examples
- Codebase Simplification - Details on code simplification and best practices implemented
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
-
Clone the repository:
git clone https://github.com/BjornMelin/crawl4ai-mcp-server.git cd crawl4ai-mcp-server -
Install dependencies:
npm install -
Set up CloudFlare KV namespace:
wrangler kv:namespace create CRAWL_DATA -
Update
wrangler.tomlwith the KV namespace ID:kv_namespaces = [ { binding = "CRAWL_DATA", id = "your-namespace-id" } ]
Development
Local Development
-
Start the development server:
npm run dev -
The server will be available at http://localhost:8787
Deployment
-
Deploy to CloudFlare Workers:
npm run deploy -
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
- Use the CloudFlare Workers URL assigned to your deployed worker
- In Claude Desktop or other MCP clients, add this server as a tool source
Available Tools
crawl: Crawl web pages from a starting URLgetCrawl: Retrieve crawl data by IDlistCrawls: List all crawls or filter by domainsearch: Search indexed documents by queryextract: 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 authenticationOAUTH_CLIENT_SECRET: OAuth client secret for authentication
Roadmap
The project is being developed with these components in mind:
- Project Setup and Configuration: CloudFlare Worker setup, TypeScript configuration
- MCP Server and Tool Schemas: Implementation of MCP server with tool definitions
- Crawl4AI Adapter: Integration with the Crawl4AI functionality
- OAuth Authentication: Secure authentication implementation
- Performance Optimizations: Enhancing speed and reliability
- 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:
- Open an issue on the GitHub repository
- Check the Crawl4AI documentation
- Refer to the Model Context Protocol specification
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
推荐服务器
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 模型以安全和受控的方式获取实时的网络信息。