Agentfetch MCP logo

Agentfetch MCP

by bch1212

Fetches web pages, PDFs, and search results as token-bounded Markdown through MCP with routing, caching, and concurrent retrieval.

Install Agentfetch MCP

Pick your client, then add it in one click or paste the config.

STDIOPython
~/Library/Application Support/Claude/claude_desktop_config.json
claude_desktop_config.json
{
  "mcpServers": {
    "bch1212-agentfetch-mcp": {
      "command": "uvx",
      "args": [
        "agentfetch-mcp"
      ],
      "env": {
        "JINA_API_KEY": "YOUR_VALUE_HERE",
        "FIRECRAWL_API_KEY": "YOUR_VALUE_HERE",
        "REDIS_URL": "YOUR_VALUE_HERE",
        "CACHE_TTL_SECONDS": "YOUR_VALUE_HERE"
      }
    }
  }
}

Settings → Developer → Edit Config, merge this into mcpServers, then fully quit and reopen Claude Desktop.

Values are written into the snippet above so you can paste it as is. They never leave your browser.

We couldn’t confirm it starts correctly

We ran the install command but it didn't respond within our test window — this can mean a slow first-time install rather than a real problem.

uvx agentfetch-mcp

Process exited before answering initialize.

This is an experimental automated check and can have false negatives — missing environment variables, a slow cold install, etc. It doesn’t necessarily mean something’s wrong. Last checked .

Overview

The bch1212/agentfetch-mcp MCP server retrieves web content as clean Markdown with metadata, token counts, and optional truncation. It routes requests among Trafilatura, Jina Reader, FireCrawl, and pypdf based on the URL, while Redis can cache results for six hours. Use it to estimate content size before fetching, retrieve up to 20 URLs concurrently, or combine web search with fetching. The local server runs over stdio and requires provider keys only for the fetchers that need them.

Use cases

  • Fetch articles within a fixed context budget
  • Estimate page size before retrieving content
  • Retrieve documentation URLs concurrently
  • Search and fetch research results in one call
  • Extract text from PDFs and JavaScript-heavy pages

Key features

  • Token estimation before retrieval
  • Automatic fetcher routing
  • Six-hour Redis caching
  • Per-result token truncation
  • Concurrent retrieval for up to 20 URLs
  • Search combined with web fetching

Tools4

What Agentfetch MCP lets your agent do. Expand a tool for its parameters.

Verified live~1.2k tokens of context

Security & health

What it can reach and how reliably it runs — from our own checks, not the maintainer’s claims.

ActiveLast checked

Recent health check succeeded.

15/15 checks healthy over the last 111d

Supply-chain signal

No high-severity advisories surfaced by our automated scan.

Critical 0High 0Medium 0Low 0

Scanned 8d ago via OSV.dev · agentfetch-mcp (PyPI)

Adoption & maintenance

Factual signals from GitHub, npm, and our automated checks — not a rating.

GitHub stars4Stargazers on the source repository.
Last commit5mo agoMost recent push to the default branch.
Install checkInconclusiveDidn't respond in our test window — often a slow first install.
Tools exposed4Callable tools this server registers over MCP.
Directory activity4 viewsConfig copies, upvotes, and views on AllMCPs.

How Agentfetch MCP works

What bch1212/agentfetch-mcp MCP server does

The bch1212/agentfetch-mcp MCP server gives an MCP-compatible agent a small set of web retrieval tools. It can fetch a known URL, estimate its likely token size without downloading the body, retrieve several URLs in parallel, or search the web and fetch the leading results in one operation.

A normal fetch returns Markdown, success status, the requested URL, metadata, cache details, and information about the fetcher used. Metadata can include the title, author, publication date, domain, word count, token count, reading time, content type, and language. The response can also include an error when retrieval fails.

How it works

URL patterns determine which retrieval method is attempted. Trafilatura handles many conventional pages locally, Jina Reader handles other HTML pages, FireCrawl is used for JavaScript-heavy sites such as Twitter/X, LinkedIn, and Notion, and pypdf extracts PDF content. The routing order described by the project is Trafilatura, Jina, FireCrawl, then PDF handling where appropriate.

Before making an expensive or large retrieval, estimate_tokens checks the response size using available information such as Content-Length. It can return no estimate and mark the result as uncertain when a site uses dynamic or chunked responses. In that case, use fetch_url with max_tokens instead.

fetch_url supports Markdown, plain text, and JSON output formats. Its max_tokens value caps the returned content, and use_cache controls whether a recent cached response may be used. fetch_multiple accepts between 1 and 20 URLs and applies a per-result token limit. search_and_fetch accepts a query, fetches 1 to 10 top results by default, and applies a per-result cap.

Setup and configuration

Install the Python package with:

Terminal
pip install agentfetch-mcp

Run the stdio server with:

bash
python -m agentfetch.mcp.server

The project documents Python 3.11 or newer. For Claude Desktop, add a server entry whose command is python and whose arguments are -m agentfetch.mcp.server. Claude Code can also register the same command through its MCP configuration.

Configuration is controlled through environment variables:

  • JINA_API_KEY: Recommended for Jina Reader. Without it, only Trafilatura is available.
  • FIRECRAWL_API_KEY: Optional; used for JavaScript-heavy domains.
  • REDIS_URL: Optional Redis connection URL. Without Redis, results are not cached.
  • CACHE_TTL_SECONDS: Optional cache lifetime, defaulting to 21,600 seconds.

Tools and capabilities

  • fetch_url: Retrieve one URL with a token cap, selected format, metadata, and cache information.
  • estimate_tokens: Estimate size before downloading the body when the response provides enough information.
  • fetch_multiple: Retrieve up to 20 URLs concurrently.
  • search_and_fetch: Search for a query and fetch the top results in one call.
  • Six-hour Redis caching by default when Redis is configured.
  • Automatic handling for standard HTML, JavaScript-heavy pages, and PDFs.

Limitations and notes

The bch1212/agentfetch-mcp MCP server does not guarantee a token estimate for dynamic or chunked responses. A missing estimate should be treated as uncertainty, not as evidence that the page is small. JavaScript-heavy retrieval depends on FireCrawl configuration, while Jina-backed retrieval depends on JINA_API_KEY; the local Trafilatura path remains available without those keys for supported pages.

Redis is optional, so deployments without REDIS_URL run without caching. The hosted AgentFetch service is separate from this open-source repository and has its own pricing and account model. The repository is licensed under MIT.

Written by AllMCPs with AI assistance from the project’s README and listing data. How we build listings

Reviews

No reviews yet — be the first to share how it worked for you.

Frequently Asked Questions about Agentfetch MCP

Install it from PyPI with `pip install agentfetch-mcp`, then run `python -m agentfetch.mcp.server`.

Yes. The README provides a Claude Desktop configuration using the Python module command and stdio transport.

`JINA_API_KEY` is recommended for Jina Reader, and `FIRECRAWL_API_KEY` is optional for JavaScript-heavy pages. The server can still use Trafilatura without those keys.

Yes. Pass `max_tokens` to `fetch_url` or `max_tokens_each` to `fetch_multiple` and `search_and_fetch`.

Related MCP servers

Add a badge to your READMEShow it’s listed — live SVG, Markdown or HTML.

AllMCPs Directory Badge

Full Badge Customizer

Showcase your server listing on GitHub or your project documentation. Embed this dynamic SVG badge to highlight official listing status and live engagement.

Badge Style:
Live Dynamic SVG PreviewAgentfetch MCP AllMCPs Directory Badge
Markdown (GitHub README)
[![AllMCPs](https://allmcps.com/api/badge/bch1212-agentfetch-mcp?style=directory)](https://allmcps.com/mcp/bch1212-agentfetch-mcp)
HTML Embed
<a href="https://allmcps.com/mcp/bch1212-agentfetch-mcp"><img src="https://allmcps.com/api/badge/bch1212-agentfetch-mcp?style=directory" alt="Agentfetch MCP on AllMCPs" /></a>