🕷️ 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.git🕷️ 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.
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.AI assistant built for thoughtful, nuanced conversation
Unlock data insights with interactive dashboards and collaborative analytics capabilities.
AI-first code editor
Build and deploy AI models through APIs and tools
Enterprise workflow automation and service management platform
Automate your spreadsheet tasks with AI power