Are you the author? Sign in to claim
AnyCrawl MCP Server, with Scrape, Crawl and SERP.
🚀 AnyCrawl MCP Server — Powerful web scraping and crawling for Cursor, Claude, and other LLM clients via the Model Context Protocol (MCP).
ANYCRAWL_API_KEY=YOUR-API-KEY npx -y anycrawl-mcp
npm install -g anycrawl-mcp-server
ANYCRAWL_API_KEY=YOUR-API-KEY anycrawl-mcp
AnyCrawl MCP Server supports two deployment modes: Cloud Service (recommended) and Self-Hosted.
Use the AnyCrawl cloud service at mcp.anycrawl.dev. No server setup required.
# Only need your API key
export ANYCRAWL_API_KEY="your-api-key-here"
Cloud endpoints:
https://mcp.anycrawl.dev/{API_KEY}/mcphttps://mcp.anycrawl.dev/{API_KEY}/sseFor self-hosted deployments, configure the base URL to point to your own AnyCrawl API instance:
export ANYCRAWL_API_KEY="your-api-key-here"
export ANYCRAWL_BASE_URL="https://your-api-server.com" # Your self-hosted API URL
For local development with custom host/port:
export ANYCRAWL_HOST="127.0.0.1" # Default: mcp.anycrawl.dev (cloud)
export ANYCRAWL_PORT="3000" # Default: 3000
ANYCRAWL_API_KEY environment variable (see above).AnyCrawl MCP Server supports the following deployment modes:
Default mode is STDIO (no env needed). Set ANYCRAWL_MODE to switch.
| Mode | Description | Best For | Transport |
|---|---|---|---|
STDIO | Standard MCP over stdio (default) | Command-type MCP clients, local tooling | stdio |
MCP | Streamable HTTP (JSON, stateful) | Cursor (streamable_http), API integration | HTTP + JSON |
SSE | Server-Sent Events | Web apps, browser integrations | HTTP + SSE |
# Development (local)
npm run dev # STDIO (default)
npm run dev:mcp # MCP mode (JSON /mcp)
npm run dev:sse # SSE mode (/sse)
# Production (built output)
npm start # STDIO (default)
npm run start:mcp
npm run start:sse
# Env examples
ANYCRAWL_MODE=MCP ANYCRAWL_API_KEY=YOUR-KEY npm run dev:mcp
ANYCRAWL_MODE=SSE ANYCRAWL_API_KEY=YOUR-KEY npm run dev:sse
This repo ships a production-ready image that runs MCP (JSON) on port 3000 and SSE on port 3001 in the same container, fronted by Nginx. Nginx also supports API-key-prefixed paths /{API_KEY}/mcp and /{API_KEY}/sse and forwards the key via x-anycrawl-api-key header.
docker compose build
docker compose up -d
Environment variables used in Docker image:
ANYCRAWL_MODE: MCP_AND_SSE (default in compose), or MCP, SSEANYCRAWL_MCP_PORT: default 3000ANYCRAWL_SSE_PORT: default 3001CLOUD_SERVICE: true to extract API key from /{API_KEY}/... or headersANYCRAWL_BASE_URL: default https://api.anycrawl.devConfiguring Cursor. Note: Requires Cursor v0.45.6+.
For Cursor v0.48.6 and newer, add this to your MCP Servers settings:
{
"mcpServers": {
"anycrawl-mcp": {
"command": "npx",
"args": ["-y", "anycrawl-mcp"],
"env": {
"ANYCRAWL_API_KEY": "YOUR-API-KEY"
}
}
}
}
For Cursor v0.45.6:
env ANYCRAWL_API_KEY=YOUR-API-KEY npx -y anycrawl-mcp
On Windows, if you encounter issues:
cmd /c "set ANYCRAWL_API_KEY=YOUR-API-KEY && npx -y anycrawl-mcp"
For manual installation, add this JSON to your User Settings (JSON) in VS Code (Command Palette → Preferences: Open User Settings (JSON)):
{
"mcp": {
"inputs": [
{
"type": "promptString",
"id": "apiKey",
"description": "AnyCrawl API Key",
"password": true
}
],
"servers": {
"anycrawl": {
"command": "npx",
"args": ["-y", "anycrawl-mcp"],
"env": {
"ANYCRAWL_API_KEY": "${input:apiKey}"
}
}
}
}
}
Optionally, place the following in .vscode/mcp.json in your workspace to share config:
{
"inputs": [
{
"type": "promptString",
"id": "apiKey",
"description": "AnyCrawl API Key",
"password": true
}
],
"servers": {
"anycrawl": {
"command": "npx",
"args": ["-y", "anycrawl-mcp"],
"env": {
"ANYCRAWL_API_KEY": "${input:apiKey}"
}
}
}
}
Add this to ~/.codeium/windsurf/model_config.json:
{
"mcpServers": {
"mcp-server-anycrawl": {
"command": "npx",
"args": ["-y", "anycrawl-mcp"],
"env": {
"ANYCRAWL_API_KEY": "YOUR_API_KEY"
}
}
}
}
Add AnyCrawl MCP server using the claude mcp add command:
claude mcp add --transport stdio anycrawl -e ANYCRAWL_API_KEY=your-api-key -- npx -y anycrawl-mcp
Add this to your Claude Desktop configuration file:
~/Library/Application Support/Claude/claude_desktop_config.json%APPDATA%\Claude\claude_desktop_config.json{
"mcpServers": {
"anycrawl": {
"command": "npx",
"args": ["-y", "anycrawl-mcp"],
"env": {
"ANYCRAWL_API_KEY": "YOUR_API_KEY"
}
}
}
}
The SSE (Server-Sent Events) mode provides a web-based interface for MCP communication, ideal for web applications, testing, and integration with web-based LLM clients.
ANYCRAWL_MODE=SSE ANYCRAWL_API_KEY=YOUR-API-KEY npx -y anycrawl-mcp
# Or using npm scripts
ANYCRAWL_API_KEY=YOUR-API-KEY npm run dev:sse
Optional server settings for local/self-hosted deployments:
export ANYCRAWL_PORT=3000 # Default: 3000
export ANYCRAWL_HOST=127.0.0.1 # Set to override cloud default (mcp.anycrawl.dev)
curl -s http://localhost:${ANYCRAWL_PORT:-3000}/health
# Response: ok
For other MCP/SSE clients that support SSE transport, use this configuration:
{
"mcpServers": {
"anycrawl": {
"type": "sse",
"url": "https://mcp.anycrawl.dev/{API_KEY}/sse",
"name": "AnyCrawl MCP Server",
"description": "Web scraping and crawling tools"
}
}
}
or
{
"mcpServers": {
"AnyCrawl": {
"type": "streamable_http",
"url": "https://mcp.anycrawl.dev/{API_KEY}/mcp"
}
}
}
Environment Setup:
# Start SSE server with API key
ANYCRAWL_API_KEY=your-api-key-here npm run dev:sse
Configure Cursor to connect to your HTTP MCP server.
Local HTTP Streamable Server:
{
"mcpServers": {
"anycrawl-http-local": {
"type": "streamable_http",
"url": "http://127.0.0.1:3000/mcp"
}
}
}
Cloud HTTP Streamable Server:
{
"mcpServers": {
"anycrawl-http-cloud": {
"type": "streamable_http",
"url": "https://mcp.anycrawl.dev/{API_KEY}/mcp"
}
}
}
Note: For HTTP modes, set ANYCRAWL_API_KEY (and optional host/port) in the server process environment or in the URL. Cursor does not need your API key when using streamable_http.
anycrawl_scrape)Scrape a single URL and extract content in various formats.
Best for:
Parameters:
url (required): The URL to scrapeengine (optional): Scraping engine (auto, playwright, cheerio, puppeteer; default: auto)formats (optional): Output formats (markdown, html, text, screenshot, screenshot@fullPage, rawHtml, json)proxy (optional): Proxy URLtimeout (optional): Timeout in milliseconds (default: 300000)retry (optional): Whether to retry on failure (default: false)wait_for (optional): Wait time for page to loadinclude_tags (optional): HTML tags to includeexclude_tags (optional): HTML tags to excludejson_options (optional): Options for JSON extractionExample:
{
"name": "anycrawl_scrape",
"arguments": {
"url": "https://example.com",
"formats": ["markdown", "html"],
"timeout": 30000
}
}
anycrawl_crawl)Start a crawl job to scrape multiple pages from a website. By default this waits for completion and returns aggregated results using the SDK's client.crawl (defaults: poll every 3 seconds, timeout after 60 seconds).
Best for:
Parameters:
url (required): The base URL to crawlengine (optional): Scraping engine (auto, playwright, cheerio, puppeteer; default: auto)max_depth (optional): Maximum crawl depth (default: 10)limit (optional): Maximum number of pages (default: 100)strategy (optional): Crawling strategy (all, same-domain, same-hostname, same-origin)exclude_paths (optional): URL patterns to excludeinclude_paths (optional): URL patterns to includescrape_options (optional): Options for individual page scrapingpoll_seconds (optional): Poll interval seconds for waiting (default: 3)timeout_ms (optional): Overall timeout milliseconds for waiting (default: 60000)Example:
{
"name": "anycrawl_crawl",
"arguments": {
"url": "https://example.com/blog",
"max_depth": 2,
"limit": 50,
"strategy": "same-domain",
"poll_seconds": 3,
"timeout_ms": 60000
}
}
Returns: { "job_id": "...", "status": "completed", "total": N, "completed": N, "creditsUsed": N, "data": [...] }.
anycrawl_crawl_status)Check the status of a crawl job.
Parameters:
job_id (required): The crawl job IDExample:
{
"name": "anycrawl_crawl_status",
"arguments": {
"job_id": "7a2e165d-8f81-4be6-9ef7-23222330a396"
}
}
anycrawl_crawl_results)Get results from a crawl job.
Parameters:
job_id (required): The crawl job IDskip (optional): Number of results to skip (for pagination)Example:
{
"name": "anycrawl_crawl_results",
"arguments": {
"job_id": "7a2e165d-8f81-4be6-9ef7-23222330a396",
"skip": 0
}
}
anycrawl_cancel_crawl)Cancel a pending crawl job.
Parameters:
job_id (required): The crawl job ID to cancelExample:
{
"name": "anycrawl_cancel_crawl",
"arguments": {
"job_id": "7a2e165d-8f81-4be6-9ef7-23222330a396"
}
}
anycrawl_search)Search the web using AnyCrawl search engine.
Best for:
Parameters:
query (required): Search queryengine (optional): Search engine (google)limit (optional): Maximum number of results (default: 10)offset (optional): Number of results to skip (default: 0)pages (optional): Number of pages to searchlang (optional): Language codecountry (optional): Country codescrape_options (required): Options for scraping search resultssafeSearch (optional): Safe search level (0=off, 1=moderate, 2=strict)Example:
{
"name": "anycrawl_search",
"arguments": {
"query": "latest AI research papers 2024",
"engine": "google",
"limit": 5,
"scrape_options": {
"formats": ["markdown"]
}
}
}
Clean, structured markdown content perfect for LLM consumption.
Raw HTML content with all formatting preserved.
Plain text content with minimal formatting.
Visual screenshot of the page.
Full-page screenshot including content below the fold.
Unprocessed HTML content.
Structured data extraction using custom schemas.
The server provides comprehensive error handling:
The server includes detailed logging:
Set log level with environment variable:
export LOG_LEVEL=debug # debug, info, warn, error
git clone <repository>
cd anycrawl-mcp
npm ci
npm run build
npm test
npm run lint
npm run format
npm testMIT License - see LICENSE file for details
AnyCrawl is a powerful Node.js/TypeScript crawler that turns websites into LLM-ready data and extracts structured SERP results from Google/Bing/Baidu/etc. It features native multi-threading for bulk processing and supports multiple output formats.
Run Claude Code as an MCP server so any agent can delegate coding tasks to it
Browser automation using accessibility snapshots instead of screenshots
Google's universal MCP server supporting PostgreSQL, MySQL, MongoDB, Redis, and 10+ databases
Official GitHub integration for repos, issues, PRs, and CI/CD workflows