@afetch/mcp
v0.0.1
Published
A better fetch for agents. Honest completeness, outline-first navigation, and provenance on every page it returns.
Maintainers
Readme
afetch
A better fetch for agents.
afetch is an MCP server that fetches a web page and hands it
to your agent as clean, readable text — like every other fetch server. The difference is what it
tells the agent about what it did.
On the name:
afetchis to agents whatofetchis to apps. The resemblance is deliberate homage, not affiliation —afetchis an independent project and is not connected to unjs. The package ships as@afetch/mcp; the unscoped name is reserved by an unrelated package.
Why another fetch server
Today's fetch tools know things they don't say. They know they truncated the page. They know the page needed JavaScript and they got the shell. They know the text was written by a stranger on the open internet. None of that reaches the model, which then reasons confidently about a fragment it believes is whole.
afetch says all of it out loud.
Honest completeness. Every response reports what you got and what remains — 4,000 of 47,000
characters — instead of silently cutting at a default limit. An agent that knows it has part of
a page behaves differently from one that thinks it has all of it.
Outline first. Along with the content, afetch returns the page's heading structure, so an
agent can jump straight to the section it needs rather than paging through linearly. Cheaper in
tokens, and better answers.
Concealment reporting. Web pages can carry text meant for your agent and hidden from you —
zero-width characters, invisible Unicode, white-on-white text, commands tucked in HTML comments.
afetch reports where a page hid something. It does not judge what the text means.
Provenance on every block. Content arrives labeled with where it came from and a notice that it is third-party data, not instructions from you — in the text itself, and in the response metadata, so the label survives whatever your client does with it.
Install
// in your MCP client config
{
"mcpServers": {
"afetch": { "command": "npx", "args": ["-y", "@afetch/mcp"] }
}
}Node 20+. No API key, no account, no hosted service. The fetch happens on your machine, over your connection, from your IP — nothing passes through us, because there is no us to pass through.
Who this is for
Anyone whose agent reads the open web and who would rather it be honest about what it got: developers running coding agents, and anyone working where sending every URL to a third-party scraping service is not an option.
Who it is not for. If you need JavaScript-heavy pages rendered by a real browser farm, large-
scale crawling, or proxy rotation, use a hosted service — Firecrawl and
Jina Reader are good at that and afetch does not try to be.
What this does not do
Labeling is not prevention. Marking text as untrusted tells a model where the text came from;
it does not stop the model from obeying it. afetch reduces harm and improves what an agent
knows. It is a seatbelt, not a force field, and anyone selling you a force field is selling
something else.
Concealment detection is not attack detection. afetch reports text a page tried to hide,
because hidden instruction-shaped text has no legitimate purpose. It does not attempt to judge
whether visible text is malicious — that is a losing game, and a filter that catches most attacks
is more dangerous than none, because it manufactures confidence.
Status
Early. The interface is not stable and the version number says so.
License
MIT © Daniel Ahn
