Skip to content

Client setup

Claude Code WebFetch vs a fetch MCP server: what the model gets

See what Claude Code's WebFetch returns compared with a fetch MCP tool, which limits apply to each, and how to make Claude use the tool you added.

By Lucian Dyer, FetchMCP team · Published

This article was drafted with AI assistance from the sources listed below and edited and published by the FetchMCP team. Disclosure: the FetchMCP API, which this article mentions, is this site's own product.

What reaches the model
CriterionWebFetchFetch MCP tool
ResultThe answer of a separate model callThe page text the tool returns
SizeReads up to 100,000 characters per callThe tool's own cap, e.g. max_length 5,000 by default
localhostRefusedReference server refuses private addresses by default
Client limitNone of the MCP limitsWarning above 10,000 tokens, 25,000-token default limit

You added a fetch MCP server, and Claude still reaches for WebFetch. Or you ask about a page and the answer misses a section you can see in the browser. Both come from the same fact: the two tools hand the model different things. Checked against the Claude Code docs and the reference fetch server README on 2026-11-09.

What WebFetch hands the model

WebFetch takes two inputs: a URL and a prompt that says what to extract. It downloads the page and converts HTML to Markdown. For most fetches, it then runs your prompt against that Markdown in a separate model call. Claude receives the answer of that call, not the page.

The Claude Code docs call this lossy by design. If the result says the page does not mention something, the extraction prompt may simply not have asked for it. The docs suggest two ways out: fetch again with a narrower prompt, or get the raw page another way.

The conversion step has no setting. You choose the prompt, not the format.

What a fetch MCP tool hands the model

A fetch MCP tool returns its result as a tool result. What the server sends is what the model reads, within your client's limits. There is no second model call in between.

The size is set by the tool's own options. The reference server's fetch tool takes:

  1. url, the page to read.
  2. max_length, the number of characters to return, 5,000 by default.
  3. start_index, the character offset to start from, 0 by default. Call again with a higher value to read the next part.
  4. raw, set to true to skip the Markdown conversion.
  5. timeout_ms, a per-call HTTP timeout from 100 to 600,000 milliseconds, 30,000 by default.

Its config, as the README gives it:

{
  "mcpServers": {
    "fetch": {
      "command": "uvx",
      "args": ["mcp-server-fetch"]
    }
  }
}

The limits that apply to each

WebFetch reads up to 100,000 characters of a page per call. On v2.1.290 or later, the result for a longer page says how much went unread, so Claude can fetch the next part.

MAX_MCP_OUTPUT_TOKENS applies to the MCP tool, not to WebFetch. Claude Code warns when an MCP tool result passes 10,000 tokens and limits it to 25,000 tokens by default. Successful text results over 50,000 characters go to a file, whatever the variable says, unless the server raises the tool's own limit. The token budget guide covers how to set a cap below those numbers.

Other behavior that differs

WebFetch caches each response for 15 minutes by default. A second fetch of the same URL inside that window returns the cached copy. On v2.1.233 or later, CLAUDE_CODE_WEBFETCH_CACHE_TTL_MS changes the window.

WebFetch refuses localhost and any hostname without a dot before it sends a request. The reference fetch server also refuses loopback, private and link-local addresses by default, and checks every redirect hop. Its --allow-private-ips flag turns that guard off; the README warns that the server can then reach internal addresses.

WebFetch does not follow a redirect to another host. It returns a text result naming both URLs, and Claude makes a second call.

WebFetch gives up on a page that has not finished downloading within five minutes, redirects included. On v2.1.268 or later, CLAUDE_CODE_WEBFETCH_DEADLINE_MS changes the limit.

User-Agent differs too. WebFetch sends one that starts with Claude-User, with an Accept header that prefers Markdown. The reference server sends ModelContextProtocol/1.0 (Autonomous; +https://github.com/modelcontextprotocol/servers) for calls the model makes. It obeys the site's robots.txt for those calls by default.

Which one to use for what

  1. Use WebFetch for a question about a page: "Which Node versions does this page list?" One answer, little context spent.
  2. Use a fetch MCP tool when the model needs the words themselves: a code sample to copy, a changelog to compare, a passage to quote.
  3. Use a fetch MCP tool when you want to set the size per call, such as 2,000 characters for a version check.

Make Claude use the MCP tool

  1. Run claude mcp list and check that the server is listed. The remote setup guide covers the add command for each scope.
  2. Name the tool in your prompt for one request, for example "use the fetch MCP tool, not WebFetch".
  3. Set CLAUDE_CODE_DISABLE_WEB_FETCH=1 (v2.1.285 or later) to remove WebFetch from the session:
CLAUDE_CODE_DISABLE_WEB_FETCH=1 claude

With WebFetch gone, the MCP fetch tool is the only fetch tool Claude has.

Try it with a real server

FetchMCP API runs a remote MCP server over Streamable HTTP with a bearer key. The MCP server registers 2 tools. get_page_contents reads one public URL per call and returns Markdown, text or HTML, with a max_characters cap from 500 to 100,000 and a default of 8,000. get_account_status shows credits left, plan and rate limit, and is free. Every request fetches the page live; there is no cache.

claude mcp add --transport http fetchmcp https://fetchmcp.net/mcp \
  --header "Authorization: Bearer $FETCHMCP_API_KEY"

The tool reads static and server-rendered pages. Pages that need JavaScript return CRAWL_NOT_RENDERED. Failed fetches cost 0 credits. The full config for each client is in the MCP docs, and a key comes from sign-up. Companies and individual professionals can sign up.

Frequently asked questions

Does Claude Code's WebFetch return the full page?

For most fetches, no. WebFetch converts the page to Markdown, runs your prompt against it in a separate model call and gives Claude the result of that call. The Claude Code docs call this lossy by design.

Why does Claude say a page does not mention something that is on it?

With WebFetch, the extraction prompt decides what reaches Claude. If the prompt did not ask about it, the answer can leave it out. Fetch again with a more specific prompt, or use a fetch tool that returns the page text.

How do I stop Claude Code from using WebFetch when I have a fetch MCP server?

On Claude Code v2.1.285 or later, set CLAUDE_CODE_DISABLE_WEB_FETCH=1 before starting the session. The MCP fetch tool is then the only fetch tool Claude has. You can also name the MCP tool in your prompt for a single request.

Is a fetch MCP result limited in Claude Code?

Yes. Claude Code warns when an MCP tool result passes 10,000 tokens and limits it to 25,000 tokens by default, set with MAX_MCP_OUTPUT_TOKENS. Successful text results over 50,000 characters are saved to a file unless the server raises the tool's own limit.

Sources

  1. Tools reference: WebFetch tool behavior (Claude Code docs) (Documentation)
  2. Connect Claude Code to tools via MCP (Claude Code docs) (Documentation)
  3. Fetch MCP server README (modelcontextprotocol/servers) (Documentation)