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 分