Render Fetch MCP

Render Fetch MCP

MCP server that retrieves bot-unfriendly page content as Markdown and screenshots as vision-ready image tiles, escalating through increasingly sophisticated extraction tiers (plain HTTP, trafilatura, TLS impersonation, headless Chromium) only as needed.

Category
访问服务器

README

Render Fetch MCP

MCP server for retrieving bot-unfriendly page content.

A self-hosted remote MCP server that returns the readable content of a URL as Markdown — and, on request, a screenshot — escalating to headless Chromium only when cheaper methods fail. Connects to claude.ai as a custom connector.

Built for one operator, low request frequency, latency-tolerant. Correctness and clarity of failure beat speed everywhere.

Upstream: sidney/web-to-markdown-mcp (MIT), vendored at a pinned SHA — see DECISIONS.md.

Tools

fetch_url_as_markdown

Escalates through four tiers, using the cheapest that produces usable content:

Tier Mechanism Typical cost Handles
1 Plain HTTP GET with Accept: text/markdown ~300 ms Cloudflare Markdown-for-Agents sites, anything doing content negotiation
2 Plain HTTP GET + trafilatura ~500 ms Ordinary static HTML and server-rendered pages
2.5 curl_cffi browser-TLS impersonation + trafilatura ~700 ms Sites blocking on TLS/JA3 fingerprint alone
3 patchright (anti-detection Playwright fork) + Chromium 2–8 s JS-rendered SPAs, soft bot walls, JS-shell pages

Tier 3 is the rare path. It exists so that the rare page is readable at all, not so that it is readable quickly.

Returns a structured envelope:

{
  "content": "<markdown>",
  "tier_used": 1,
  "identity_mode": "stealth",
  "final_url": "https://example.com/",
  "http_status": 200,
  "content_ok": true,
  "truncated": false,
  "next_offset": null,
  "hint": null
}

content_ok is the load-bearing field: false when the extraction looks like a bot-challenge interstitial, a JS shell, a login wall, or is implausibly short. When it is false, hint names the next thing to try — for a wall, that is the Wayback Machine connector, so the calling model stops retrying something that will not start working.

capture_page

Screenshots the rendered page as vision-ready image tiles. Always tier 3.

One tall full-page PNG is close to useless to a vision model: it gets resized until the body text is a few pixels tall, costs a full image's tokens, and conveys nothing. So the page is tiled at a size computed from the model's published token and pixel limits such that no resize happens at all. Blank and near-blank regions are detected by entropy and ink ratio and skipped, with the dropped vertical ranges stated in the response.

Modes: viewport (1 tile, the cheap default), full (tiled), element (single CSS-selected clip).

Cost: ~1334 visual tokens per tile. Four tiles ≈ 5 336; eight ≈ 10 672.

Limits

  • No authenticated or logged-in pages. Clean context, no cookies.
  • Interactive Cloudflare Turnstile, DataDome, PerimeterX and Kasada are not bypassed. Datacenter egress makes encountering them more likely, not less.
  • Slow progressive-render SPAs may return partial content at budget expiry.
  • These are readers, not automation tools. They cannot click, fill, or log in.
  • capture_page is expensive in tokens. Use fetch_url_as_markdown for anything fundamentally textual.

Endpoints

Route Purpose
POST /mcp/<token> The MCP endpoint (streamable HTTP, stateless)
GET /status {"ok", "chromium_present", "identity_mode", "version"} — also at /health and /healthz
GET /.well-known/http-message-signatures-directory Web Bot Auth key

Auth is a secret path segment compared in constant time. A mismatch returns 404, not 403 — a 403 confirms the path space exists.

Use /status in production. Replit's fronting infrastructure intercepts the exact path /healthz on a published Autoscale app and answers with its own branded 404 that never reaches this process, so a /healthz 404 in production says nothing about the app's health. All three names work locally.

Configuration

Secret Default Purpose
MCP_PATH_TOKEN none — required Secret path segment
IDENTITY_MODE stealth stealth or declared
SIGNING_KEY_PEM generated Ed25519 private key for Web Bot Auth
PUBLIC_ORIGIN none Public origin, for signing and own-origin SSRF checks
MAX_CONTENT_CHARS 40000 Truncation cap
POLL_BUDGET_MS 8000 Tier 3 stabilisation budget
TOTAL_BUDGET_MS 55000 Hard wall-clock cap
BROWSER_IDLE_TIMEOUT_S 120 Idle browser reaper
MAX_TILES 4 Screenshot tile cap (hard max 8)
LOG_LEVEL INFO

Identity

stealth (default) presents a realistic browser identity: current Chrome UA, browser header ordering, and curl_cffi TLS impersonation at tier 2.5.

declared self-identifies honestly and signs requests with Web Bot Auth — Ed25519, HTTP Message Signatures (RFC 9421), and a Signature-Agent header pointing at the directory this server publishes. Registering with Cloudflare's bot directory is a later manual step; the plumbing is already here, so registering is a form submission rather than a rebuild.

robots.txt is not consulted in either mode. This server acts for one identified human making individual requests, not as a crawler. See DECISIONS.md for the recorded reasoning and its tension with declared mode.

Local development

python -m venv .venv && .venv/bin/pip install -r requirements-dev.txt
.venv/bin/patchright install chromium
export MCP_PATH_TOKEN=$(python -c "import secrets;print(secrets.token_urlsafe(32))")
.venv/bin/python main.py            # http://localhost:5000
.venv/bin/python -m pytest tests/   # 91 tests

Deployment

Replit Autoscale, 2 vCPU / 4 GiB, max 1 instance.

build : pip install -r requirements.txt && patchright install chromium && python scripts/verify_build.py
run   : python main.py

Chromium is installed at build time (~300 MB, baked into the image) and launched at request time (~2 s, lazily, on the first tier-3 call). Conflating the two is the main way this deployment goes wrong: installing at runtime on a scale-to-zero container means a 300 MB download on every cold start, inside a request timeout.

See WORK-ORDER.md for the console steps, and AGENTS.md for the upstream update policy.

推荐服务器

Baidu Map

Baidu Map

百度地图核心API现已全面兼容MCP协议,是国内首家兼容MCP协议的地图服务商。

官方
精选
JavaScript
Playwright MCP Server

Playwright MCP Server

一个模型上下文协议服务器,它使大型语言模型能够通过结构化的可访问性快照与网页进行交互,而无需视觉模型或屏幕截图。

官方
精选
TypeScript
Magic Component Platform (MCP)

Magic Component Platform (MCP)

一个由人工智能驱动的工具,可以从自然语言描述生成现代化的用户界面组件,并与流行的集成开发环境(IDE)集成,从而简化用户界面开发流程。

官方
精选
本地
TypeScript
Audiense Insights MCP Server

Audiense Insights MCP Server

通过模型上下文协议启用与 Audiense Insights 账户的交互,从而促进营销洞察和受众数据的提取和分析,包括人口统计信息、行为和影响者互动。

官方
精选
本地
TypeScript
VeyraX

VeyraX

一个单一的 MCP 工具,连接你所有喜爱的工具:Gmail、日历以及其他 40 多个工具。

官方
精选
本地
graphlit-mcp-server

graphlit-mcp-server

模型上下文协议 (MCP) 服务器实现了 MCP 客户端与 Graphlit 服务之间的集成。 除了网络爬取之外,还可以将任何内容(从 Slack 到 Gmail 再到播客订阅源)导入到 Graphlit 项目中,然后从 MCP 客户端检索相关内容。

官方
精选
TypeScript
Kagi MCP Server

Kagi MCP Server

一个 MCP 服务器,集成了 Kagi 搜索功能和 Claude AI,使 Claude 能够在回答需要最新信息的问题时执行实时网络搜索。

官方
精选
Python
e2b-mcp-server

e2b-mcp-server

使用 MCP 通过 e2b 运行代码。

官方
精选
Neon MCP Server

Neon MCP Server

用于与 Neon 管理 API 和数据库交互的 MCP 服务器

官方
精选
Exa MCP Server

Exa MCP Server

模型上下文协议(MCP)服务器允许像 Claude 这样的 AI 助手使用 Exa AI 搜索 API 进行网络搜索。这种设置允许 AI 模型以安全和受控的方式获取实时的网络信息。

官方
精选