Guide5 min read
Too many MCP tools: how to cut context bloat
Every MCP tool definition is sent to the model on each request. Measure the cost, turn off tools you don’t use, and let the client search for the rest.
- github__search_issues
- linear__list_issues
- sentry__search_events
- notion__search
- stripe__list_charges
- github__get_file_contents
mcp1__search_tools
- github__search_issues
- linear__list_issues
- sentry__search_events
- notion__search
- stripe__list_charges
- github__get_file_contents
mcp1__search_tools
Too many MCP tools cost you twice: every tool’s name, description and input schema is sent to the model on each request, and the model picks worse when it has dozens of similar tools to choose from. The fix is to send fewer definitions per request, either by turning off tools you don’t use or by letting the client search for tools when it needs them.
Why do too many MCP tools hurt?
A client that loads tools upfront puts every definition from every connected server into the model’s context before you type anything. That has three effects:
- Tokens. Large servers ship long descriptions and nested JSON schemas. You pay for them on every turn, and they take room from the code and documents the agent is working on.
- Worse choices. Two servers that both have a
searchorlist_itemstool, or ten tools with near-identical descriptions, give the model more ways to call the wrong one. - Hard limits. Some clients cap how many tools a request can carry. VS Code’s Copilot Chat allows at most 128 tools per chat request and asks you to deselect tools past that.
How do I measure what my MCP tools cost?
Ask each server for its tool list and count the bytes. This is what a client sends to the model, before any formatting:
curl -s https://mcp.example.com/mcp \
-H "Authorization: Bearer $MCP_TOKEN" \
-H "Content-Type: application/json" \
-H "Accept: application/json, text/event-stream" \
-d '{"jsonrpc":"2.0","id":1,"method":"tools/list"}' | wc -cAt roughly four characters per token for JSON and English, divide by four for a rough token count. Servers that require a session need an initialize request first; the MCP Inspector shows the same list if you’d rather click than curl. Do this for each server you connect, add the numbers up, and you know your fixed cost per request.
How do I turn off MCP tools I don’t use?
Each client has its own switch, and they don’t all work at the same level:
- Claude Code
- Deny rules in
.claude/settings.jsonor--disallowedTools. A rule with a bare tool name, likemcp__github__delete_file, removes that tool from the model’s context. - Codex
enabled_tools(an allowlist) anddisabled_tools(a denylist, applied after it) under each[mcp_servers.<name>]table inconfig.toml.- Cursor
- Toggle whole servers on and off under Customize. Disabled servers don’t load or appear in chat.
- VS Code
- Deselect single tools or whole servers in the chat’s tools picker.
In Claude Code, deny the tools you never want an agent to reach for:
{
"permissions": {
"deny": [
"mcp__github__create_repository",
"mcp__github__fork_repository",
"mcp__github__delete_file"
]
}
}In Codex, an allowlist is shorter when you only need a few tools from a large server:
[mcp_servers.github]
url = "https://api.githubcopilot.com/mcp/"
bearer_token_env_var = "GITHUB_TOKEN"
enabled_tools = ["get_file_contents", "search_code", "search_issues", "list_pull_requests"]Start from what your agents actually call. If you have logs of tool calls, list the tools used in the last month and allow those. Everything else is a definition you pay for and never use.
Should the client search for tools instead of loading them all?
Yes, if your client supports it: deferring tools keeps their definitions out of context until the model asks for them. Claude Code does this by default. MCP tools are deferred and found on demand, and ENABLE_TOOL_SEARCH changes the behavior:
# Defer every MCP tool and find them on demand (the default)
ENABLE_TOOL_SEARCH=true claude
# Load tools upfront until they pass 5% of the context window
ENABLE_TOOL_SEARCH=auto:5 claudeauto loads tools upfront while they total under 10% of the context window and switches to search past that; false loads everything upfront. VS Code has a similar mechanism, virtual tools, which groups large tool sets and expands a group when the model needs it; its threshold is the github.copilot.chat.virtualTools.threshold setting.
The trade-off is a step: the model searches before it calls, so a task that uses one obvious tool takes an extra turn. Search also only finds tools whose descriptions match the words the model searches with, so servers with vague descriptions suffer most.
Should different projects load different servers?
Yes. Configure servers per project rather than globally, so a frontend repo doesn’t carry your billing and CRM servers. Claude Code reads a project’s .mcp.json and Cursor a project’s .cursor/mcp.json. Keep the global config for the two or three servers you use everywhere.
Tool answers count too
MAX_MCP_OUTPUT_TOKENS changes that). Prefer tools with filters and page sizes.Fewer tools in MCP1
MCP1 puts many servers behind one URL, so it has to solve this problem itself rather than pass it on to every client:
- Small gateways list their tools. When a gateway’s server tools fit in about 2k tokens, the client gets them directly and calls them like any other tool.
- Larger gateways list only MCP1’s own tools. The agent finds a server’s tool with
mcp1__search_tools(a query, an optional server and a limit) and runs it withmcp1__call_tool, so definitions stay at a few hundred tokens however many servers are connected. - A gateway per team. Support’s gateway carries support servers and engineering’s carries GitHub, Sentry and Linear, so nobody’s agent sees the other team’s tools.
- Rules and read-only grants remove tools. A tool a person can’t call isn’t listed or found for them, and tool names are namespaced as
server__tool, so two servers’searchtools never collide.
The docs cover gateways and rules, and How to make an MCP server read-only covers the other reason to hide tools.
Common questions
How many MCP tools is too many?
There’s no single number. Count tokens rather than tools: when definitions take a noticeable share of the context window, or the model starts calling the wrong tool, cut them down. VS Code caps a chat request at 128 tools.
Does disabling an MCP tool save tokens?
Yes, when the client drops it from the request. A Claude Code deny rule with a bare tool name and Codex’s enabled_tools both keep the definition out of the model’s context.
Do MCP tool results use context too?
Yes, and often more than definitions. Claude Code warns above 10,000 tokens per answer and cuts at 25,000 by default, which MAX_MCP_OUTPUT_TOKENS changes.
How do I turn off MCP tool search in Claude Code?
Set ENABLE_TOOL_SEARCH=false to load every MCP tool upfront, or auto to load them upfront only while they stay under 10% of the context window.
Give your team one URL
Create a workspace, install your servers and share a gateway with a group. Free for individuals.