Skip to main content
Glama
laurentvv

Crawl4AI MCP

by laurentvv

Web Crawler MCP

English 中文 हिंदी Español Français العربية বাংলা Русский Português Bahasa Indonesia

Python License

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: cloudscraper-mcp

🚀 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.13 to 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-content selector 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.lead CSS selector."

🛠️ Available Parameters (MCP Tool)

The crawl tool accepts the following parameters:

Parameter

Type

Description

Default Value

url

string

URL to crawl (required)

-

max_depth

integer

Maximum crawling depth

2

include_external

boolean

Include external links

false

verbose

boolean

Enable detailed output

true

wait_for_selector

string

CSS selector to wait for before extracting content. Useful for single-page applications.

None

return_content

boolean

Whether to return the extracted content directly in the MCP response (truncated to 50k chars if necessary).

true

output_file

string

Output file path

automatically generated

magic

boolean

Enable magic mode to bypass anti-bots and simulate a real browser

false

css_selector

string

Specific CSS selector to extract only targeted elements from the page

None

js_code

string

Custom JavaScript code to execute on the page before extraction

None

session_id

string

Persistent session identifier to keep cookies and browser state across requests

None

delay_before_return_html

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:

  1. Clone this repository:

git clone https://github.com/laurentvv/crawl4ai-mcp-llm
cd crawl4ai-mcp-llm
  1. Install dependencies using uv:

uv sync
  1. Test the MCP server locally using the official MCP Inspector:

npx -y @modelcontextprotocol/inspector uv run crawl4ai-mcp-llm
  1. Run the automated test suite:

uv run pytest tests/
  1. 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.

Glama MCP

Available Tools

1 tool
crawlB

Crawls a website and saves its content as structured markdown to a file

ParametersJSON Schema
NameRequiredDescriptionDefault
urlYesURL to crawl
max_depthNoMaximum crawling depth
include_externalNoWhether to include external links
verboseNoEnable verbose output
output_fileNoPath to output file (generated if not provided)
wait_for_selectorNoCSS selector to wait for before extracting content. Useful for single-page applications.
return_contentNoWhether to return the extracted content directly in the MCP response
magicNoEnable magic mode to bypass anti-bots and simulate a real browser
css_selectorNoSpecific CSS selector to extract only targeted elements from the page
js_codeNoCustom JavaScript code to execute on the page before extraction (Requires CRAWL4AI_MCP_ALLOW_JS=true environment variable)
session_idNoPersistent session identifier to keep cookies and browser state across requests
delay_before_return_htmlNoDelay in seconds to wait before extracting HTML (useful for heavy JS pages)

TDQS

B3/5.0
Behavior2/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations, the description carries full burden but only mentions saving to file, ignoring the return_content parameter's behavior and other complex features like magic mode and JS execution.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness3/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is very concise but underspecified for the complexity; it does not front-load key behavioral details.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness2/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the 12 parameters and lack of output schema, the description fails to explain return values, side effects, or important behavioral nuances.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is 100%, so the baseline is 3. The description adds no additional parameter meaning beyond what's in the schema.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the action (crawls) and the output (structured markdown to a file), leaving no ambiguity about what the tool does.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

No guidance is provided on when to use this tool versus alternatives; no context about prerequisites or appropriate scenarios.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections. Dates show when Glama detected each change.

  1. 1 tool updatev0.1.0
    • First observedcrawl

TDQS

B3.3/5.0
Disambiguation5/5

Only one tool exists, so there is no possibility of confusion between tools. The purpose is clear and unique.

Naming Consistency5/5

With a single tool, naming is trivially consistent. The verb 'crawl' appropriately describes the action.

Tool Count3/5

A single tool feels thin for a crawling service, which typically offers multiple options (depth, output formats, etc.). However, for a minimal markdown-only crawler, it is borderline reasonable.

Completeness3/5

The tool covers the basic crawl-and-save workflow but lacks parameters like depth, page limits, or format selection, which are common gaps for such a service.

Maintenance

ActivityMaintained
ResponsivenessResponsive

Resources

Unclaimed servers have limited discoverability.

Looking for Admin?

If you are the server author, to access and configure the admin panel.

Related MCP Connectors

Related MCP Servers

  • F
    license
    Not graded
    quality
    D
    maintenance
    Enables AI assistants to fetch and analyze web content from URLs through MCP protocol. Supports batch processing, content extraction, summarization, and metadata extraction with intelligent filtering of ads and navigation elements.
    -
  • A
    license
    Not graded
    quality
    C
    maintenance
    Enables AI agents to fetch any web page (including those behind Cloudflare or CAPTCHAs), extract clean markdown, structured data, crawl sites, and map URLs via BypassAPI.
    MIT

Latest Blog Posts

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