CrawMcp
Self-hosted MCP server for web crawling that bypasses anti-bot walls and JS challenges, using RabbitMQ, MinIO, and Redis for asynchronous content handling with automatic cleanup.
README
CrawMcp
Gives Claude (or any MCP client) a web-crawling capability that runs on your own server. It fetches pages blocked by anti-bot walls, JS challenges, or IP bans, without depending on paid, quota-limited scraping services like Firecrawl, Bright Data, or Browserbase. Bring your own proxy, self-host it, and content is deleted automatically by TTL. License: AGPL-3.0.
A URL-crawling MCP server. The model (Claude) cannot send requests directly to most sites. Instead it hands the URL to this MCP, and the MCP writes it to RabbitMQ. A separate real crawler (worker) picks it up from the queue, opens the page, writes the content to MinIO, and sends only a pointer to the queue. The MCP reads that pointer, fetches the content from MinIO, and returns it to the model.
Heavy page content lives in MinIO (object store), job status/metadata lives in Redis, and RabbitMQ only carries small messages. This is the classic Claim Check pattern.
Claude ──[crawl_url]──▶ MCP ──publish(url)──▶ RabbitMQ: crawl.requests
│ │
(metadata to Redis) crawler: opens the page
│ │
│ content ─▶ MinIO: crawl/<jobId> (gzip)
│ │
Claude ◀─[crawl_result]─ MCP ◀── pointer+meta ── RabbitMQ: crawl.results
│
MCP fetches content from MinIO by storageKey
- RabbitMQ = transport pipe (messages are small, deleted once acked).
- Redis
crawmcp:job:<id>= status + metadata (NO text; has TTL, shared). - MinIO
crawl/<jobId>= heavy content (gzipped, the real persistent home).
crawl_url returns a job_id right away (does not block). You fetch the content with
crawl_result using that job_id. It returns pending until the worker finishes.
Tools
| Tool | What it does |
|---|---|
crawl_url |
{ url } → writes to RabbitMQ, returns job_id |
crawl_result |
{ job_id, max_length? } → pending / page content (from MinIO) / error |
crawl_forget |
{ job_id } → deletes content from MinIO and metadata from Redis (manual/early cleanup) |
Content cleanup (deletion)
To stop content from piling up, job lifetime = content lifetime:
- In sync with TTL (automatic): when the job record in Redis expires per
JOB_TTL_SECONDS, the MCP catches it via a Redis expired event and deletes the matching MinIO object (crawl/<jobId>). (The MCP setsnotify-keyspace-eventsitself at startup.) - Lifecycle backstop: in case an event is missed, a day-based expiry rule on the
bucket (
CONTENT_BACKSTOP_DAYS, default 1 day) stands as a safety net. - Manual/early:
crawl_forget(job_id)deletes the content + metadata immediately.
Setup
npm install
npm run build
Running
npm run infra:up # RabbitMQ + Redis + MinIO + worker-rs (Rust crawler), docker
npm run build # build the MCP server → dist/
# The MCP server is started by the client (Claude Code/Desktop); standalone too: npm start
# npm run worker:example → pure-JS reference worker (contract/local test; production = worker-rs)
UIs: RabbitMQ → http://localhost:15672 (guest/guest), MinIO → http://localhost:9001 (minioadmin/minioadmin). To stop: npm run infra:down.
Adding it to Claude Code
claude mcp add crawmcp -- node <abs>/dist/index.js # <abs> = absolute path of this repo
Message contract (between crawler and MCP)
This is all you need to know when writing your own crawler. Heavy text does not go in the message. The crawler writes content to MinIO and sends a pointer to the queue.
Request, MCP → crawl.requests:
{ "jobId": "crawl_1_...", "url": "https://...", "requestedAt": 1730000000000, "storageKey": "crawl/crawl_1_..." }
Result, crawler → crawl.results (first write the content gzipped to storageKey, then):
{
"jobId": "crawl_1_...",
"result": {
"ok": true,
"status": 200,
"contentType": "text/html",
"size": 528,
"storageKey": "crawl/crawl_1_...",
"encoding": "gzip"
}
}
On error: { "jobId": "...", "result": { "ok": false, "error": "..." } }
The MCP suggests the
storageKey(crawl/<jobId>). If the crawler uses a different key, it just needs to report the key it wrote in the result. The MCP reads the content with that key. Ifencoding: "gzip", the MCP decompresses it.
Crawler / worker
Production crawler: worker-rs. A Rust multi-strategy scraper
(TLS-fingerprint HTTP strategies + a real-Chromium --dump-dom BrowserFetch fallback,
JS-challenge solver, optional proxy rotation). It runs as the worker-rs service in
docker-compose.yml (npm run infra:up starts it).
worker/example-worker.mjs is a minimal pure-JS reference.
It shows the message contract (fetch → gzip → MinIO → pointer), for local testing (npm run worker:example). Any worker that follows the contract above works with this MCP without
changes.
Environment variables
| Variable | Default |
|---|---|
RABBITMQ_URL |
amqp://guest:guest@localhost:5672 |
REDIS_URL |
redis://localhost:6379 |
CRAWL_REQUEST_QUEUE |
crawl.requests |
CRAWL_RESULT_QUEUE |
crawl.results |
JOB_TTL_SECONDS |
3600 (lifetime of metadata in Redis) |
MINIO_ENDPOINT |
http://localhost:9000 |
MINIO_ACCESS_KEY / MINIO_SECRET_KEY |
minioadmin / minioadmin |
MINIO_BUCKET |
crawl-content |
S3_REGION |
us-east-1 |
CONTENT_BACKSTOP_DAYS |
1 (lifecycle safety net; the real deletion is by TTL) |
Because it uses the AWS SDK, you can switch to Cloudflare R2 / AWS S3 with the same code by changing
MINIO_ENDPOINTand the keys.
Notes
- Data placement: content → MinIO (gzip), metadata/pointer → Redis, RabbitMQ stays light. This way heavy HTML neither bloats Redis RAM nor strains the queue.
- Multiple MCP instances can run because job status is shared in Redis.
- Cleanup: content is deleted in sync with the job TTL (Redis expired-event → MinIO
delete) + day-based lifecycle backstop + manual
crawl_forget. See "Content cleanup". - Note: Redis expired events are not 100% guaranteed delivery (they can be missed if the listener is down at that moment). The backstop exists for exactly this.
- Not yet present: retry, per-job timeout, dead-letter queue (DLQ), returning extracted text/markdown instead of raw content. Added when needed.
License
AGPL-3.0-only, see LICENSE. Use, modify, and self-host it freely. The one condition: if you offer this to others as a network service (hosted SaaS), you must also share the source of your changes under AGPL.
worker-rs statically links the GPL-3.0 licensed wreq-util crate, so it is already under
copyleft. AGPL-3.0 is compatible with it and covers the whole project under one license.
Contributing
See CONTRIBUTING.md and, for architecture notes, docs/ARCHITECTURE.md.
推荐服务器
Baidu Map
百度地图核心API现已全面兼容MCP协议,是国内首家兼容MCP协议的地图服务商。
Playwright MCP Server
一个模型上下文协议服务器,它使大型语言模型能够通过结构化的可访问性快照与网页进行交互,而无需视觉模型或屏幕截图。
Magic Component Platform (MCP)
一个由人工智能驱动的工具,可以从自然语言描述生成现代化的用户界面组件,并与流行的集成开发环境(IDE)集成,从而简化用户界面开发流程。
Audiense Insights MCP Server
通过模型上下文协议启用与 Audiense Insights 账户的交互,从而促进营销洞察和受众数据的提取和分析,包括人口统计信息、行为和影响者互动。
VeyraX
一个单一的 MCP 工具,连接你所有喜爱的工具:Gmail、日历以及其他 40 多个工具。
graphlit-mcp-server
模型上下文协议 (MCP) 服务器实现了 MCP 客户端与 Graphlit 服务之间的集成。 除了网络爬取之外,还可以将任何内容(从 Slack 到 Gmail 再到播客订阅源)导入到 Graphlit 项目中,然后从 MCP 客户端检索相关内容。
Kagi MCP Server
一个 MCP 服务器,集成了 Kagi 搜索功能和 Claude AI,使 Claude 能够在回答需要最新信息的问题时执行实时网络搜索。
e2b-mcp-server
使用 MCP 通过 e2b 运行代码。
Neon MCP Server
用于与 Neon 管理 API 和数据库交互的 MCP 服务器
Exa MCP Server
模型上下文协议(MCP)服务器允许像 Claude 这样的 AI 助手使用 Exa AI 搜索 API 进行网络搜索。这种设置允许 AI 模型以安全和受控的方式获取实时的网络信息。