cloudflare-crawl-mcp
Allows crawling websites through Cloudflare Browser Rendering API, with configurable depth, page limits, include/exclude URL patterns, subdomain and external-link following, JavaScript rendering, and Markdown/HTML/JSON output formats.
This server does not currently have a deployable release on Glama. Follow the repository's setup instructions to install and configure it for your MCP client, including any required credentials and local dependencies.
@lukaszraczylo/cloudflare-crawl-mcp
MCP server for crawling websites using Cloudflare Browser Rendering API. Supports multiple output formats including Markdown, HTML, and JSON.
Features
Multiple Output Formats: Choose between Markdown, HTML, or JSON output
Configurable Crawling: Control depth, page limits, and link following
Pattern Filtering: Include/exclude URLs using wildcard patterns
JavaScript Rendering: Execute JavaScript for dynamic content (or disable for static content)
Environment-Based Secrets: Securely manage credentials via environment variables
Related MCP server: Open Crawler MCP Server
Prerequisites
Node.js 18+
Cloudflare account with Browser Rendering API access
Cloudflare API Token with
Browser RenderingpermissionsCloudflare Account ID
Quick Start
# Clone and setup
npm install
npm run build
# Run with environment variables
CF_API_TOKEN=your_token CF_ACCOUNT_ID=your_account_id npm startInstallation
1. Clone the Repository
git clone https://github.com/lukaszraczylo/cloudflare-crawl-mcp.git
cd cloudflare-crawl-mcp2. Install Dependencies
npm install3. Build the Server
npm run build4. Configure Environment Variables
Copy the example environment file and add your credentials:
cp .env.example .envEdit .env with your Cloudflare credentials:
CF_API_TOKEN=your_cloudflare_api_token
CF_ACCOUNT_ID=your_cloudflare_account_idGetting Cloudflare Credentials
Account ID: Find it at https://dash.cloudflare.com/_/account
API Token: Create one at https://dash.cloudflare.com/profile/api-tokens with these permissions:
Account>Browser Rendering>Edit
MCP Configuration
Claude Desktop (macOS)
Add to ~/Library/Application Support/Claude/claude_desktop_config.json:
{
"mcpServers": {
"cloudflare-crawl": {
"command": "npm",
"args": ["start"],
"env": {
"CF_API_TOKEN": "your_api_token",
"CF_ACCOUNT_ID": "your_account_id"
},
"path": "/path/to/cloudflare-crawl-mcp"
}
}
}Claude Code (CLI)
{
"mcpServers": {
"cloudflare-crawl": {
"command": "npm",
"args": ["start"],
"env": {
"CF_API_TOKEN": "your_api_token",
"CF_ACCOUNT_ID": "your_account_id"
}
}
}
}Cursor
Add to ~/.cursor/settings.json (MCP configuration):
{
"mcpServers": {
"cloudflare-crawl": {
"command": "npm",
"args": ["start"],
"env": {
"CF_API_TOKEN": "your_api_token",
"CF_ACCOUNT_ID": "your_account_id"
},
"path": "/path/to/cloudflare-crawl-mcp"
}
}
}Available Tools
crawl_url_markdown
Crawl a website and return content in Markdown format.
{
"name": "crawl_url_markdown",
"arguments": {
"url": "https://example.com/docs",
"limit": 50,
"depth": 2,
"includePatterns": ["https://example.com/docs/**"],
"excludePatterns": ["https://example.com/docs/archive/**"],
"render": true
}
}crawl_url_html
Crawl a website and return content in HTML format.
{
"name": "crawl_url_html",
"arguments": {
"url": "https://example.com",
"limit": 10
}
}crawl_url_json
Crawl a website and return content in JSON format (uses Workers AI for data extraction).
{
"name": "crawl_url_json",
"arguments": {
"url": "https://example.com/products",
"limit": 20
}
}Parameters
Parameter | Type | Default | Description |
| string | required | Starting URL to crawl |
| number | 10 | Maximum pages to crawl (max: 100,000) |
| number | 1 | Maximum link depth from starting URL |
| boolean | false | Follow links to subdomains |
| boolean | false | Follow links to external domains |
| string[] | [] | Wildcard patterns to include |
| string[] | [] | Wildcard patterns to exclude |
| boolean | true | Execute JavaScript (false = faster static fetch) |
Pattern Syntax
*- Matches any characters except/**- Matches any characters including/
Examples:
https://example.com/docs/**- All URLs under /docshttps://example.com/*.html- All HTML files directly in root
Development
Commands
npm install # Install dependencies
npm run typecheck # Type check with tsc
npm run lint # Lint with ESLint
npm run build # Build TypeScript
npm start # Run server
npm test # Run tests
npm run test:watch # Run tests in watch modeCI runs typecheck, lint, build and test.
Testing
The project includes comprehensive tests covering:
Environment variable handling
Crawl options building
Result formatting (Markdown, HTML, JSON)
Error handling
API integration
Run tests:
npm testArchitecture
src/
├── index.ts # Main MCP server implementation
│
├── API Layer
│ ├── initiateCrawl() # POST to /crawl endpoint
│ ├── waitForCrawl() # Poll for job completion
│ └── getCrawlResults() # Fetch final results
│
├── Formatters
│ ├── formatMarkdownResult()
│ ├── formatHtmlResult()
│ └── formatJsonResult()
│
└── MCP Handlers
├── ListToolsRequestSchema # Tool registration
└── CallToolRequestSchema # Tool executionCloudflare Limits
Max crawl duration: 7 days
Results available: 14 days after completion
Max pages per job: 100,000
Free plan: 10 minutes of browser time per day
See Cloudflare Browser Rendering Limits for details.
Troubleshooting
Crawl returns no results
Check
robots.txtblocking (userender: falseto bypass)Verify
includePatternsmatch actual URLsTry increasing
depthor disabling pattern filters
Job cancelled due to limits
Upgrade to Workers Paid plan
Use
render: falsefor static contentReduce
limitparameter
Authentication errors
Verify API Token has Browser Rendering permissions
Confirm Account ID is correct
License
MIT License - see LICENSE file.
Contributing
Contributions are welcome! Please read our contributing guidelines before submitting PRs at https://github.com/lukaszraczylo/cloudflare-crawl-mcp.
Support
Open an issue at https://github.com/lukaszraczylo/cloudflare-crawl-mcp/issues
Check Cloudflare's Browser Rendering Docs for API details
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
This server cannot be deployed
Maintenance
Related MCP Connectors
Markdown scrape, site map, page metadata, screenshots, web search and PDF to text. Pay per call
Convert URLs or whole websites to clean Markdown for LLMs and RAG; respects robots.txt.
Web pages to markdown, site crawls, company contacts, app reviews, ATS jobs and Shopify products.
Web pages as Markdown, site maps and crawls, AI data extraction and screenshots.
Related MCP Servers
- AlicenseNot gradedqualityDmaintenanceEnables web scraping and document processing with JavaScript execution, anti-detection measures, batch processing, and structured data extraction. Supports multiple formats including markdown, HTML, screenshots, and handles PDFs with OCR capabilities.4MIT
- AlicenseNot gradedqualityCmaintenanceEnables web crawling and content extraction from web pages, supporting multiple output formats like text, markdown, XML, and JSON, with robots.txt compliance and rate limiting.14 npm1MIT
- AlicenseAqualityDmaintenanceEnables LLMs to crawl websites via Cloudflare's Browser Rendering API, providing tools to start, monitor, cancel crawls, and retrieve structured content with AI extraction.5MIT
- FlicenseNot gradedqualityDmaintenanceEnables scraping single pages or crawling entire websites, converting content to markdown and optionally extracting structured data with Claude.-