In Claude Code and Codex, too many MCP servers no longer fill your context window before you type. Both agents now hold each server’s tools back until the agent searches for one, so seven popular servers with 131 tools added 843 tokens to a fresh Claude Code session in our test, against 46,273 when every tool loaded up front.
So the number of servers is a smaller problem than it used to be. What still costs you is any setup that loads every tool anyway, two servers doing one job, and tools that can change things you only meant to read.
We measured each of those on November 5, 2026, with Claude Code 2.1.311 and Codex 0.164.0 on Linux, using seven public servers, from GitHub’s official one to Playwright. The numbers below come from that test.
- Claude Code and Codex set no server limit. Both defer MCP tools by default. Our seven servers added 843 tokens to a new Claude Code session and nothing we could measure to Codex’s first request.
- Turn deferral off and it all loads. The same seven cost 46,273 tokens with
ENABLE_TOOL_SEARCH=false. GitHub’s server alone was 18,870. - Other apps still count tools. VS Code allows 128 per chat request. Cursor’s docs give no number now; its forum put the limit at 80 in 2025.
- Cut by job, not by size. Two browser servers gave us 57 tools for one job, and 74 of the 131 tools weren’t marked read-only.
- Each agent shows one computer. Context Board lists every Claude Code and Codex server on every computer you link, with each one’s tools and which can change things.
How many MCP servers is too many?
There’s no fixed number in either agent. Claude Code’s MCP docs put it plainly: “Claude Code doesn’t impose a fixed per-server tool cap; the practical limit is your context window budget.” Codex’s docs list no limit at all.
The apps around them still draw lines, and they count tools rather than servers.
| App | Limit | What loads at the start |
|---|---|---|
| Claude Code | None, only the context window | Tool names and server instructions |
| Codex | None in its docs | No MCP tools in our test |
| VS Code agent mode | 128 tools per chat request | The tools you leave selected |
| Cursor | No number in its docs now | Not stated in its docs |
VS Code’s limit comes with an error, “Cannot have more than 128 tools per request.” Its tools docs say to deselect tools or whole servers in the tools picker, or to turn on the experimental github.copilot.chat.virtualTools.threshold setting, which groups similar tools so the model opens a group when it needs one.
Cursor used to warn at 40 tools. On its forum in April 2025, a Cursor team member wrote: “The actual limit right now is 80,” and “40 is just a limit to warn you that you might be degrading performance.” Cursor’s current MCP page gives no figure, so check the warning in your own version.
What each MCP server costs: 7 servers, measured
We installed seven servers in Claude Code, turned tool search off so every tool loaded, and read the token count Claude Code gave each one in /context. Then we asked each server for its tool list and counted how many it marks as read-only.
| Server | Tools | Tokens if loaded | Not marked read-only |
|---|---|---|---|
| GitHub (official, default toolsets) | 46 | 18,870 | 19 |
| Chrome DevTools | 32 | 10,767 | 24 |
| Playwright | 25 | 7,118 | 18 |
| Filesystem | 16 | 4,079 | 6 |
| Memory | 9 | 2,705 | 6 |
| Context7 | 2 | 1,880 | 0 |
| Sequential Thinking | 1 | 854 | 1 |
| All seven | 131 | 46,273 | 74 |
The servers added 843 tokens of instructions on top. Token counts are Claude Code’s own estimates, and they moved by a few percent between runs.
- Tool count predicts cost, roughly. One tool ran from 79 tokens (Playwright’s
browser_close) to 1,400 (GitHub’sissue_write), and 59 of the 131 came in at 200 to 400. Long descriptions break the pattern: Context7’s two tools average 940 tokens each, against about 300 for Memory’s nine. - GitHub’s server grows with its toolsets. We ran version 2.1.0 with a placeholder token. With every toolset turned on, it offered 91 tools worth 40,447 tokens, more than double the default. A real token can change the list, so check yours.
- Overlap is easy to miss. Chrome DevTools and Playwright both drive a browser. Together they put 57 tools and 17,885 tokens in front of the agent for one job, and both have their own click, form-filling and screenshot tools.
The read-only column is each server’s own label. A tool without the label isn’t always dangerous, but it’s the server telling you it may change something.
Do MCP tools use context when you don’t use them?
In Claude Code, very little. Its MCP docs say “Tool search is enabled by default: MCP tools are deferred and discovered on demand,” and “Only tool names and server instructions load at session start.”
We ran /context three ways with the same seven servers. Claude Code reported a 1-million-token window for the model in every run.
| Setting | MCP tools | Session before you type |
|---|---|---|
| No servers | None | 13.4k tokens |
| Seven servers, default | 46.3k, deferred | 14.2k tokens |
| Seven servers, ENABLE_TOOL_SEARCH=auto | 46.3k, loaded | 77.3k tokens |
| Seven servers, ENABLE_TOOL_SEARCH=false | 46.3k, loaded | 76.8k tokens |
The auto row surprised us. It only turns tool search on once MCP tools reach 10% of the context window, and 46.3k is 4.6% of a million, so everything loaded. Turning tool search off also loaded Claude Code’s own deferred tools, which is why both of those rows sit near 77k.
ENABLE_TOOL_SEARCH takes these values, per the docs:
- Unset or
true: MCP tools wait until Claude searches for them. This is the default. auto: tools load up front until they reach 10% of the window.auto:5sets 5%.false: every MCP tool loads up front, every session.
Some setups load everything whatever you set. The docs name models earlier than Claude Opus 4 and Sonnet 4, Microsoft Foundry deployments on Azure, sessions with CLAUDE_CODE_DISABLE_EXPERIMENTAL_BETAS set, and sessions under a HIPAA configuration. If you’re on one of those, the table above is your bill.
Names and instructions still add up. An open Claude Code issue from October 2026 reports a desktop session at 56.8k tokens after a single “hi”, and asks for unused connectors’ names and instructions to stop loading into every session.
Does Codex load every MCP tool into context?
Not in our test. We ran codex exec twice with the same one-line prompt, once with none of our seven servers and once with all of them, and read the input tokens Codex reported for the first request.
No servers added: "input_tokens":14994
Seven servers added: "input_tokens":14994
Both runs set mcp_optional_startup_grace_ms to 0, so Codex waited for every server to start before its first request. By default it waits 1,000 milliseconds, and a slow server misses the first tool list. A third run with the same settings and logging on showed all seven servers starting, and we asked the model what it could see. It answered: “I don’t have GitHub MCP tools defined directly. I have a way to discover available tools by searching ALL_TOOLS.”
OpenAI’s Codex config reference doesn’t say this is the default. It does name the places a server’s tools can appear, in a per-server omit_tools_from setting: direct (the first tool list), deferred (tool search) and code_mode.
Codex shows each server’s tool count, not its tokens. Type /mcp in a session to see lines like docs-search: connected (1 tool).
How to check what your own MCP servers cost
In Claude Code, /context does it. Type it in a session, or run it from a terminal without starting a chat.
claude -p "/context"
It printed a category table and then one row per tool. These lines are from our run with tool search on.
| MCP server instructions | 843 | 0.1% |
| MCP tools (deferred) | 46.3k | 4.6% |
| mcp__github__create_pull_request | github | 338 |
To see what your servers would cost an app that loads everything, run it once with tool search off.
ENABLE_TOOL_SEARCH=false claude -p "/context"
In the per-tool table, look for:
- A server you don’t recognize. claude.ai connectors and plugin servers show up here too.
- A server whose total is far above the rest. That’s the one to trim first if your setup loads everything.
- Two servers with the same verbs. Two
clicktools, tworead_filetools, two ways to open an issue.
Which MCP servers to cut first
With deferral on, cut for clarity and safety more than for tokens. Every tool is one more option the agent has to choose between.
| What you find | What it costs | What to do |
|---|---|---|
| Two servers for one job | Both tool lists, and near-twin tools to pick from | Keep the one you use |
| One service reached two ways | Doubled tools and two sign-ins | Remove one way in |
| Tools that change things you only read | Writes the agent can make by mistake | Deny those tools |
| A server used once | Names, instructions and a start-up each session | Turn it off |
| Every toolset on | GitHub went from 46 to 91 tools | Turn on the toolsets you use |
| A setup with no tool search | Every token, every session | Get under the cap, then trim |
“One service two ways” is common. GitHub as a claude.ai connector and GitHub as a server you added yourself both land in Claude Code, with their own tools.
Large tool results are a separate cost. Claude Code warns when one tool’s output passes 10,000 tokens and caps it at 25,000 unless you raise MAX_MCP_OUTPUT_TOKENS. If that’s your problem rather than the tool list, code mode MCP is the fix built for it. For many agents sharing one set of servers with filters in front, see our MCP gateway comparison.
How to turn off an MCP server or a single tool
Turning a server off keeps its settings, so you can bring it back in seconds. Removing one deletes them, and our guide to listing MCP servers has the remove commands for both agents.
In Claude Code
A whole server: type /mcp, pick it and turn it off. Claude Code stops connecting to it in that project and still lists it as disabled.
claude.ai connectors: start Claude Code with ENABLE_CLAUDEAI_MCP_SERVERS=false for one session, or set "disableClaudeAiConnectors": true in your settings to stop it fetching them.
One tool, or all of a server’s tools: add a deny rule to your permissions. The permissions docs say a denied tool is removed from Claude’s context.
{
"permissions": {
"deny": ["mcp__github__*", "mcp__playwright__browser_run_code_unsafe"]
}
}
We tested that rule with tool search off. MCP tools dropped from 46.3k tokens to 26.6k, and none of GitHub’s 46 tools were left in the list.
In Codex
Each server’s block in ~/.codex/config.toml takes three keys that trim it, per OpenAI’s Codex MCP docs.
[mcp_servers.github]
command = "github-mcp-server"
args = ["stdio"]
disabled_tools = ["delete_file", "create_or_update_file"]
[mcp_servers.filesystem]
command = "npx"
args = ["-y", "@modelcontextprotocol/server-filesystem", "/home/you/notes"]
enabled_tools = ["read_text_file", "list_directory", "search_files"]
[mcp_servers.chrome-devtools]
command = "npx"
args = ["-y", "chrome-devtools-mcp@latest"]
enabled = false
enabled = false: the server stays in the file and doesn’t start.enabled_tools: an allow list. Only these tools are offered.disabled_tools: a deny list, applied afterenabled_tools.
In VS Code and Cursor
In VS Code, open the tools picker and deselect tools or whole servers. In Cursor, turn a server off in Customize; its docs say “Disabled servers won’t load or appear in chat.”
See every server’s tools, on every computer
/context and /mcp each cover one agent on one computer. Use Claude Code and Codex on a laptop and a desktop, and that’s four lists to read before you know what your agents can reach.
Context Board is ours, so weigh the bias. It’s a live dashboard you build for yourself, and its Connections widget reads every MCP server Claude Code and Codex use on each computer you link.
Chrome DevTools and Playwright both on the laptop. Keep Playwright, turn DevTools off in /mcp.
- Remove the second GitHub
- Deny delete_file
- Turn off memory server
Open it and you see every server by computer and by agent: your own servers, claude.ai connectors, ChatGPT apps, plugins and project servers. Open a server and it lists its tools, says how many can change things, and marks each one.
What needs you comes first, with how to fix each:
- Doubled up: one agent has two working ways into the same service, like GitHub as a claude.ai connector and as your own server.
- Failing: the server wouldn’t start or turned down its key.
- Sign in: it’s waiting for you to sign in.
For a server of your own, the fix is the command to copy, like claude mcp remove "old-db" -s user. For a claude.ai connector or a ChatGPT app, it’s a link to where you manage it. The board never changes your settings itself.
It counts tools, not tokens, so /context is still the place for token sizes. It reads Claude Code and Codex, not Cursor, VS Code or Claude Desktop. It never starts a project’s servers, and keys and tokens are stripped on your computer before anything reaches the board. Context Board is free for 3 days, then $12 a month, with every widget included.
Start with the computer you use most: link it, add Connections, and turn off the first server you don’t recognize.
Before you keep a server you don’t remember adding, check what it can reach.