Fetchmcp

io.github.labtools-studio由 GitHub 账号 labtools-studio 发布v0.1.1更新于 Oct 24, 2026

Drop-in fetch MCP: clean Markdown from any URL, with JS rendering and anti-bot.

概览

AI 生成的概览

本地 MCP 服务器,抓取任意网址并返回干净的 Markdown,需要时渲染 JavaScript 并应对基础反爬。

可以做什么
将网页抓取为干净的 Markdown,可选返回原始 HTML,可限制长度并分页读取长页面,并可控制 JavaScript 渲染或自动识别空壳单页应用。读取文档页面时去除导航栏、页眉和页脚,让 API 文档和指南以干净的参考文本返回。为需要认证的页面附加额外请求头,例如授权或 Cookie 值。以类型化状态报告失败(blocked、blocked_ssrf、needs_js、http_error、timeout、network_error、unsupported_content、empty),而不是把反爬页面或错误页当作正文返回。
适用场景
当助手需要读取普通抓取工具返回空白或被截断的现代 JavaScript 页面和文档时适用。适合作为基础抓取服务器的替代品,以获得完整长度输出、诚实的错误报告和默认阻止私有地址。
运行要求
通过 npx 以 stdio 进程在本地运行,需要 Node.js。无需账号或 API 密钥。静态读取可立即使用;首次遇到需要 JavaScript 的页面时会自动下载一次隐身 Chromium 浏览器(约 150 MB),可通过环境变量预下载或跳过。可选环境变量可调整超时、重试、私有 IP 访问以及可选的自托管 FlareSolverr 端点。需要网络访问。
安装前请注意
服务器会向助手提供的任意网址发起外部请求,因此页面内容和传入的请求头会到达这些站点。额外请求头可能携带授权令牌或 Cookie 等凭据,仅应对信任的站点提供。默认拒绝私有和 localhost 地址,启用私有 IP 访问会扩大本机可访问的范围。除非禁用,首次使用 JavaScript 时会自动下载较大的浏览器二进制文件。

安装

在 SourceWeft 中

  1. 打开 控制台中的 Fetchmcp,将其添加到工作区。
  2. 为需要使用其工具的对话启用该服务。

Desktop only,通过 STDIO。 STDIO 服务会启动本地进程,因此需要 SourceWeft 桌面宿主。

其他 MCP 客户端

参照 仓库 中的启动说明。

README

fetchmcp

A drop-in replacement for the official fetch MCP that actually works on modern web pages.

[npm] [node] [license] [PRs welcome]

The official fetch MCP is broken on JavaScript-heavy pages, truncates output at 5,000 characters, and ships an unpatched SSRF vulnerability. fetchmcp returns clean, LLM-ready Markdown from any URL — rendering JavaScript when needed, passing basic bot protection without paid proxies, and telling you honestly when a page is blocked instead of hallucinating content. npx and go.

[Before and after: the official fetch MCP returns an empty SPA shell, fetchmcp returns clean Markdown]

jsonc
// Replace the official fetch server with this — one line in your MCP config:"fetchmcp": { "command": "npx", "args": ["-y", "@labtoolsstudio/fetchmcp"] }

[Add to Cursor]   [Install in VS Code]

Why switch

official fetchfetchmcp
JavaScript pages❌ empty / broken✅ auto-renders in a real browser
Output length✂️ truncated at 5,000 chars✅ full page, with paging
Bot protection (403 / Cloudflare)❌ fails silently✅ passes mid-tier walls, no paid proxy
Blocked page❌ returns the CAPTCHA as "content"✅ honest typed error, never fakes it
SSRF safety❌ CVE-2025-65513 (CVSS 9.3)✅ private/metadata IPs refused by default
Costfreefree, self-hosted, $0

Install

Add to your MCP client config (claude_desktop_config.json, Cursor mcp.json, Cline, etc.):

jsonc
{  "mcpServers": {    "fetchmcp": {      "command": "npx",      "args": ["-y", "@labtoolsstudio/fetchmcp"]    }  }}

The install is light — no browser is downloaded up front, and static reading (fetch → Readability → Markdown) works immediately. The first time a page actually needs JavaScript, fetchmcp downloads a stealth Chromium once (~150 MB) automatically, then renders it — still zero-config. To pre-download it at install time, set FETCHMCP_PREINSTALL_BROWSER=1. To stay static-only and never download it, set FETCHMCP_SKIP_BROWSER_DOWNLOAD=1 (JS pages then return an honest needs_js).

Tools

read_url

Fetch any web page as clean Markdown.

argtypedescription
urlstringthe URL to fetch (http/https)
renderbooleanJS rendering: true = always, false = never, omitted = automatic (only for empty SPA shells)
rawbooleanreturn raw HTML instead of Markdown
headersobjectextra request headers, e.g. {"Authorization": "Bearer …", "Cookie": "…"}
max_lengthintegercap characters returned (0 = unlimited, the default)
start_indexintegeroffset for paging through a long page

read_docs

Same engine, tuned for documentation: strips navigation sidebars, headers, and footers so API docs and guides come back as clean reference text. Takes url, render, headers, max_length, start_index.

Honest statuses

fetchmcp never returns a bot wall, an error page, or a truncated shell dressed up as real content. When it can't read a page it says why, with a typed status: blocked (bot protection, with the vendor), blocked_ssrf, needs_js, http_error, timeout, network_error, unsupported_content, or empty.

Configuration (env vars)

vardefaultmeaning
FETCHMCP_TIMEOUT_MS30000per-request timeout
FETCHMCP_MAX_RETRIES2retries on network errors / 429 / 503 (with backoff + Retry-After)
FETCHMCP_ALLOW_PRIVATE_IPunsetset to 1 to allow private/localhost IPs (trusted intranet docs)
FETCHMCP_FLARESOLVERR_URLunsetself-hosted FlareSolverr endpoint for tougher challenges
FETCHMCP_SKIP_BROWSER_DOWNLOADunsetset to 1 for static-only: never download Chromium; JS pages return needs_js
FETCHMCP_PREINSTALL_BROWSERunsetset to 1 to download Chromium at install time instead of on first JS use

Development & testing

bash
npm install          # installs deps (Chromium downloads on first JS use)npm run build        # compile TypeScript to dist/npm test             # unit tests (block detection, SSRF) — no networknpm run test:e2e     # live end-to-end suite against real sites
# Poke at any tool/URL by hand — no need to write a script:node test/probe.mjs read_url  https://example.comnode test/probe.mjs read_url  https://some-spa.example.com --rendernode test/probe.mjs read_docs https://docs.python.org/3/library/json.htmlnode test/probe.mjs read_url  https://api.example.com --header "Authorization=Bearer x" --max-length 500node test/probe.mjs read_url  https://example.com --full     # print the whole response

test/probe.mjs --help semantics are documented at the top of that file.

How it works

Three tiers, escalating only as needed:

  1. Static — plain fetch → Readability → Markdown. Fast path for most pages.
  2. Browser — lazy patchright (stealth Chromium) when the static HTML is an empty SPA shell, a bot wall, or a 403/429/503.
  3. FlareSolverr (optional) — only if you've configured an endpoint, for challenges the browser can't clear.

Star history

If fetchmcp saved you from one more fetch-returns-nothing moment, a star helps others find it.

[Star History Chart]

License

MIT — see LICENSE.

来源:README.md,提交 87f95a5

工具

0
SourceWeft 尚未在沙箱中启动过该软件包,因此其工具未知。

版本历史

1
  1. v0.1.1最新Sep 16, 2026

评分

已满足适用检查项的 50%

该评分衡量此收录条目的完整程度,依据注册中心条目、端点与公开来源计算得出。它不是对服务器本身的评价,也不表示服务器安全或当前可用:可连通性是带日期的检查结果,评分也不包含安装量或用户评价。

  • 近 30 天内可连通25 分

    请保持端点能够响应 MCP 握手;SourceWeft 每 30 天探测一次。

  • 已声明认证方式10 分

    请在注册中心条目中声明凭据请求头,或保持端点能够响应探测,以便判定其认证方式。

  • 已列出工具15 分

    请让服务器在无凭据时响应 tools/list,或发布可在沙箱中无凭据启动的软件包。

  • 描述必需15 分
  • 图标10 分
  • 文档15 分
  • 许可证10 分