`/context` under-reports MCP tool schema consumption (shows 0 tokens per tool, actual ~100K hidden in "Messages")
Summary
The /context command reports each MCP tool as consuming 0 tokens, but in reality the combined cost of tool schemas (name + description + JSONSchema parameters) can exceed 100K tokens on a fresh session. The real cost is absorbed into the Messages category, making it effectively impossible for users to audit which MCP servers are bloating their context window.
Environment
- Claude Code CLI
v2.1.112(also reproducible on earlier 2.x) - Platform: Windows 11 (also reported via bash/git-bash and WSL)
- Provider: any (tested with both native Anthropic and a third-party via
ANTHROPIC_BASE_URL=https://api.minimax.io/anthropic) - MCPs tested: mix of plugin-registered and Claude.ai account-level connectors (Canva, ClickUp, Figma, Gmail, Google Calendar, Hugging Face, Linear, Notion, Vercel, GitHub, Chrome DevTools, Playwright, Telegram, etc.)
Reproduction
- Have several MCP servers active (ideally 10+ servers totalling ~200+ tools — trivially reproduced for any user with Claude.ai account connectors + a few plugin MCPs).
- Start a fresh CLI session.
- Run
/clear. - Send a minimal prompt, e.g.
hi. - Run
/context.
Expected
Each MCP tool's schema consumption is either:
- Shown as a non-zero per-tool cost, OR
- Aggregated into a dedicated
MCP toolscategory with realistic tokens, separate fromMessages.
Actual
Every individual MCP tool is listed as 0 tokens, yet Messages reports ~100K+ tokens on a brand-new session with nothing but hi. The user has no way, from /context, to attribute that cost to MCP.
Evidence (side-by-side measurement)
Identical fresh sessions, identical prompt (hi), only variable: which MCPs are enabled.
Before disabling account-level MCPs
Context Usage — MiniMax-M2.7-highspeed
151.6k / 200k tokens (76%)
Estimated usage by category
System prompt: 5.8k tokens (2.9%)
Custom agents: 4.7k tokens (2.3%)
Memory files: 2.8k tokens (1.4%)
Skills: 16.8k tokens (8.4%)
Messages: 121.6k tokens (60.8%) ← hidden MCP cost lives here
Free space: 15.4k (7.7%)
Autocompact buffer: 33k (16.5%)
MCP tools · /mcp
└ mcp__claude_ai_Canva__cancel-editing-transaction: 0 tokens
└ mcp__claude_ai_Canva__comment-on-design: 0 tokens
└ ... [~280 tool entries, EVERY ONE showing 0 tokens]
After /mcp disabling all 12 Claude.ai account-level connectors (plugin MCPs left alone)
Context Usage — MiniMax-M2.7-highspeed
51.1k / 200k tokens (26%)
Estimated usage by category
Custom agents: 5.1k tokens (2.6%)
Skills: 15.2k tokens (7.6%)
Messages: 30.8k tokens (15.4%) ← dropped by ~93K
Free space: 115.9k tokens (58.0%)
Autocompact buffer: 33k (16.5%)
Delta
| Metric | Before | After | Delta |
| --------------- | ------- | ------ | -------- |
| Total used | 151.6K | 51.1K | -100.5K |
| Messages | 121.6K | 30.8K | -93.3K |
| Free space | 15.4K | 115.9K | +100.5K |
Disabling ~280 MCP tools removed ~100K tokens — averaging ~360 tokens per tool schema — yet every one of those tools was reported as "0 tokens" in /context in both runs.
Impact
- Silent exhaustion: Users see high context consumption with no way to identify the cause. New users blame the model, their prompt, or the CLI itself.
- Unmeasurable optimisation: Users cannot see which MCPs are expensive vs. cheap. Disabling the wrong ones wastes time.
- Compounds with issue #46416: When CC falls back to a 200K window for unknown third-party providers, losing 100K+ to invisible MCP schemas on startup makes the CLI effectively unusable for long sessions.
- Discoverability of connector inheritance: Without a clear per-MCP cost display, users don't realise that Claude.ai account connectors (Desktop) are loaded into CLI. (This is the subject of a separate issue.)
Suggested Fix
Pick one (or combine):
Option A — Attribute tokens per tool / per server
Show the real schema cost per tool or, at minimum, per MCP server:
MCP tools · /mcp
└ claude.ai Canva: 12.4k tokens (31 tools)
└ claude.ai ClickUp: 18.0k tokens (45 tools)
└ plugin github: 16.2k tokens (41 tools)
...
Option B — Add a dedicated category
Split Messages into Messages (conversation) and MCP tool schemas, so users can see MCP tool schemas: 93K at a glance.
Option C — At minimum, document it
Update the /context docs and the CLI help to state that MCP tools are counted inside Messages and that the displayed per-tool 0 tokens is the deferred-load incremental cost, not the baseline schema cost.
---
Additional debugging info (for Anthropic engineers)
The ~360 tokens/tool average is consistent with a full tool schema: name + description + JSONSchema parameters with types and documentation. Cross-check with ToolSearch: when a deferred tool is searched, its schema is loaded on top of whatever baseline already exists — suggesting the 0 tokens figure in /context is the incremental cost after a search, not the baseline schema catalog cost.
A user-level audit script confirmed the OAuth scope user:mcp_servers in ~/.claude/.credentials.json triggers account-level connector loading in CLI, but the per-tool cost attribution in /context remains 0 regardless of whether the connector is local (plugin), remote (account), or hybrid.
---
Happy to provide additional traces, /context dumps, or env details on request.
This issue has 4 comments on GitHub. Read the full discussion on GitHub ↗