Crawl4AI MCP
The Crawl4AI MCP server enables AI assistants to crawl websites and extract structured Markdown content via the Model Context Protocol. Key capabilities include:
Basic Web Crawling: Crawl any URL with configurable depth (
max_depth) to control how many levels of links to follow.Content Extraction: Return scraped Markdown content directly in the MCP response (truncated to 50k chars) and/or save it to a file (auto-generated path or specified via
output_file).Dynamic Content & SPA Support: Wait for a CSS selector to appear (
wait_for_selector) or set an explicit delay (delay_before_return_html) before extracting content, ideal for JavaScript-heavy pages.Anti-Bot Bypass: Use Magic Mode (
magic: true) to simulate real browser behavior and bypass protections like Cloudflare.Targeted Extraction: Use CSS selectors (
css_selector) to extract only specific page elements instead of full content.Custom JavaScript Execution: Run custom JS code before extraction (e.g., clicks, scrolls, form fills) — requires
CRAWL4AI_MCP_ALLOW_JS=trueenvironment variable.Persistent Sessions: Maintain cookies and browser state across requests using a
session_id, enabling authenticated or stateful site crawling.Link Control: Optionally include or exclude external links (
include_external) in results.Verbose Logging: Enable detailed output (
verbose) for debugging and monitoring.
Click on "Install Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@Crawl4AI MCPcrawl https://example.com and summarize the main content"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
Web Crawler MCP
A powerful web crawling tool that integrates with AI assistants via the MCP (Model Context Protocol). This project allows AI assistants to crawl websites, extract dynamic content, navigate through links, and save structured Markdown files directly.
📋 Features
Native integration with AI assistants via MCP
Return scraped Markdown content directly to the AI
Extracts and surfaces internal/external links for AI navigation
Website crawling with configurable depth
Detailed crawl result statistics
Error and not found page handling
Advanced Scraping Capabilities:
Magic Mode: Bypass anti-bots (like Cloudflare) and simulate real browser behavior
Targeted Extraction: Fetch only what you need using CSS selectors
Custom JavaScript: Execute code before extraction (clicks, scrolls, form fills)
Persistent Sessions: Keep cookies and state across requests for authenticated sites
SPA Support: Wait for dynamic CSS selectors or set explicit pre-extraction delays
Related MCP server: Anybrowse
🚀 MCP Configuration
The simplest and recommended way to use this tool is via uvx, which automatically fetches and runs the latest published version from PyPI.
Prerequisites
uv installed on your system.
Setup for AI Assistants (e.g., Claude Desktop, Cline)
Add the following to your AI Assistant's MCP configuration file (e.g., cline_mcp_settings.json or claude_desktop_config.json):
Note for Windows Users: It is highly recommended to specify
--python 3.13to avoid compilation issues with certain dependencies.
From PyPI (recommended):
{
"mcpServers": {
"crawl": {
"command": "uvx",
"args": [
"--python",
"3.13",
"crawl4ai-mcp-llm"
],
"disabled": false,
"autoApprove": [],
"timeout": 600
}
}
}From GitHub (latest unreleased):
{
"mcpServers": {
"crawl": {
"command": "uvx",
"args": [
"--python",
"3.13",
"--from",
"git+https://github.com/laurentvv/crawl4ai-mcp-llm",
"crawl4ai-mcp-llm"
],
"disabled": false,
"autoApprove": [],
"timeout": 600
}
}
}Important: Browser Installation
The crawler uses Playwright to handle dynamic content. You must install the required browsers after setting up the tool:
uv run playwright install chromium🖥️ Usage
Once configured, you can use the crawler by asking your AI assistant to perform a crawl.
Usage Examples with Claude/Cline
Simple Crawl: "Can you crawl the site example.com and give me a summary?"
Crawl with Options: "Can you crawl https://example.com with a depth of 3 and include external links?"
Dynamic Content: "Crawl this React app and wait for the
.main-contentselector to load."Bypass Protections: "Crawl example.com but use 'magic mode' to bypass the anti-bot protection."
Targeted Extraction: "Crawl the docs site but only extract content matching the
h1, p.leadCSS selector."
🛠️ Available Parameters (MCP Tool)
The crawl tool accepts the following parameters:
Parameter | Type | Description | Default Value |
| string | URL to crawl (required) | - |
| integer | Maximum crawling depth | 2 |
| boolean | Include external links | false |
| boolean | Enable detailed output | true |
| string | CSS selector to wait for before extracting content. Useful for single-page applications. | None |
| boolean | Whether to return the extracted content directly in the MCP response (truncated to 50k chars if necessary). | true |
| string | Output file path | automatically generated |
| boolean | Enable magic mode to bypass anti-bots and simulate a real browser | false |
| string | Specific CSS selector to extract only targeted elements from the page | None |
| string | Custom JavaScript code to execute on the page before extraction | None |
| string | Persistent session identifier to keep cookies and browser state across requests | None |
| number | Delay in seconds to wait before extracting HTML (useful for heavy JS pages) | None |
👨💻 Development
If you want to modify the crawler or run it locally:
Clone this repository:
git clone https://github.com/laurentvv/crawl4ai-mcp-llm
cd crawl4ai-mcp-llmInstall dependencies using
uv:
uv syncTest the MCP server locally using the official MCP Inspector:
npx -y @modelcontextprotocol/inspector uv run crawl4ai-mcp-llmRun the automated test suite:
uv run pytest tests/Run the MCP server directly (for standard usage):
uv run crawl4ai-mcp-llm🤝 Contribution
Contributions are welcome! Feel free to open an issue or submit a pull request.
📄 License
This project is licensed under the MIT License - see the LICENSE file for details.
Maintenance
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Tools
Latest Blog Posts
- Who's Calling? MCP Hosts Are an Identity Blind Spot (And the Spec Knows It)By Om-Shree-0709 on .mcpAgent IdentityOAuth 2.1
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
MCP directory API
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/laurentvv/crawl4ai-mcp-llm'
If you have feedback or need assistance with the MCP directory API, please join our Discord server