Every MCP tool call in Claude Code dumps raw data into the 200K context window. A Playwright snapshot costs 56 KB. Twenty GitHub issues cost 59 KB. One access l…
Every MCP tool call in Claude Code dumps raw data into the 200K context window. A Playwright snapshot costs 56 KB. Twenty GitHub issues cost 59 KB. One access log — 45 KB. After 30 minutes, 40% of context is consumed by tool outputs alone.
With 81+ tools active, 143K tokens (72%) are consumed by tool definitions before the first message.
MCP's design has a tension: every tool interaction fills the context window from both sides — definitions on the way in, raw output on the way out. Tool outputs are unoptimized, returning full data when summaries would suffice.
An MCP server that sits between Claude Code and tool outputs, compressing responses:
Claude Code → MCP Context Mode → Actual MCP Server
↓
315 KB → 5.4 KB (98% reduction)| Strategy | Example |
|---|---|
| Summarize | Full page snapshot → key elements only |
| Filter | 20 GitHub issues → only titles + labels |
| Truncate | 45 KB log → error lines only |
| Structure | Raw HTML → semantic JSON |
| Tool | Raw Output | After Context Mode | Reduction |
|---|---|---|---|
| Playwright snapshot | 56 KB | ~1 KB | 98% |
| gh issue list (20) | 59 KB | ~1 KB | 98% |
| Access log | 45 KB | ~0.5 KB | 99% |
grep -i mcp lessons/contrib/mcp-*.md 2>/dev/null | head -3
echo MCP verifiedExpected Output:
# (refs)
MCP verified