Measured: loaded MCP tool schemas get billed on every later call in Claude Code
Patient_Way_483 · reddit · 2026-12-04
The author measured Claude Code's on-demand MCP schema loading and found a hidden cost:
- Since November Claude Code only puts tool names (12-35 tokens each) in the system prompt, loading schemas on demand — apparently a saving.
- Once loaded, a schema is written into the cached prefix and read (billed) on every subsequent call for the rest of the session. At turn 5: +1,536 tokens for one exact-named tool, +7,456 after a keyword search loaded 5 schemas.
- Setup: stub MCP server with 80 tools, 4,518-byte schemas each; Claude Code 2.1.335, Opus 5.5, costs read from stream-json (input + cachecreation + cacheread).
- A keyword ToolSearch loaded 5 schemas to answer a question about one tool; exact naming cost a fifth as much.
- No in-session way to unload; only a new session starts clean. /clear and compaction untested.
Takeaway: with 150+ MCP tools, the lookup is what costs, not the connection — name tools explicitly in prompts.
More from coding & agent
- ssh-seed: one 32-byte seed derives per-server SSH keys for post-quantum migration — jedisct1 · 2026-12-04
- Cameron Wolfe's deep dive on agentic RL: frameworks and best practices for training LLM agents — cwolferesearch · 2026-12-04
- Telling Claude "I'm going to bed" keeps coding agents from stopping and acting proactively — rudrank · 2026-12-04
- Agent Memory Leaderboard Cycle 2: MemoraX keeps top spot among 62 entries — Desperate-Ride8765 · 2026-12-04
- We tested an agent control layer on Berkeley's Agents' Last Exam: 5,491 actions checked, near-zero overhead — Fun-Government-8007 · 2026-12-04
- How an $8K AI project grew into $35K/month across 4 teams — aryanXmahajan · 2026-12-04