Do MCP servers still eat your context? Tool search explained

Tool search defers MCP tool definitions by default in Claude Code. Here is when it does not.

December 05, 2026 8 min read

Short answer: in Claude Code, mostly not anymore. Tool search is on by default, so at session start only each MCP tool's name and each server's instructions load. The full tool definitions stay out of the context window until Claude needs one. The Claude Code MCP docs say it in one line: "adding more MCP servers has minimal impact on your context window."

That overturns the advice most "too many MCP servers" posts still give, including an older one of ours. But "by default" matters in that sentence. There are at least seven situations where every definition still loads upfront, and one of them happens with nothing shown on screen.

MCP servers context window usage: what loads at session start now

Before tool search, connecting a server meant its whole tool list went into every request: name, description and JSON schema for each tool. In the test below, four servers carried 45.6k tokens of definitions between them.

With tool search, the definitions are deferred. Claude sees a list of tool names plus the server instructions, and it calls a built-in ToolSearch tool to pull in a definition when a task needs it.

We ran the check on Claude Code 2.1.332 on November 28, 2026, in an empty folder, with no configuration changes. The command was claude -p "/context". Four MCP servers were connected, exposing 62 tools. The relevant rows of the output:

Tokens: 18.9k / 1m (2%)
MCP tools                  680
MCP server instructions    717
MCP tools (deferred)       45.6k
Skills                     9.9k

So 45.6k tokens of tool definitions existed, and about 1.4k tokens of MCP material was actually in context. That is roughly 3% of what the same setup would have cost with everything loaded upfront.

Two things in that output are worth a second look.

First, the skills row. Skill descriptions took 9.9k tokens at session start, about seven times the MCP footprint. On this machine, the thing people worry about (MCP) was the small number and the thing nobody audits (skills) was the big one.

Second, the window. 45.6k tokens is 4.6% of a 1M window. On a 200K window the same definitions would be 22.8%. The old advice assumed upfront loading, and it hurt most on the smaller window.

ENABLE_TOOL_SEARCH in Claude Code: the five values

The setting is an environment variable, ENABLE_TOOL_SEARCH. You can set it in your shell or in the env field of settings.json. As of December 2026 the docs list five values:

The first line below sets a custom 5% threshold. The second turns tool search off and loads every definition upfront.

ENABLE_TOOL_SEARCH=auto:5 claude
ENABLE_TOOL_SEARCH=false claude

One detail about auto: once tool search has turned on in a conversation, it stays on, even if the total later drops back under the threshold. If /context shows tools marked (deferred) when you expected them loaded, that is why.

When MCP tool definitions still load upfront

This is the part to check before you assume you are getting the default. Per the docs, definitions load upfront in each of these cases:

Then there is the quiet one. If ANTHROPIC_BASE_URL points at an LLM gateway, Claude Code expects the gateway to pass through the fields tool search depends on. On v2.1.305 or later, when the gateway answers with a 400 or 422, Claude Code retries the request without tool search. The docs are plain about what you see when that works: "nothing shows on screen." Your MCP tools load upfront, your context fills, and no error tells you. Before v2.1.304, the default behind a gateway was the opposite: tool search was off unless you set the variable.

If you run Claude Code through a corporate gateway, run /context once and look for the word deferred. It takes ten seconds.

mcp alwaysLoad: your setting, and the server author's

Deferral has a cost: Claude has to search before it can call. For a server Claude needs on every turn, you can exempt it. Set alwaysLoad to true in that server's entry and its tools load into context regardless of ENABLE_TOOL_SEARCH:

{
  "mcpServers": {
    "core-tools": {
      "type": "http",
      "url": "https://mcp.example.com/mcp",
      "alwaysLoad": true
    }
  }
}

The field works on all server types. It also makes startup wait for that server's tools, capped at the 5 second connect timeout, because they have to be present when the first prompt is built.

Here is the part most people miss. The server's author gets a vote too. A server can mark an individual tool with "anthropic/alwaysLoad": true in the tool's _meta object, and if you leave alwaysLoad out of your config, that tool loads upfront. You didn't choose that. To keep all of a server's tools behind tool search no matter what its author marked, set "alwaysLoad": false on the server. That requires v2.1.287 or later.

So a server you installed last month can start putting definitions in your context after an update on its side. /context lists tools per server with a token count, which is how you would catch it.

Deferred tools get longer descriptions, not shorter ones

You would expect a deferred tool to be the trimmed one. It is the reverse. Claude Code cuts a tool description that loads upfront at 4,096 characters, and the same limit applies to server instructions. A description loaded through tool search gets 16,384 characters, four times as much.

There is a catch for server authors. When tool search matches a query against a description, it reads only the part within the shorter limit. So the words Claude would search for belong near the start. Server instructions matter more than they used to for the same reason: they are how Claude knows a server is worth searching at all.

Too many MCP servers: does it still cost money?

Less than the old math said, and for two reasons.

The first is deferral. The second is prompt caching. Take the 45.6k tokens from our test and pretend they loaded upfront on Claude Opus 5.5. At the listed price of $4 per million input tokens, that is 45,600 x $4 / 1,000,000 = $0.18 per uncached request. But Claude Code uses prompt caching for repeated content, and tool definitions are the same on every request. An Opus 5.5 cache hit is $0.20 per million tokens. That is 45,600 x $0.20 / 1,000,000 = $0.009. Under a cent.

So even in the worst case the dollar cost was mostly a first-request cost. What you actually lose with upfront loading is window space and a longer menu for the model to pick from.

Three costs are untouched by tool search:

Anthropic's own cost guidance still says CLI tools such as gh, aws and gcloud are more context-efficient than MCP servers "because they don't add any per-tool listing", and still says to disable servers you aren't using through /mcp.

What to do with this

Run /context in the project you work in most. If the MCP rows say deferred, stop pruning servers to save tokens. Prune them because they fail the usefulness test, which is the argument in which MCP servers to keep and which to uninstall.

If nothing says deferred, walk the list above. Gateway, old model, Foundry on Azure, HIPAA configuration, a disabled betas variable, a denied ToolSearch.

Use alwaysLoad: true for one or two servers Claude calls constantly. Set alwaysLoad: false on any server whose author is marking tools to load upfront and you disagree.

Then look at the rows above and below MCP. In our test, skills cost seven times more at startup than MCP did. A long instruction file loads in full every session too, which is the subject of how to structure CLAUDE.md for large projects. And if you are still setting up servers, the MCP server setup guide covers the install side.

The question used to be how many MCP servers you could afford. With ENABLE_TOOL_SEARCH at its default, the better question is which of your tools are loading upfront without you having asked.

contextarch.ai·Context Doctor·Setup check·Generator·Templates·Blog·Newsletter