
Agentfetch
io.github.bch1212Published by GitHub account bch1212v1.0.1Updated Oct 24, 2026
Token-budgeted web fetch for AI agents — auto-routes Jina, FireCrawl, Trafilatura, PDF.
Overview
Local MCP server that fetches web pages as clean Markdown with token estimation, caching and automatic routing across Jina, FireCrawl, Trafilatura and PDF…
- What you can do
- Fetch a single URL and get clean Markdown, metadata, token count and cache status
- Estimate a page's token count before fetching so large pages can be skipped
- Fetch up to 20 URLs concurrently with a per-page token cap
- Run a web search and fetch the top results in one call
- Route each URL to a local extractor, Jina Reader, FireCrawl for JS-heavy pages, or pypdf for PDFs, with optional Redis caching
- When to use it
- Useful when an assistant needs to read web pages or PDFs inside a token budget and you want one tool to handle extraction, caching and JS-heavy sites instead of wiring several fetchers together.
- Requirements
- Runs locally over stdio from the PyPI package agentfetch-mcp (Python). JINA_API_KEY is recommended; FIRECRAWL_API_KEY is optional for JS-heavy pages; REDIS_URL is optional for caching. Without Jina, only the local Trafilatura extractor works. Network access is required.
Installation
In SourceWeft
- Open Agentfetch in the dashboard and add it to a workspace.
- Enable the server for the chats that should use its tools.
Desktop only via STDIO. STDIO servers start a local process, so they need the SourceWeft desktop host.
Other MCP clients
Follow the launch instructions in the repository.
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.
Source: README.md at commit 692a358
Tools
0Version history
1- v1.0.1LatestSep 16, 2026
Score
50% of the applicable checks met
How complete this listing is, computed from the registry entry, the endpoint and public sources. Not a rating of the server and not a statement that it is safe or working today: reachability is a dated check, and no installs or reviews go into the score.
- Reached in the last 30 days25 pts
Keep the endpoint answering the MCP handshake; SourceWeft probes it every 30 days.
- Auth declared10 pts
Declare the credential headers in the registry entry, or keep the endpoint answering the probe so its auth can be classified.
- Tools listed15 pts
Answer tools/list without a credential, or ship a package that starts in a sandbox without one.
- DescriptionRequired15 pts
- Logo10 pts
- Documentation15 pts
- License10 pts