feat: improve /doctor MCP context warning with actionable recommendations
Resolved 💬 2 comments Opened Jan 4, 2026 by shkao Closed Jan 4, 2026
Summary
The /doctor command shows a helpful warning when MCP tools context exceeds the 25,000 token threshold, but the output is purely informational without actionable guidance on how to reduce context usage.
Current Behavior
Context Usage Warnings
└ ⚠ Large MCP tools context (~38,328 tokens > 25,000)
└ MCP servers:
└ obsidian-notes: 25 tools (~17,398 tokens)
└ pubmed-search: 8 tools (~6,468 tokens)
└ zh-tw-translator: 6 tools (~5,764 tokens)
└ netnewswire-mcp: 6 tools (~5,565 tokens)
└ skillsmp: 5 tools (~3,133 tokens)
Proposed Improvements
1. Show context budget percentage
Help users understand severity at a glance:
└ ⚠ Large MCP tools context (~38,328 tokens, 153% of 25k budget)
2. Rank servers by impact
Sort servers by token usage (descending) and highlight the top offender:
└ MCP servers (sorted by impact):
└ 🔴 obsidian-notes: 25 tools (~17,398 tokens, 45%) ← largest
└ pubmed-search: 8 tools (~6,468 tokens, 17%)
...
3. Provide actionable recommendations
└ Recommendations:
└ Consider disabling 'obsidian-notes' to save ~17k tokens
└ Run 'claude mcp list' to see all servers
└ Run 'claude mcp disable <server>' to disable a server
└ See docs: https://docs.anthropic.com/claude-code/mcp#context-management
4. Show per-tool breakdown (optional verbose mode)
For power users who want to selectively disable tools:
$ claude doctor --verbose
└ obsidian-notes (25 tools, ~17,398 tokens):
└ obsidian_search_advanced: ~1,200 tokens
└ obsidian_patch_note: ~800 tokens
└ ... (23 more)
5. Estimate conversation impact
Help users understand the practical effect:
└ Impact: ~38k tokens reduces max conversation by ~19 exchanges
Why This Matters
- Users seeing this warning often don't know what to do about it
- MCP servers can silently consume significant context budget
- Without guidance, users may ignore the warning or not realize which server to address
- The current output requires mental math to understand which server is the biggest problem
Additional Context
This becomes more important as users install multiple MCP servers. The warning is good—making it actionable would be great.
🤖 Generated with Claude Code
This issue has 2 comments on GitHub. Read the full discussion on GitHub ↗