Fetch MCP server: what its one tool can reach, and how to make your agent ask
The one tool of the reference Fetch MCP server, checked by running mcp-server-fetch 2026.11.18 against test servers on our own machine: which addresses it refuses, how a proxy gets a private name past that check, why a GET can still carry your data out in its URL, the npm install it runs on first use, and the Claude Code settings that make it ask.
Checked on by running mcp-server-fetch 2026.11.18 (PyPI, run with uvx) from mcp-server-fetch and reading its tools/list answer. Each tier is the tool risk checker’s reading, with our reason wherever we changed it. Written by the people who make VariantGate.
The short answer
It refuses private addresses by default, but any URL it fetches can carry what the agent has read to a site the agent picks. Make it ask, or start it with --allowed-hosts and let it run.
- Can run on their own
- 0
- Should ask a person
- 1
Which server this is, and how we ran it
This is the reference fetch server from the Model Context Protocol project, mcp-server-fetch on PyPI. We ran 2026.11.18, its latest release, with uvx, and spoke to it over stdio with a small script of our own. It answers as mcp-fetch and offers one tool, fetch, and one prompt of the same name. The tool is marked read-only and not destructive, and its description tells the model: “this tool now grants you internet access”. Every address we fetched was a test server we started on 127.0.0.1 that logs each request it gets, apart from one public page, example.com.
It refuses your own network, by default
Out of the box, every local address we tried was refused, and our test servers saw no request at all:
127.0.0.1,localhost(which it resolved to::1),[::1],0.0.0.0, and the shorthand spellings127.1and2130706433.169.254.169.254was refused before anything was sent. The code refuses all of169.254.0.0/16along with the private, shared and other special-purpose ranges, and judges a hostname by every address it resolves to.- The check runs again on every redirect hop and on the robots.txt request, and the source connects to the address it checked rather than looking the name up a second time.
Started with --allow-private-ips, the same calls returned our test “internal admin” page, fake token included, and followed a redirect from one local server to the other. The README’s warning still opens with “This server can access local/internal IP addresses and may represent a security risk”, and then says that by default it refuses them. Leave that flag off unless the agent really needs a development server.
Behind a proxy, a private name gets through
Through a proxy, the server checks only names it can resolve itself; the proxy resolves the rest and makes the connection. We ran a proxy on 127.0.0.1 that knew one made-up name, intranet.corp.example.invalid, and sent it to our admin page. With the guard on and --proxy-url set, fetch returned that page, fake token and all. Setting HTTP_PROXY in the environment instead of the flag did the same: the server reads the usual proxy variables. A redirect from a second name only the proxy knew to 127.0.0.1 was still refused, because the next hop’s address could be checked. The README says this in its own words: a hostname only a proxy can resolve “is not checked at all”. On a company network with a proxy, the private-address guard does not cover the intranet; --allowed-hosts does.
Only a GET, but the URL carries data out
The tool takes a URL and four options, and nothing else. When we added method, headers and body to a call, they were ignored and a plain GET went out. Every request carried only its own User-Agent, Accept and Accept-Encoding, so it cannot sign in to anything or send a cookie. The URL itself is the channel: we fetched /admin?secret=sk_live_EXAMPLE123¬e=from-agent and our server logged the query string exactly. An agent that has read a key or a customer record, and then follows instructions hidden in a page, can put it in a URL for any public host. The private-address guard decides where a request may go, not what it says, which is why this tool asks below despite its read-only mark.
--allowed-hosts is the limit that matters
With --allowed-hosts example.com localhost, example.com came back and example.org was refused before even its robots.txt was requested. The list is checked on every hop too: a redirect from localhost to 127.0.0.1 was refused, because the list names hosts, not addresses. Three details from our runs and the README:
- A port is not part of an entry. Listing
localhostlet a second server on another port answer too. - Listing a private host does not lift the guard:
localhoston the list was still refused until we added--allow-private-ips. *.example.comtakes every subdomain but not example.com itself; list both to allow both. A wildcard over a domain where anyone can get a subdomain lets anyone receive what the agent sends.
robots.txt: checked for the tool, skipped for the prompt
Each tool call asked the site for /robots.txt first, as ModelContextProtocol/1.0 (Autonomous; ...). A Disallow: / and a robots.txt answering 500 both made the tool refuse; a 404 let it through. The refusal tells the model to suggest the fetch prompt instead, and the prompt fetched the same disallowed page without asking for robots.txt, as User-Specified. That is the design: a prompt is something a person runs. --ignore-robots-txt drops the check for the tool. robots.txt is a courtesy to site owners; it does nothing to protect you.
The first page it simplifies runs npm install
With Node.js on the PATH, the first HTML page we fetched made the server run npm install inside that tool call. Its log said it was contacting the npm registry and “added 30 packages”, among them jsdom 31.0.1 and @mozilla/readability 0.6.0. The versions come from open ranges in a dependency’s package.json, such as jsdom >=12.2.0, so pinning mcp-server-fetch does not pin the JavaScript it runs; the README says so. --no-readability-js keeps the server from starting Node.js or npm at all. The README says the pure-Python extractor it then uses keeps headings and text but drops link targets. It also explains how to install the packages ahead of time instead.
Safe setup
claude mcp add fetch -- uvx mcp-server-fetch==2026.11.18 --no-readability-js --allowed-hosts docs.python.org developer.mozilla.orgReplace the two hosts with the documentation sites your agent reads. --allowed-hosts takes a list, so keep it last. Other things worth knowing before you change it:
- A call returns 5,000 characters unless
max_lengthsays otherwise, up to 999,999, andstart_indexpages through the rest: on a 20,000-character page,start_index19,990 returned the last 10. By its README and source, the server reads at most 5 MiB of any response. file://,ftp://andgopher://URLs failed. With robots.txt on, the robots.txt request failed first; with it off, the HTTP library refused the scheme.
Its one tool
Reaches people1 toolAsk a person: once it reaches someone, it cannot be unsent.
fetchFetches a URL from the internet and optionally extracts its contents as markdown.
Server says: read-only
Our call: Marked read-only, but it sends a GET to any public URL the agent writes, and the URL can carry data out: a query string we added reached our test server unchanged.
Claude Code asks for every call
Claude Code asks before every MCP tool it has no rule for. Added as fetch, this server’s tools are named mcp__fetch__<tool>. None of its tools only looks, so there is no allow rule to add: leave it without one and every call asks, including any tool a later version of the server adds.
The command that adds the server:
claude mcp add fetch -- uvx mcp-server-fetch==2026.11.18 --no-readability-js --allowed-hosts docs.python.org developer.mozilla.orgSend the rest to a person, not the terminal
A prompt in the terminal only works while someone is watching it. With this hook, every call of the server becomes a request in your VariantGate inbox, on your phone or in Slack, and Claude Code waits for the answer. The matcher covers the whole server, so a tool added later is sent too. Put the key in VARIANTGATE_KEY, or run the one-command setup for Claude Code first.
{
"hooks": {
"PreToolUse": [
{
"matcher": "mcp__fetch__.*",
"hooks": [
{ "type": "command", "command": "variantgate hook claude-code", "timeout": 180 }
]
}
]
}
}Disagree with a tier, or run the server with other flags? Open these tools in the tool risk checker, change what you like, and copy the settings for your own setup. It runs in your browser and starts from its own reading, so a tool we marked as only looking by hand asks there until you change it.
Any MCP client: put the proxy in front
Claude Desktop, Cursor and most other MCP clients have no hook to send a call to a person. The VariantGate MCP proxy does it in the server’s place: it starts the server and holds every call until someone approves it in the inbox. Run npx -y https://variantgate.com/sdk/variantgate-agent-0.15.0.tgz login once to save a key, then use this in claude_desktop_config.json or ~/.cursor/mcp.json:
{
"mcpServers": {
"fetch": {
"args": [
"-y",
"https://variantgate.com/sdk/variantgate-agent-0.15.0.tgz",
"mcp-proxy",
"--name",
"fetch",
"--",
"uvx",
"mcp-server-fetch==2026.11.18",
"--no-readability-js",
"--allowed-hosts",
"docs.python.org",
"developer.mozilla.org"
],
"command": "npx"
}
}
}Already have it in Claude Desktop? One command rewrites the file for you, with every call asking, and keeps the old one (setup vscode does the same for VS Code; how it works):
npx -y https://variantgate.com/sdk/variantgate-agent-0.15.0.tgz setup claude-desktopThe same in Claude Code, instead of the hook. The proxy now asks about every call that matters, so an allow rule for the whole server, mcp__fetch, keeps Claude Code from asking a second time in the terminal:
claude mcp add fetch -- npx -y https://variantgate.com/sdk/variantgate-agent-0.15.0.tgz mcp-proxy --name fetch -- uvx mcp-server-fetch==2026.11.18 --no-readability-js --allowed-hosts docs.python.org developer.mozilla.orgClaude Code’s allow rules match a tool’s name, never its arguments, so a rule cannot tell a harmless call of these tools from a risky one. If the server runs with --allowed-hosts and --no-readability-js, as above, naming only sites you would be happy to see any text from the conversation in their logs, and with no HTTP proxy (no --proxy-url, HTTP_PROXY, HTTPS_PROXY or ALL_PROXY), these rules let fetch run unasked:
{
"permissions": {
"allow": [
"mcp__fetch__fetch"
]
}
}When the agent should fetch freely
Let it run unasked when the hosts are limited, or when there is nothing to leak: a container or a fresh machine with no keys, no customer data and no files the agent could read and put in a URL. Everywhere else, the person approving a call sees the whole URL, and a query string full of something that looks like a key is the thing to refuse.
In Claude Code you may not need this server at all. Its own WebFetch tool can be limited per site, with rules such as WebFetch(domain:docs.python.org), which Claude Code cannot do for an MCP tool: its rules match an MCP tool’s name, never its arguments. The permissions builder writes those rules. Either way, an allowed curl reaches every site, so leave shell commands that fetch asking as well. For clients other than Claude Code, --allowed-hosts is the only per-site limit, and the VariantGate MCP proxy makes every other call wait for a person.
See it before you decide.
The playground runs the whole approval loop in your browser, no account needed. When it fits, the free plan covers 100 requests a month.