/* engineering · 2026-05-10 · tool-selection failure */

Claude Code Stalls Above ~25 MCP Tools — Measured, Fixed in v0.20.9

2026-05-10 ~6 min read Part of: Claude Code troubleshooting pillar

Reports of Claude Code freezing on tool selection when an MCP server exposes "too many" tools have been stacking up across r/mcp, r/ChatGPTCoding, and our own issue tracker for weeks. This week a user pushed back with measurements from his proxy setup. We reproduced the stall, shipped a 6-tool default profile in v0.20.9, and added an end-to-end MCP dispatch probe to sverklo doctor so the fix is verifiable on every fresh install.

The symptom

You install an MCP server. You restart Claude Code. The tool list shows up in /mcp. You ask a question that should obviously route to one of the new tools. Claude Code either ignores them and falls back to grep, or it sits visibly thinking longer than it should before picking the wrong one.

"I've been trying to use this for the past few hours but even with the giant block in the agent file I cannot get Claude Code to actually use it." — Ian Costa, on Dan Luu's X thread, 2026-05-09

This is a tool-selection failure, not an install failure. The MCP wiring is correct — tools/list returns the tools, tools/call works on direct invocation. What breaks is the agent's selection step: faced with a long list of options, the model either freezes, picks the safest fallback (grep), or thrashes between candidates.

The measurement

We tested with sverklo's full profile (36 tools advertised) stacked alongside Claude Code's built-ins (~10-15 depending on session). The combined tool list crosses the threshold above which selection accuracy degrades.

ProfileToolsSystem promptStall on cold session
full368,016 tokensYes (reproducible)
research183,950 tokensSometimes
lean113,469 tokensNo
review102,788 tokensNo
core (new default)61,522 tokensNo

The empirical threshold sits around 25 advertised tools per session. Below that, selection works. Above it, you start losing routing accuracy. Above 35-40, the manifest displaces 5-10% of usable context window before any tool fires.

Industry signal corroborates this — Atlassian's mcp-compressor write-up claims 70-97% reduction is achievable; Anthropic's Tool Search went GA partly to address this; The New Stack reports cases of "55-77K tokens before any work begins" with multiple MCP servers stacked.

The fix path

v0.20.9 ships SVERKLO_PROFILE=core as the default in .mcp.json when you run sverklo init. Six tools, 1,522 tokens, no manual env var to remember:

npm i -g sverklo@latest
cd your-project
sverklo init
sverklo doctor

For users on a pre-v0.20.9 install, sverklo init includes a soft migration: if your existing .mcp.json has the sverklo entry but no env block, it appends SVERKLO_PROFILE=core automatically. If you already set a profile, it leaves your choice alone.

What's in the core profile

Six tools that cover the 80% of code-intel sessions where users actually reach for an MCP server:

The remaining 30 tools — audit, diff-aware review, memory, concept clustering, ctx-handle ops — stay available via SVERKLO_PROFILE=lean | research | review | full when those workflows are active.

Verifying it works

The other half of v0.20.9 is sverklo doctor with a full MCP round-trip probe:

$ sverklo doctor
sverklo doctor — checking MCP setup

  ✓ sverklo binary               /opt/homebrew/bin/sverklo
  ✓ version                      sverklo v0.20.14
  ✓ embedding model              86MB at ~/.sverklo/models/model.onnx
  ✓ .mcp.json (project root)     sverklo configured (profile: core)
  ✓ permissions auto-allow       sverklo tools won't prompt for approval
  ✓ prefer-sverklo instructions  installed in CLAUDE.md
  ✓ MCP handshake                responds correctly (protocol 2024-11-05)
  ✓ MCP tools/list               6 tools advertised (sverklo_status present)
  ✓ MCP tools/call               sverklo_status returned 1021 chars — dispatch round-trip works

All checks passed — MCP dispatch verified end-to-end.
If Claude Code was running before init, restart it to pick up the new config.

The new probe runs the same three calls Claude Code makes on every cold session: initializetools/listtools/call sverklo_status. Passing this is positive proof the wiring works, not just that the binary speaks JSON-RPC. The previous "MCP handshake responds correctly" check only verified the first step, which led to "doctor passed but Claude still doesn't call sverklo" reports.

What this doesn't fix

Profile-filtering shrinks the tool list one server advertises. It doesn't fix:

Try the fix

npm i -g sverklo@latest
cd your-project && sverklo init    # writes profile=core
sverklo doctor                       # verifies end-to-end MCP dispatch

One install, one verification. github.com/sverklo/sverklo · Full troubleshooting pillar · Deep dive: SVERKLO_PROFILE vs Code Mode

Related