
Web Fetcher
io.github.vojtisprime11由 GitHub 帳號 vojtisprime11 發布v0.1.0更新於 Oct 24, 2026
Turns any web page into clean Markdown, page metadata and classified links for LLMs.
發布方自己的服務:App Store data for agents
概覽
一個本機 MCP 伺服器,擷取網頁並回傳乾淨的 Markdown、結構化中繼資料與分類連結,供助理閱讀。
- 可以做什麼
- 擷取網頁並回傳乾淨、可分頁的 Markdown,可選擇保留連結、圖片與中繼資料摘要,並用 startIndex 在多次呼叫間續讀長頁面。擷取頁面中繼資料,如標題、描述、標準網址、語言、作者、日期、Open Graph、Twitter 卡片、JSON-LD、標題大綱、訂閱來源與 HTTP 回應標頭。擷取連結,含錨文字、rel 與 nofollow 標記、站內與站外分類、範圍篩選、去重與數量上限。失敗時回傳帶型別的錯誤碼、可重試標記與復原提示。
- 適用情境
- 適合助理需要閱讀或摘要網頁文章、依中繼資料判斷頁面類型,或整理外連而不把原始 HTML 塞進上下文時使用。適用於靜態 HTML 頁面;用戶端渲染的單頁應用、PDF 與需登入的網站不在範圍內。
- 執行需求
- 以 npm 套件(mcp-server-web-fetcher)形式透過 stdio 在本機執行,需要 Node.js 20.18.1 或更新版本;文件也提供 Docker 映像與原始碼建置方式。無需帳號或 API 金鑰。需要對外 HTTPS 網路存取。所有設定皆為選用,透過環境變數設定,例如 WEB_FETCHER_TIMEOUT_MS、WEB_FETCHER_MAX_BYTES、WEB_FETCHER_RESPECT_ROBOTS、WEB_FETCHER_USER_AGENT 與 WEB_FETCHER_ALLOW_PRIVATE_HOSTS。
安裝
在 SourceWeft 中
- 開啟 儀表板中的 Web Fetcher,將其新增到工作區。
- 為需要使用其工具的對話啟用該服務。
Desktop only,透過 STDIO。 STDIO 服務會啟動本機處理程序,因此需要 SourceWeft 桌面主機。
其他 MCP 客戶端
參照 儲存庫 中的啟動說明。
README
mcp-server-web-fetcher
[CI] [npm version] [License: MIT] [TypeScript] [Node.js] [MCP] [MCP Registry]
A fast, dependency-light Model Context Protocol server that turns any web page into something a language model can actually read: clean Markdown, structured metadata, and a classified list of links.
Web pages are 90% chrome. Scripts, cookie banners, navigation, sidebars and tracking pixels burn context and derail reasoning. This server strips all of that on the way in, so the model sees the article and nothing else.
Features
- Clean Markdown output. Readability-style main-content detection, GFM tables, language-tagged code fences, absolute links. No leftover HTML, even for gnarly nested tables.
- Context-window aware. Long pages are paginated with
startIndex/nextStartIndexinstead of being silently cut in half. - Structured metadata. Title, description, canonical,
lang, author, publish/modify dates, Open Graph, Twitter cards, JSON-LD,hreflangalternates, RSS/Atom feeds, h1–h6 outline and raw HTTP headers. - Link intelligence. Absolute URLs, anchor text,
rel,nofollow, internal vs external classification, scope filters, de-duplication. - SSRF hardening. Loopback, private, link-local and cloud-metadata addresses are blocked on every redirect hop, not just the first request. Credentials in URLs are stripped.
- Predictable failures. Every error carries a stable machine-readable
code(TIMEOUT,HTTP_ERROR,BLOCKED_HOST,RESPONSE_TOO_LARGE, …), a retryability flag and a recovery hint, so the model can self-correct instead of guessing. - Typed end to end. Strict Zod input schemas plus published
outputSchema, so clients get validatedstructuredContent, not prose they have to re-parse. - Well behaved. Byte caps, timeouts, redirect limits, charset sniffing (including legacy
encodings), a small TTL cache, transient-failure retries and optional
robots.txtenforcement. - 115 tests, no network required. Vitest unit tests plus in-memory MCP protocol tests.
Quickstart
Requires Node.js 20.18.1 or newer (inherited from cheerio, which needs undici 7).
The server speaks MCP over stdio, so on its own it just waits for a client. Point a client at it:
Claude Desktop
~/Library/Application Support/Claude/claude_desktop_config.json on macOS,
%APPDATA%\Claude\claude_desktop_config.json on Windows:
With configuration, using a global install:
Restart Claude Desktop, then ask it to summarise a URL.
Claude Code
Kiro, Cursor, Windsurf and other MCP clients
Same shape, in .kiro/settings/mcp.json / the client's MCP config file:
MCP Registry
The server is listed in the official MCP Registry
as io.github.vojtisprime11/web-fetcher, so clients that read the registry can discover it
directly:
Docker
The image runs as the unprivileged node user and carries production dependencies only. CI builds
it and drives it with a real MCP client, so it is verified to start and answer introspection.
From source
Tools
All three tools are read-only, idempotent and open-world (annotated as such in the protocol), and
all take an absolute http(s) URL.
fetch_page_markdown
Downloads a page and returns clean, LLM-friendly Markdown.
Request:
structuredContent:
To read the rest, call again with "startIndex": 7984. Keep going while nextStartIndex is not
null.
extract_metadata
Everything a model needs to classify a page, without spending context on its body.
structuredContent (abridged):
extract_links
structuredContent:
www.example.com and example.com count as the same site; blog.example.com does not.
Error handling
Failures come back as MCP tool errors (isError: true), never as silent empty results:
structuredContent.error carries the same information as JSON: { code, message, retryable, url, status }.
Timeouts, 5xx, 408 and 429 responses are retried once automatically before the error surfaces.
Configuration
Everything is optional; the defaults are safe.
Security
- SSRF guard on by default. Hostnames are resolved and checked against loopback, RFC 1918,
CGNAT, link-local (including
169.254.169.254), multicast and IPv4-mapped IPv6 ranges — for the initial URL and every redirect target.localhost,*.localhostand*.internalare refused outright. Turning the guard off is an explicit opt-in. - Byte and time caps. Responses are streamed and cut at the byte cap; every request is aborted at the timeout. Content-Length larger than the cap is rejected before download.
- No code execution. JavaScript is never run;
<script>,<style>,<iframe>and friends are removed before conversion. Fetched content is data, not instructions — treat page text reaching a model as untrusted input. - Credentials stripped.
user:pass@is removed from URLs before the request is made. - Read-only. The server has no write, filesystem or shell surface, and no authentication state.
Found a vulnerability? See SECURITY.md.
Architecture
Tool handlers take an injectable fetchImpl, so every test runs offline against a scripted HTTP
stub. The library is also importable directly:
Development
The minimum supported Node.js version is 20.18.1, which comes from cheerio (it depends on undici 7,
and undici 7 needs the File global that landed in Node 20). CI runs the suite on Node 20/22/24 and
has a separate job that completes an MCP handshake against the built server on exactly 20.18.1, so
the declared floor is verified rather than assumed.
Contributions welcome — see CONTRIBUTING.md and CODE_OF_CONDUCT.md.
Limitations
- Static HTML only. Client-rendered SPAs return whatever the server sends; no headless browser.
- No PDF or Office document extraction.
- Sites behind bot protection (Cloudflare challenges, login walls) will return 403.
- Main-content detection is a text-density heuristic. Use
mainContentOnly: falsewhen a page has an unusual structure.
Roadmap
search_pagetool: return only the sections matching a query.- Optional headless rendering behind a flag, for JS-only pages.
- Streamable HTTP transport in addition to stdio.
- Conditional requests (
ETag/If-Modified-Since) in the cache layer.
Acknowledgements
Built on the MCP TypeScript SDK, cheerio, turndown and zod.
License
MIT © Vojta Holes and contributors
來源:README.md,提交 3458d5e
工具
0版本歷史
1- v0.1.0最新Sep 16, 2026
評分
已滿足適用檢查項的 50%
該評分衡量此收錄條目的完整程度,依據註冊中心條目、端點與公開來源計算得出。它不是對伺服器本身的評價,也不表示伺服器安全或目前可用:可連通性是帶日期的檢查結果,評分也不包含安裝量或使用者評價。
- 近 30 天內可連通25 分
請保持端點能夠回應 MCP 握手;SourceWeft 每 30 天探測一次。
- 已宣告認證方式10 分
請在註冊中心條目中宣告憑證請求標頭,或保持端點能夠回應探測,以便判定其認證方式。
- 已列出工具15 分
請讓伺服器在無憑證時回應 tools/list,或發布可在沙箱中無憑證啟動的軟體包。
- 描述必需15 分
- 圖示10 分
- 文件15 分
- 授權條款10 分
