Updated October 2026. Two corrections and a lot of movement since May. Codex CLI was already deferring MCP tools behind tool_search when this was published, and since v0.142 it defers every MCP tool on models that support search. VS Code issue #290356 was closed in January as fixed by virtual tools, and Copilot now uses tool search for Claude 4.5+ (rolling out to GPT-5.4+) and skips its 128-tool check for those models. Claude Code’s tool search now covers Haiku 4.5+, gateways, and Vertex AI. On supported models, all four agents now load MCP schemas on demand; the sections below are corrected to match.
The Bottom Line
As coding agents adopt the Model Context Protocol, it has become routine to wire up 5–15 MCP servers exposing 100–300 tools. Loading every tool schema on every turn imposes a steep tool tax: 50–140K tokens of input, slower startup, degraded tool-selection accuracy past roughly 30–50 tools, and — on models without tool search — hard rejections at Copilot’s 128-tool ceiling.
The four major coding agents have converged on the same architectural pattern — defer tool schemas, load on demand — but ship four different, non-interoperable implementations. The defaults, and which models get them, differ enough to change which workloads each agent can handle without intervention.
| Agent | Mechanism | Default state | Upfront cost at 200 tools |
|---|---|---|---|
| Claude Code | API-native tool_search_tool |
On by default | ~3–5K tokens |
| Cursor | Files synced to disk + grep | On by default | ~2–4K tokens |
| GitHub Copilot | Tool search (newer models) + “virtual tools” embedding clusters | Model-gated; clusters above threshold | ~5–10K (clusters); 128 cap on models without search |
| Codex CLI | OpenAI tool_search (deferred MCP tools) |
On for models with search; eager otherwise | Deferred with search; ~50K every turn without |
The pattern is becoming industry-standard. The wire formats are not. Until MCP adds a discovery primitive, each agent’s behavior at scale will diverge in the ways documented below.
The Problem: What a 200-Tool Catalog Actually Costs
Each MCP tool schema — name, description, JSON-Schema parameters — costs roughly 250–700 tokens depending on verbosity. Real-world measurements:
- mcp-omnisearch (20 tools): ~14,114 tokens — ~706 tokens/tool
- playwright MCP (21 tools): ~13,647 tokens — ~650 tokens/tool
- Representative 10-server, 200-tool catalog: 50,000–140,000 tokens
Three compounding failure modes appear at scale:
- Context displacement. On a 200K-token window, eager loading consumes 25–70% of context before the agent reads a single file.
- Selection accuracy collapse. Models lose tool-selection accuracy past ~30–50 visible tools; with 200, they reliably pick the wrong tool or miss the right one.
- Hard client limits. Copilot in VS Code rejects requests carrying more than 128 tools on models without tool search (GPT-4.1 among them). Virtual-tool grouping normally keeps requests under the cap; if grouping fails, the request is rejected before execution.
This is not a theoretical scaling concern. It is the dominant cost item in any multi-MCP setup today.
Implementation 1 — Claude Code: API-Native Tool Search
Anthropic ships tool_search_tool_regex_20251119 and tool_search_tool_bm25_20251119 as first-class API features. In Claude Code, MCP tools are deferred and discovered on demand by default; at session start the agent sees tool names, server instructions, and the search tool, plus full schemas only for tools marked alwaysLoad.
The flow:
- The agent decides it needs a capability.
- It issues a regex or BM25 query against the registered tool index.
- The API returns matching
tool_referenceblocks (up to 5 by default; the limit is adjustable). - The chosen reference expands into a full schema only at the moment of use.
Limits and caveats worth knowing before you trust the default:
- Catalog ceiling: 10,000 tools.
- Descriptions are capped: 4,096 characters for server instructions and upfront tools, 16,384 for tools loaded through search (raised from 2,048; override with
CLAUDE_CODE_MAX_MCP_DESCRIPTION_LENGTH). - On by default through gateways set with
ANTHROPIC_BASE_URL(Claude Code retries without it if the gateway rejects it) and on Vertex AI for Claude 4.5-generation models and later. Azure-hosted Microsoft Foundry deployments reject it. - Works on current models, including Haiku 4.5 and the Claude 5 family; older models fall back to loading tools upfront.
For 200 tools, this collapses the upfront cost from ~50K tokens to ~3–5K — a >90% reduction. Anthropic’s published figure is >85% across typical multi-server setups.
Implementation 2 — Cursor: Files-as-Discovery-Surface
Cursor explicitly rejected the dedicated-search-tool approach and instead syncs MCP tool descriptions to a folder on disk. The agent receives only tool names in static context and discovers full schemas by grep-ing or semantic-searching the synced folder when a task calls for it.
This is part of a broader “everything is a file” strategy: Cursor applies the same primitive to Agent Skills, long terminal output, and oversized tool responses. The file surface unlocks capabilities the API-level approach cannot — notably, surfacing MCP server status (re-authentication needed, server unhealthy) without forgetting the tools entirely.
A/B test results published January 2026 reported a 46.9% reduction in total agent tokens on runs that called an MCP tool. Schema-only reduction is higher; the 46.9% is across all session content.
Implementation 3 — GitHub Copilot: Virtual Tools
Copilot took a third path: embedding-guided clustering. Functionally similar tools are grouped using an internal embedding model and cosine similarity, with each cluster summarized by a single model call (cached locally). The agent sees the cluster summaries and expands a cluster only when its task matches.
In published benchmarks (SWE-Lancer, SWEbench-Verified), this approach improved success rates by 2–5 percentage points with both GPT-5 and Sonnet 4.5, and cut response latency by ~400ms.
Since then Copilot has added a second mechanism, and the conditions depend on the model:
- Tool search on newer models. VS Code 1.109 brought Anthropic’s tool search to Copilot; it is on by default for Claude Sonnet 4.5+ and Opus 4.5+ and rolling out to GPT-5.4 and GPT-5.5, and 1.118 trimmed the always-loaded core to ~30 tools. For tool-search models, the 128-tool check is skipped.
- 128-tool cap for everything else. Models without tool search (GPT-4.1 included) still hit a 128-tool limit. Virtual-tool grouping keeps requests under it unless grouping fails — for example during an embeddings-service outage. VS Code issue #290356 was closed on that basis in January 2026.
- Threshold-gated clustering. Virtual tools activate when the experimental
github.copilot.chat.virtualTools.thresholdsetting (default 128) is crossed; below threshold, tools are still loaded eagerly.
Copilot CLI followed in May 2026 with experimental tool search and deferred loading for MCP tools.
Implementation 4 — OpenAI Codex CLI: Model-Gated Tool Search
Codex CLI wires MCP tools to the OpenAI API’s tool_search (defer_loading: true, GPT-5.4 and later). Since v0.142 it defers every MCP tool when the active model supports search; by v0.119 (April 2026) it already deferred them behind tool_search at 100+ tools or behind a feature flag. On models without search support, Codex still exposes every MCP tool on session start.
Static controls still matter:
enabled_tools = […]anddisabled_tools = […]allow/deny lists per server.enabled = falseto disable a server without removing config.- Project-scoped
.codex/config.tomlfor narrower scoping (trusted projects only). mcp_optional_startup_grace_ms(default 1000) bounds how long optional servers can delay startup.
Known scaling issues with many servers:
- MCP startup used to sit on the first-turn critical path. Since CLI 0.162.1, optional servers get a shared, bounded grace period, so one slow server no longer stalls the session; servers declared as explicit dependencies still wait.
- Sub-agents inherit the parent’s MCP servers, and a custom agent file can’t narrow them; per-agent MCP scoping is still an open issue (#20135).
On a model without search support, 200 tools still cost the full ~50K tokens on every turn — ~500K tokens of pure tool-definition overhead across a 10-turn session. On a search-capable model, Codex lands in the same deferred band as the others.
Token Economics at 200 Tools
Assuming a representative MCP catalog with ~250 tokens per tool schema (conservative; verbose servers run 2–3× higher):
| Agent | Upfront | Per-turn | 10-turn overhead |
|---|---|---|---|
Claude Code (tool_search on) |
3–5K | 3–5K + ~500 per expansion | 30–50K |
| Cursor (DCD on) | 2–4K | 2–4K + ~400 per file read | 20–40K |
| GitHub Copilot (virtual tools, <128) | 5–10K | 5–10K + cluster expansions | 50–100K |
| Codex CLI (model without search) | 50K | 50K | 500K |
Key implications. On a 200K-token window, eager loading — Codex on a model without search, or any agent with deferral switched off — consumes 25% of context before any work starts; with verbose servers, this rises to 70%. The deferred paths leave essentially all of context available for the actual task. Over a multi-turn session, eager per-turn cost compounds linearly — what costs $X in the first turn costs ~$10X across ten turns.
Practical Guidance
For multi-MCP workloads (5+ servers, 100+ tools), the agent choice materially affects what’s possible:
- Verify defaults are active.
- Claude Code: tool search is on by default, gateways included. Confirm
ENABLE_TOOL_SEARCHis notfalseandCLAUDE_CODE_DISABLE_EXPERIMENTAL_BETASis unset (it forces tool search off);auto/auto:Ndefer only past a context threshold. - Copilot: use a tool-search model (Claude Sonnet/Opus 4.5+, GPT-5.4+ as it rolls out). On other models, lower
github.copilot.chat.virtualTools.threshold(default 128) to start clustering earlier. - Cursor: dynamic context discovery is on by default — no action needed.
- Claude Code: tool search is on by default, gateways included. Confirm
- For Codex CLI: run a model that supports
tool_searchso MCP tools are deferred. Still scope with project-level.codex/config.tomlandenabled_toolsallowlists — sub-agents inherit every server. Treat global MCP config as a superset; on models without search, expect 30–50 active tools max for healthy operation. - For Copilot at 128+ tools on a model without tool search: the cap is enforced at the VS Code layer before the agent processes anything. Virtual-tool grouping keeps you under it unless grouping fails. Trim selected tools manually, split work across sessions, or switch to a tool-search model.
- MCP server design: prefix tool names by server (
matrix_query_*,quality_metric_*) so search and clustering have clean signal. Keep tool descriptions concise — Claude Code caps them at 4,096 characters for upfront tools and server instructions.
Where the Standard Is Heading
All four implementations solve the same problem and converge on the same architectural shape: a small persistent surface (search tool, file index, cluster summaries) plus on-demand schema expansion. None of the wire formats interoperate. As of the 2026-07-28 spec revision, MCP itself ships notifications/tools/list_changed for dynamic catalogs but no standardized search or defer primitive that clients and servers agree on. A Progressive Disclosure working group is now exploring grouping and tool search as extensions; nothing has shipped in the spec yet.
The pattern is industry-standard. The interface is not. Anthropic’s tool_search_tool_*, OpenAI’s tool_search + defer_loading, Cursor’s file sync, and Copilot’s virtual tools each remain vendor-specific. Until MCP adds a discovery primitive, each agent’s behavior at scale will diverge in the ways documented here — and the choice of agent will continue to be, in part, a choice of how much context tax you’re willing to pay per turn.
Sources
- Anthropic:
tool_search_tooldocumentation, Claude Code MCP docs - Cursor blog: “Dynamic context discovery” (January 2026)
- GitHub blog: “How we’re making GitHub Copilot smarter with fewer tools” (November 2025)
- OpenAI Developers: Codex CLI MCP reference,
tool_searchAPI guide - Real-world MCP tool-cost measurements: Scott Spence, October 2025
- VS Code issue #290356 (128-tool cap; closed as fixed by virtual tools, January 2026)
- VS Code release notes 1.109 and 1.118 (tool search, compact tool core)
- GitHub Copilot CLI issue #2992 (sub-agent tool scoping, April 2026) and changelog 1.0.49 (deferred MCP tools)
- Codex CLI release 0.119.0 and PR #29486 (MCP tools deferred under
tool_search) - Codex CLI issue #21318 (MCP startup blocking, May 2026; closed October 2026) and issue #20135 (per-agent MCP scoping)
- MCP specification 2026-07-28 changelog; Progressive Disclosure working group