🕷 A lightweight Model Context Protocol (MCP) server that exposes Crawl4AI web scraping and crawling capabilities as tools for AI agents. Similar to Firecrawl's API but self-hosted and free. Perfect for integrating web scraping into your AI workflows with OpenAI Agents SDK, Cursor, Claude Code, and other MCP-compatible tools.
git clone https://github.com/sadiuysal/crawl4ai-mcp-server.gitCrawl4AI MCP Server is a lightweight Model Context Protocol server that exposes four web scraping and crawling tools—scrape, crawl, crawl_site, and crawl_sitemap—for AI agents. It provides single-page markdown extraction, multi-page breadth-first crawling with depth control, and adaptive crawling that stops when sufficient content is gathered. The server blocks internal networks and private IPs for safety, runs via stdio with Playwright and Crawl4AI's optimized extraction engine, and integrates directly with Claude Code, Cursor, and OpenAI Agents SDK. Deploy via Docker with pre-built images or manually with Python, making it a free, self-hosted alternative to commercial web scraping APIs.
Deploy using Docker (recommended): pull uysalsadi/crawl4ai-mcp-server:latest and run the container. For manual setup, clone the repository, create a Python virtual environment, install dependencies from requirements.txt, and install Playwright browsers. Configure the MCP server in your tool's settings to call tools like scrape, crawl, crawl_site, or crawl_sitemap with appropriate URL and depth parameters.
Extract markdown content from single webpages for AI processing
Crawl multi-page documentation sites with depth and page limits
Comprehensive site crawling with automatic persistence to disk
Scrape URLs from sitemaps with configurable entry limits
No install command available. Check the GitHub repository for manual installation instructions.
git clone https://github.com/sadiuysal/crawl4ai-mcp-serverCopy the install command above and run it in your terminal.
Launch Claude Code, Cursor, or your preferred AI coding agent.
Use the prompt template or examples below to test the skill.
Adapt the skill to your specific use case and workflow.
I want to use the crawl4ai-mcp-server to scrape data from [WEBSITE_URL] for [COMPANY] in the [INDUSTRY] sector. The data I need includes [DATA_POINTS] from the website. Please provide me with the necessary steps and code to set up and use the crawl4ai-mcp-server for this task.
## Setup Instructions for crawl4ai-mcp-server
To set up the crawl4ai-mcp-server, follow these steps:
1. **Install Dependencies**: Ensure you have Python 3.8 or later installed. You can install the required dependencies using pip:
```bash
pip install crawl4ai-mcp-server
```
2. **Configure the Server**: Create a configuration file named `config.json` with the following content:
```json
{
"port": 8000,
"allowed_domains": ["example.com"],
"user_agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/91.0.4472.124 Safari/537.36"
}
```
3. **Run the Server**: Start the server by running the following command:
```bash
python -m crawl4ai_mcp_server --config config.json
```
4. **Integrate with AI Agents**: Use the OpenAI Agents SDK or other MCP-compatible tools to integrate the crawl4ai-mcp-server into your AI workflows. Here is an example of how to use it with the OpenAI Agents SDK:
```python
from openai import OpenAI
from openai.tools import Tools
client = OpenAI()
tools = Tools()
# Add the crawl4ai-mcp-server as a tool
tools.add_tool(
name="crawl4ai-mcp-server",
description="A lightweight MCP server for web scraping and crawling.",
url="http://localhost:8000"
)
# Use the tool in your AI agent
response = client.chat.completions.create(
model="gpt-4",
messages=[{"role": "user", "content": "Scrape data from example.com."}],
tools=[tools]
)
```
5. **Monitor and Maintain**: Regularly monitor the server logs and maintain the server to ensure it runs smoothly.The AI Code Editor for productive developers
AI assistant built for thoughtful, nuanced conversation
Pioneering accessible, high-performance AI models
Get more done every day with Microsoft Teams – powered by AI
Agentic AI Workflow platform
Connected workspace for docs, wikis, and projects
Take a free 3-minute scan and get personalized AI skill recommendations.
Take free scan