Skip to main content

MCP Context Cost in Claude Code: 12 Servers Measured

· 12 min read
Yassine El Haddad
Software Developer & Automation Specialist

I build production AI agents, web scrapers, and automation pipelines. Most of what I publish here comes from the actual problems they run into: proxies that get banned, anti-bot stacks that fingerprint your client, RAG that drifts when the underlying data moves. Stack: Python, TypeScript, Go, FastAPI, LangChain, Crawlee, Playwright, deployed on AWS, GCP, and Cloudflare.

Quick Answer

With Claude Code's default tool search, 12 popular MCP servers added only 5,848 input tokens to a session in our test. With tool search turned off, the same 12 servers added 63,186 tokens, about 6% of a 1M-token window and nearly a third of a 200K one. The biggest single server was GitHub's remote server: 46 tools, about 19.8k tokens when loaded. The startup cost that remains with tool search on is mostly server instructions, not tool definitions.

Every Claude Code setup guide warns that MCP servers eat your context window. Almost none of them give numbers, and the advice was written before tool search became the default. So we measured it on 21 October 2026: 12 servers, one at a time and all together, with tool search on, off and in auto mode.

Audit your own setup first​

You don't need our numbers to fix your setup. Paste this into Claude Code in the project you use most, and Claude measures your servers and proposes changes. It edits nothing until you approve.

Audit my MCP context usageInteractive setupPaste into Claude Code

Claude measures what your MCP servers cost in this project, then proposes scoping or disabling them, one change at a time.

  1. Runs /context and lists your MCP servers
  2. Shows each server's tool count and token cost
  3. Asks which tools you actually use
  4. Proposes changes and edits config only after you approve
Audit how much context my MCP servers use in this project, then help me trim them. Work step by step and ask before changing anything.

1. Ask me to run /context and paste the output here (you can't run slash commands yourself). Also run `claude mcp list` and tell me which servers are configured and at which scope (local, project, user, plugin or claude.ai connector).
2. From the /context output, build a table: server, number of tools, tokens for its tool definitions, tokens for its server instructions. Note whether tools show as "MCP tools (deferred)" (tool search on) or "MCP tools" (loaded upfront). If ENABLE_TOOL_SEARCH is set in my environment or settings, tell me its value and what it does.
3. Ask me, one question at a time, which of these servers I used in the last two weeks and for what.
4. For each server, recommend one of: keep, scope it to fewer tools (only if the server supports a tool filter, e.g. a ?tools= URL parameter; check its docs first and say if you can't confirm), move it from user scope to only the projects that need it, or disable it in this project via /mcp. Explain the token saving for each, using the numbers from step 2.
5. Show me the exact change for the first recommendation (the file, the before and after). Apply it only after I say yes. Then repeat for the next one.
6. Never delete a server's credentials or remove a server from user scope without asking. At the end, ask me to run /context again and compare before and after.

Claude asks before each change it makes. Read each step before you approve it.

The rest of this post is the data behind those recommendations.

How we measured​

All numbers below come from runs on 21 October 2026 with Claude Code 2.1.306 and the default model, Claude Opus 5.5, which runs with a 1M-token context window by default. Anthropic's model docs list which models use 1M and how to turn it off; older models such as Opus 4.6 and Sonnet 4.6 run at 200K unless you pick their [1m] variant, so we give percentages for both windows.

The method, so you can reproduce it:

  1. One config file per server. Each server got its own .mcp.json-style file in an empty scratch directory.
  2. Isolate the server. Every run used --strict-mcp-config --mcp-config <file>, so no user-scope servers, plugins or claude.ai connectors were loaded alongside it.
  3. Read /context headlessly. claude -p "/context" --max-turns 1 --strict-mcp-config --mcp-config <file> prints the same breakdown as the interactive /context command, including a per-tool token table.
  4. Repeat in three modes. Default (tool search on), ENABLE_TOOL_SEARCH=false (everything loaded upfront) and ENABLE_TOOL_SEARCH=auto. The MCP docs describe all three.
  5. Check against the bill. /context labels its figures as estimates, so for the 12-server total we also sent a one-word prompt with --output-format json and summed the real input_tokens, cache_creation_input_tokens and cache_read_input_tokens from the response.

Remote servers that need sign-in (GitHub, Apify) were given a bearer token through ${VAR} expansion in the config headers, so no token was written to disk.

Baseline. With no MCP servers at all, /context reported 10.6k tokens in use at startup with tool search on, and 26.5k with it off. That 16k gap is Claude Code's own built-in tools: tool search defers some of them too, so turning it off costs you about 16k before you add a single server.

Results: 12 servers, one at a time​

"Loaded" is what the server costs when its tools sit in context upfront (tool definitions plus server instructions). "Startup with tool search" is how much the session total rose over the 10.6k baseline with the default settings; /context reports totals to 0.1k, so "under 0.1k" means it did not move.

ServerVersionToolsLoaded (tokens)% of 1M% of 200KStartup with tool search
GitHub (remote, api.githubcopilot.com/mcp/)remote build c91af8646~19.8k2.0%9.9%+0.7k
Apify (hosted, default tools)0.19.111~11.4k1.1%5.7%+1.5k
Chrome DevTools (chrome-devtools-mcp)1.11.032~10.9k1.1%5.5%under 0.1k
Apify (hosted, ?tools= three tools)0.19.17~7.3k0.7%3.7%+1.3k
Playwright (@playwright/mcp)0.0.8325~6.5k0.7%3.3%under 0.1k
Filesystem (server-filesystem)2.0.014~2.8k0.3%1.4%under 0.1k
Git (mcp-server-git)2026.10.1912~2.0k0.2%1.0%under 0.1k
Context7 (hosted)4.4.32~1.7k0.2%0.9%+0.3k
Memory (server-memory)2.0.09~1.6k0.2%0.8%under 0.1k
DeepWiki (hosted)2.14.33~1.5k0.1%0.7%+1.3k
Sequential Thinking (server-sequential-thinking)2.0.01~1.3k0.1%0.7%under 0.1k
Cloudflare Docs (hosted)0.4.142~0.3kunder 0.1%0.1%under 0.1k
Fetch (mcp-server-fetch)2026.10.191~0.2kunder 0.1%0.1%under 0.1k

The two Apify rows are the same server; the totals below use the default one, so they cover 12 distinct servers.

Three things stand out.

Tool count is a poor predictor. Sequential Thinking has one tool and costs 1.3k, more than Memory's nine tools. Playwright has 25 tools and costs less than Apify's 11. What you pay for is description length and input-schema size, not the number of tools.

Server instructions are the cost tool search doesn't remove. With tool search on, only tool names and server instructions load at startup, as the docs say. In our runs the session total only moved for servers that send instructions: Apify (1.4k of instructions), DeepWiki (1.2k), GitHub (615) and Context7 (212). DeepWiki's instructions are more than four times the size of its three tool definitions, so on the default settings it costs more at startup than Chrome DevTools with 32 tools.

Scoping a server cuts its definitions, not its instructions. Limiting the hosted Apify server to search-actors, fetch-actor-details and call-actor returned 7 tools rather than 3 (it adds the run, dataset, key-value-store and abort tools that call-actor needs) and cut the loaded cost from about 11.4k to 7.3k. With tool search on, it saved only 0.2k, because its instructions barely changed. If you scope Apify's tools, do it for control over which paid tools Claude can reach, which is the argument in our lean Claude Code research setup, not for context.

Results: all 12 at once​

ModeSession total at startupAdded by the 12 serversBilled input tokens for a one-word prompt
No servers, tool search on10.6k–17,648
12 servers, tool search on (default)14.1k+3.5k23,496 (+5,848)
No servers, tool search off26.5k–33,064
12 servers, tool search off89.5k+63.0k96,250 (+63,186)
12 servers, ENABLE_TOOL_SEARCH=auto90keverything loadednot measured

The 12 servers expose 158 tools. Their definitions total 58.7k tokens and their instructions 3.4k. The billed numbers agree with /context when everything is loaded (+63.2k billed against +63.0k reported). With tool search on, the bill rose by 5.8k against /context's 3.5k, so expect the real startup cost to sit a little above what /context shows: the list of deferred tool names has to reach the model too.

Tool search cut the 12-server cost by about 91%. The per-server figures in the first table were each measured in their own session, and they add up to about 2k less than the combined run; treat them as estimates to within a few hundred tokens.

auto mode loads everything on a 1M window​

ENABLE_TOOL_SEARCH=auto loads deferred tools upfront while their definitions total less than 10% of the context window. On a 1M window that threshold is 100k tokens, so our 58.7k of definitions stayed fully loaded: the auto run reported 90k in use, the same as tool search off. If you set auto expecting it to save context, check /context; on today's 1M-window models it only defers once you pass roughly 100k tokens of tool definitions. Use auto:N with a smaller percentage if you want the threshold lower.

What fits under 10% of your context​

10% is the threshold Claude Code itself uses for auto mode, so it is a reasonable budget for always-loaded tools. These combinations are added up from the per-server table. The 1M column has room for all 12 servers loaded at once (about 63k), so the useful limits are on a 200K window, or when you load tools upfront on purpose.

SetupLoaded cost% of 200KFits under 10% of 200K (20k)?
GitHub remote alone~19.8k9.9%Just, with nothing else
GitHub + Filesystem~22.6k11.3%No
Apify (scoped) + Playwright + Filesystem + Git~18.6k9.3%Yes
Apify (default) + Chrome DevTools~22.3k11.2%No
Playwright + Context7 + Filesystem + Git + Fetch~13.2k6.6%Yes
All 12 servers~63k measured31.5%No; leave tool search on
All 12 servers, tool search on~5.8k billed2.9%Yes

What to do with this​

  1. Leave tool search on. It is the default, and turning it off cost us 16k tokens with zero servers and 63k with 12. The only common reason to turn it off is an environment that doesn't support it, which the MCP docs list.
  2. Look at instructions, not just tools. In /context, a "MCP server instructions" line is what each server costs you on every session, even deferred. A server you rarely use that sends long instructions is the first thing to disable for a project.
  3. Load upfront only what you use every turn. The docs' alwaysLoad: true setting exempts one server from deferral. Use it for a small server, such as Fetch at 0.2k, not for GitHub at 19.8k.
  4. Scope by project. A server added at user scope loads in every project. The MCP docs cover the per-project /mcp toggle, and headless jobs can pass --strict-mcp-config with a config that holds only the servers that job needs, as in our Claude Code cron setup.
  5. Scope tools for control. On Apify, ?tools= limits which paid Actors Claude can start, which matters more for your bill than the 0.2k of context it saves. Our Apify MCP guide lists the tool names.

Once your setup is lean, Claude prompts that use live web data has prompts by role that put the Apify server to work.

Limits of this test​

  • /context reports estimates, rounded to 0.1k for totals. We checked only the 12-server totals against billed tokens.
  • Remote servers change without a version bump. GitHub's server reported a build hash rather than a version number.
  • We measured default configurations. Tool counts change with options: GitHub's server takes toolsets (its README says enabling only the ones you need reduces context), Playwright adds tools with --caps, and Chrome DevTools has a --slim mode for basic browser tasks.
  • We measured startup cost only. Once Claude loads a deferred tool through search, its full definition enters the conversation, so a session that uses many tools ends up paying for them anyway.
  • One model, one day. Rerun the method on your own setup; the audit prompt above does the same thing for the servers you actually use.

FAQ​

How do I see how much context my MCP servers use?​

Run /context in Claude Code. It shows an "MCP tools" or "MCP tools (deferred)" line, a "MCP server instructions" line, and a per-tool table with token estimates. In a script, claude -p "/context" prints the same breakdown.

Do too many MCP servers still slow Claude Code down?​

Much less than older guides suggest, as long as tool search is on. Our 12 servers added about 5.8k tokens at startup with the default settings. The cost that remains is mostly server instructions, plus each tool's full definition once Claude actually uses it.

Should I set ENABLE_TOOL_SEARCH=false?​

Only if you have a reason to load every tool upfront. With no servers at all it raised our startup context from 10.6k to 26.5k tokens, and with 12 servers to 89.5k.

Which MCP server used the most context?​

GitHub's remote server: 46 tools and about 19.8k tokens when loaded. With tool search on, Apify's hosted server had the largest startup cost (1.5k), because of its server instructions.

Advertise on this page