fast-webfetch-mcp
fast-webfetch-mcp
一个网页抓取 MCP 服务器,使用您自己机器上运行的真实浏览器渲染页面,然后将干净的 Markdown 交给模型,而不是为 2MB 的 JavaScript 支付 token 账单。
这里的抓取完全免费:无需 API 密钥,没有按页计费。而且当某个网站声称阻止您时,通常只是一个无头检测脚本,真实的 Chromium 可以直接绕过。
工作原理
两个小程序,一个任务:
MCP client (agent)
│ JSON-RPC over stdio
▼
src/index.ts Bun + MCP SDK — tool schemas, budgets, rendering
│ spawns per request
▼
crawl4ai_worker.py Python + Crawl4AI — headless Chromium, markdown extraction
│
▼
The actual internetTypeScript 服务器负责策略:超时、并发许可、输出截断、可选的 Gemini 驱动的摘要。Python 工作进程负责机制:浏览器生命周期、渲染、重试。两者互不干涉,它们之间的契约是 stdout 上的一个 JSON 文档。
Related MCP server: crawler-mcp
安装
要求:Bun、Python 3.12+,以及首次下载浏览器时所需的与 GPU 无关的耐心。
git clone <this repo> ~/.local/share/mcp/fast-webfetch-mcp # or anywhere
cd ~/.local/share/mcp/fast-webfetch-mcp
bun install
uv venv .venv --python 3.12 && uv pip install --python .venv/bin/python crawl4ai验证浏览器端是否正常工作:
FAST_WEBFETCH_SMOKE_URL=https://example.com bun run src/index.ts您应该会看到示例域名的 Markdown。如果看到关于 Playwright 浏览器的堆栈跟踪,请从 venv 运行 crawl4ai-setup 并重试——它会为您安装正确的 Chromium 构建。
接入您的代理
{
"mcpServers": {
"fast-webfetch": {
"type": "stdio",
"command": "/usr/bin/mullvad-exclude",
"args": ["/home/you/.bun/bin/bun", "run", "/path/to/fast-webfetch-mcp/src/index.ts"],
"env": { "PATH": "/home/you/.bun/bin:/usr/bin:/bin" }
}
}
}mullvad-exclude 包装器是可选的;它只是让抓取流量绕过 VPN,以便网站看到您的真实 IP。普通的 "command": "bun" 也能同样工作。
工具
fast_fetch — 一个 URL 到 Markdown
参数 | 类型 | 默认值 | 说明 |
| string | 必填 | |
| string | — | 如果设置,则返回基于事实的答案,而不是完整页面 |
| number | 40,000 | 中间截断保留开头和结尾 |
| boolean | false | 将上限提高到 100,000 字符 |
| number | 25,000 | 硬性上限,包括浏览器渲染 |
| object | — | 每次调用的渲染选项,见下文 |
fast_fetch_raw — 一个 URL 到原始 HTML
参数与上面相同,但不包括 prompt。当 Markdown 丢失了您需要的内容时使用:表格、data- 属性、meta 标签、精确的标记。
options 对象
所有三个工具都接受一个可选的 options 对象,用于需要比简单加载并抓取更多功能的网站:
{
"url": "https://example.com/feed",
"options": { "full_page": true, "wait_seconds": 1.5, "drop_overlays": true }
}键 | 类型 | 效果 |
| boolean | 在提取前滚动整个页面——捕获懒加载和无限滚动内容。较慢;在无限信息流上会一直滚动直到超时 |
| number | 捕获前的稳定延迟,例如对延迟水合页面使用 |
| boolean | 将 iframe 内容纳入结果 |
| boolean | 在提取前移除 Cookie 横幅和弹窗 |
拼写错误的键会被静默丢弃,而不是传递——选项负载在 Python 端会变成 CrawlerRunConfig 标志。
fast_fetch_multiple — 一次批量抓取最多 15 个 URL
参数 | 类型 | 默认值 | 说明 |
| string[] | 必填 | 1–15 个绝对 http(s) URL |
| number | 40,000 | 每个 URL |
| boolean | false | 每个 URL |
| number | 25,000 | 整个批次共享 |
| object | — | 相同的选项,应用于每个 URL |
每个 URL 都会作为独立部分返回,并带有元数据头(url、status、elapsed_ms、truncated)。一个慢速网站不会饿死其他网站——它只会收到逐项超时错误,而同一批次的其他网站则成功。
配置
全部可选,全部通过环境变量。
服务器旋钮
变量 | 默认值 | 用途 |
|
| 默认每页字符上限 |
|
|
|
|
| 默认抓取超时 |
|
| 并行浏览器槽位(最大 32) |
| 未设置 |
|
|
| 工作进程解释器 |
|
| 工作进程路径 |
| — | 仅用于 |
浏览器旋钮
变量 | 默认值 | 用途 |
| 开启( | 反检测补丁:webdriver 标志、插件、WebGL 供应商、Chrome API。设置为 |
| 关闭 | 出口代理 |
|
| Playwright 等待策略 |
| 关闭 | 提取前滚动——也可通过 |
|
| HTML 捕获前的稳定时间——也可通过 |
值得了解的行为
JS 密集型网站在默认等待策略下通常返回空壳。当返回 200 但没有内容时,工作进程会在同一超时预算内使用 networkidle 重试一次——最坏情况是等待一次,而不是两次。与此同时,连接失败和 HTTP 错误保持单次尝试:重试一个死主机只是更慢地失败。
fast_fetch 和 fast_fetch_multiple 共享同一个 12 个浏览器槽位的池,因此大批量不会饿死并发的单个抓取。超出池的需求会排队;请求的槽位多于现有数量的批次会获得空闲的槽位。
最后,max_length 的存在是因为您的代理的上下文窗口是一个预算,而不是一个垃圾填埋场。
出问题时,您会得到一个日志路径
失败被分为两类:互联网不稳定(超时、慢速网站、逐项批次截止错误)和工具实际损坏(工作进程无法启动、工作进程崩溃、stdout 溢出、无法解析的输出)。只有第二类会写入日志——第一类只会得到一个诚实的错误标签。
工具端失败以以下内容结束:
log: /path/to/fast-webfetch-mcp/logs/2026-08-22T09-02-06-780Z-fast_fetch.json其中包含:工具、精确参数、工作进程输入以及完整的失败记录(阶段、退出代码、信号、stderr 尾部)——足以逐字重放请求:
FAST_WEBFETCH_INPUT='{"url":"https://example.com","max_length":40000}' \
.venv/bin/python crawl4ai_worker.py使用 FAST_WEBFETCH_LOGS_DIR 重定向。
保持在 30 秒以内
代理框架往往会在 30 秒左右终止 MCP 调用,因此此服务器将 28 秒视为硬性上限。每个工具都会在此之前响应:如果抓取成功则返回完成的结果,否则返回结构化的逐项错误,说明哪个阶段消耗了时间。预算耗尽的批次仍会返回已完成的项目。
故障排除
症状 | 可能的原因和修复 |
| 仓库已移动;检查 |
|
|
某个网站上的所有请求都超时 | 网站确实很慢或具有敌意;尝试 |
某些项目出现 | 预期情况:共享 25 秒预算,掉队者会收到逐项错误 |
SPA 上的空 Markdown | 应通过重试自愈;如果没有,提高 |
开发
bun install
bun test # 18 tests, no network needed
bun run typecheck # tsc --noEmit, strict + noUncheckedIndexedAccessPython 工作进程可以直接驱动,这是在没有 MCP 层的情况下调试抓取行为的最快方式:
FAST_WEBFETCH_INPUT='{"url":"https://example.com","max_length":500}' \
.venv/bin/python crawl4ai_worker.py另请参阅
ddg-search — 自然的前端:搜索,然后将结果 URL 交给此服务器
Crawl4AI — 底层的爬取引擎
Model Context Protocol — 传输协议
许可证
MIT。
This server cannot be installed
Maintenance
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Related MCP Servers
- AlicenseAqualityBmaintenanceMCP server that lets Claude Code fetch web content using real Chrome browsers. Renders JavaScript-heavy pages, handles bot mitigation, and runs up to 14 parallel browsers locally with zero API keys. Makes outbound HTTP requests only to URLs the user explicitly asks Claude to fetch.21491MIT
- FlicenseAqualityCmaintenanceWeb-crawler MCP server that fetches web pages with static parsing or headless browser fallback, enabling Claude to fetch, extract links, crawl sites, and select content via CSS selectors.4
- AlicenseAqualityCmaintenanceAn MCP server that enables AI assistants to fetch web content in multiple formats (HTML, JSON, text, Markdown) with intelligent content extraction, chunk management, and browser automation support.55215MIT
- AlicenseNot gradedqualityBmaintenanceAn open-source web retrieval MCP server that fetches, crawls, and searches the web, returning clean markdown for AI agents. It integrates with Claude MCP, LangChain, and other frameworks for agentic web access.1MIT
Related MCP Connectors
Zenrows MCP server — Fetch, Extract, Batch, and Browser Sessions for AI coding assistants
Firecrawl MCP — wraps the Firecrawl API (firecrawl.dev) for web
SEO MCP server: crawl your site, find AI-visibility gaps, and ship the fix from your coding agent.
Latest Blog Posts
- Who's Calling? MCP Hosts Are an Identity Blind Spot (And the Spec Knows It)By Om-Shree-0709 on .mcpAgent IdentityOAuth 2.1
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
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/NikkeTryHard/fast-webfetch-mcp'
If you have feedback or need assistance with the MCP directory API, please join our Discord server