[Bug] MCP tools consume excessive context on fresh initialization (14% of window)
Bug Description
All MCP tools are loaded automatically on fresh context using up 14% of the context window.
Environment Info
- Platform: darwin
- Terminal: ghostty
- Version: 2.1.105
- Feedback ID: bf1c4938-b624-473b-bb4f-a7898a9d979a
Problem
The official MCP docs state that Tool Search is enabled by default and MCP tools should be deferred and loaded on demand. In practice, Tool Search never activates — all MCP tools are loaded eagerly at session start, consuming ~30k tokens (15% of the 200k context window).
Debug evidence
The debug log shows:
[ToolSearch:optimistic] mode=standard, ENABLE_TOOL_SEARCH=undefined, result=false
After explicitly setting the env var:
[ToolSearch:optimistic] mode=standard, ENABLE_TOOL_SEARCH=true, result=false
The env var is read correctly but result is still false. All 21 MCP servers (1 local + 19 claude.ai marketplace + 1 project-level) connect eagerly at startup and inject their full tool schemas into context.
What I tried
- Default (no env var) —
result=false export ENABLE_TOOL_SEARCH=true— stillresult=false
Expected behavior
Per the docs at https://code.claude.com/docs/en/mcp:
Tool search is enabled by default. MCP tools are deferred rather than loaded into context upfront, and Claude uses a search tool to discover relevant ones when a task needs them.
This issue has 3 comments on GitHub. Read the full discussion on GitHub ↗