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
Visit Server

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

Recommended Servers

playwright-mcp

playwright-mcp

A Model Context Protocol server that enables LLMs to interact with web pages through structured accessibility snapshots without requiring vision models or screenshots.

Official
Featured
TypeScript
Magic Component Platform (MCP)

Magic Component Platform (MCP)

An AI-powered tool that generates modern UI components from natural language descriptions, integrating with popular IDEs to streamline UI development workflow.

Official
Featured
Local
TypeScript
Audiense Insights MCP Server

Audiense Insights MCP Server

Enables interaction with Audiense Insights accounts via the Model Context Protocol, facilitating the extraction and analysis of marketing insights and audience data including demographics, behavior, and influencer engagement.

Official
Featured
Local
TypeScript
VeyraX MCP

VeyraX MCP

Single MCP tool to connect all your favorite tools: Gmail, Calendar and 40 more.

Official
Featured
Local
graphlit-mcp-server

graphlit-mcp-server

The Model Context Protocol (MCP) Server enables integration between MCP clients and the Graphlit service. Ingest anything from Slack to Gmail to podcast feeds, in addition to web crawling, into a Graphlit project - and then retrieve relevant contents from the MCP client.

Official
Featured
TypeScript
Kagi MCP Server

Kagi MCP Server

An MCP server that integrates Kagi search capabilities with Claude AI, enabling Claude to perform real-time web searches when answering questions that require up-to-date information.

Official
Featured
Python
E2B

E2B

Using MCP to run code via e2b.

Official
Featured
Neon Database

Neon Database

MCP server for interacting with Neon Management API and databases

Official
Featured
Exa Search

Exa Search

A Model Context Protocol (MCP) server lets AI assistants like Claude use the Exa AI Search API for web searches. This setup allows AI models to get real-time web information in a safe and controlled way.

Official
Featured
Qdrant Server

Qdrant Server

This repository is an example of how to create a MCP server for Qdrant, a vector search engine.

Official
Featured