
Agentfetch
io.github.bch1212由 GitHub 帳號 bch1212 發布v1.0.1更新於 Oct 24, 2026
Token-budgeted web fetch for AI agents — auto-routes Jina, FireCrawl, Trafilatura, PDF.
概覽
本機 MCP 伺服器,把網頁抓取成乾淨的 Markdown,並內建 token 估算、快取,以及在 Jina、FireCrawl、Trafilatura 與 PDF 解析之間自動路由。
- 可以做什麼
- 抓取單一網址,回傳乾淨的 Markdown、中繼資料、token 數與快取資訊
- 在抓取前估算頁面 token 數,避免過大頁面撐爆上下文
- 同時抓取最多 20 個網址,並可限制每頁 token 上限
- 一次呼叫完成網頁搜尋並抓取排名前面的結果
- 依網址類型自動選擇本機解析器、Jina Reader、處理 JS 重度頁面的 FireCrawl 或處理 PDF 的 pypdf,並可選用 Redis 快取
- 適用情境
- 適合助理需要在 token 預算內閱讀網頁或 PDF,並希望用一個工具統一處理內文擷取、快取與 JS 渲染頁面,而不必自行串接多個抓取元件時使用。
- 執行需求
- 以 stdio 方式在本機執行,來自 PyPI 套件 agentfetch-mcp(Python)。建議設定 JINA_API_KEY;FIRECRAWL_API_KEY 為選用,用於 JS 重度頁面;REDIS_URL 為選用,用於快取。未設定 Jina 時僅本機 Trafilatura 可用。需要網路存取。
安裝
在 SourceWeft 中
- 開啟 儀表板中的 Agentfetch,將其新增到工作區。
- 為需要使用其工具的對話啟用該服務。
Desktop only,透過 STDIO。 STDIO 服務會啟動本機處理程序,因此需要 SourceWeft 桌面主機。
其他 MCP 客戶端
參照 儲存庫 中的啟動說明。
README
agentfetch-mcp
Web intelligence for AI agents — an MCP server that fetches URLs with token estimation, smart caching, and intelligent routing built in.
AgentFetch sits between your agent and the open web. Instead of integrating Jina, FireCrawl, pypdf, and your own caching layer separately, agents call one MCP tool and AgentFetch handles routing, caching, token budgeting, and clean Markdown extraction automatically.
This repository contains the open-source MCP server. For the hosted API + dashboard + billing, see www.agentfetch.dev.
What it does
Under the hood, AgentFetch routes URLs to the cheapest effective fetcher:
- Trafilatura (free, local) for ~70% of standard web pages
- Jina Reader for the rest of HTML
- FireCrawl for JS-heavy pages (Twitter/X, LinkedIn, Notion, etc.)
- pypdf for PDFs (zero external cost)
Cache is Redis with a 6-hour TTL; you can bring your own or run without caching.
Quick start
Install from PyPI
Or clone and install locally
Set environment variables
Get a free Jina Reader key at jina.ai (1M tokens/mo free tier). FireCrawl is optional but recommended for JS-heavy pages.
Add to Claude Desktop or Claude Code
Edit your MCP config (~/Library/Application Support/Claude/claude_desktop_config.json on macOS, or run claude mcp add in Claude Code):
Restart Claude. The four tools (fetch_url, estimate_tokens, fetch_multiple, search_and_fetch) appear automatically.
Run as a standalone server
The server speaks MCP over stdio (the standard transport for desktop integrations).
Why agents prefer AgentFetch over generic web fetch
Examples
Fetching with a token budget
Estimating before committing
Parallel fetching
Configuration
Development
Hosted version
If you'd rather not manage your own keys, Redis, or the routing yourself, the hosted version at www.agentfetch.dev gives you:
- Pay-per-call pricing from $0.001/fetch
- 500 free fetches on signup, no credit card
- Managed Redis cache, automatic failover between fetchers
- Dashboard with usage tracking + invoices
The hosted API is a drop-in REST equivalent — same response shapes, same routing logic. You can run the OSS MCP locally and the hosted API in parallel, or migrate between them at any time.
License
MIT — see LICENSE.
The MCP server in this repo is open source. The hosted product, billing, and ops infrastructure live in a separate (private) repo.
Contributing
PRs welcome. If you're adding a new fetcher (e.g., Bright Data, ScrapingBee, etc.), please match the FetchResult interface in agentfetch/core/fetchers/__init__.py and add the cost to the routing logic.
來源:README.md,提交 692a358
工具
0版本歷史
1- v1.0.1最新Sep 16, 2026
評分
已滿足適用檢查項的 50%
該評分衡量此收錄條目的完整程度,依據註冊中心條目、端點與公開來源計算得出。它不是對伺服器本身的評價,也不表示伺服器安全或目前可用:可連通性是帶日期的檢查結果,評分也不包含安裝量或使用者評價。
- 近 30 天內可連通25 分
請保持端點能夠回應 MCP 握手;SourceWeft 每 30 天探測一次。
- 已宣告認證方式10 分
請在註冊中心條目中宣告憑證請求標頭,或保持端點能夠回應探測,以便判定其認證方式。
- 已列出工具15 分
請讓伺服器在無憑證時回應 tools/list,或發布可在沙箱中無憑證啟動的軟體包。
- 描述必需15 分
- 圖示10 分
- 文件15 分
- 授權條款10 分