MCP server that reduces Claude Code context consumption by 98%
TL;DR Highlight
When MCP tool calls return raw verbose output, it eats context window fast — here's a pattern to compress tool outputs before they hit the LLM.
Who Should Read
Developers building MCP servers or AI agent pipelines where tool call outputs are large and verbosity is killing context window efficiency.
Core Mechanics
- The core problem: MCP tools often return raw, verbose output (full API responses, stack traces, large data blobs) that gets dumped directly into the LLM's context window.
- This wastes context tokens on information the LLM doesn't need, increases latency, and raises costs.
- The solution pattern: add a 'summarizer' or 'filter' layer between the tool execution and the context — transform raw outputs into compact, LLM-relevant summaries before they're inserted.
- For structured data (JSON API responses), extract only the fields the agent actually needs. For errors, compress to key error type + message. For large text, summarize.
- This can be implemented as a middleware layer in the MCP server, or as a post-processing step in the agent loop.
Evidence
- The author demonstrated context window savings of 60–80% on common tool outputs (API responses, file reads, terminal output) by applying output compression.
- HN commenters shared similar patterns they'd developed — some using a small/fast LLM as the summarizer to avoid adding latency.
- One commenter noted this is essentially the 'perception-action loop' problem in cognitive architectures: you need selective attention, not full sensory input.
How to Apply
- When building MCP servers, define an output schema for each tool that specifies what fields are relevant for the agent — filter raw outputs to only those fields.
- For tools that return large text (documentation, file contents), add a max_tokens parameter and truncate with a summary suffix rather than passing the full text.
- Consider using a fast/cheap LLM (like GPT-4o-mini or Haiku) as a summarizer for tool outputs before they reach the main agent model — the cost savings on the main model usually outweigh the summarizer cost.
- Log both the raw tool output and the compressed version during development to tune your compression strategies.
Code Example
# MCP-only installation (tool use only)
claude mcp add context-mode -- npx -y context-mode
# Plugin Marketplace installation (includes auto-routing hook + slash command)
/plugin marketplace add mksglu/claude-context-mode
/plugin install context-mode@claude-context-modeTerminology
Related Papers
Ask HN: Anthropic banned me from using Claude Code and I don't know what to do
VPN 사용 또는 동일 카드 재사용으로 Anthropic Claude Code 계정이 이유 불명으로 정지당한 사용자의 사례와, 커뮤니티에서 나온 대안 및 우회 방법 논의.
Moebius: 0.2B image inpainting model with 10B-level performance
FLUX.1-Fill-Dev(11.9B) 대비 2% 미만의 파라미터(0.22B)로 동급 또는 그 이상의 인페인팅 품질을 달성하면서 추론 속도는 15배 빠른 경량 모델. 소비자용 GPU나 엣지 디바이스에서도 고품질 인페인팅이 가능해진다.
AI Compute Extensions (ACE) Specification
x86 Ecosystem Advisory Group이 행렬 곱셈과 저정밀도 데이터 포맷을 하드웨어 수준에서 가속하는 새로운 x86 명령어 확장 스펙 ACE를 공개했다. ML 워크로드를 CPU에서 더 효율적으로 돌리기 위한 ISA(명령어 집합 구조) 수준의 변화라 향후 AI 추론 환경에 영향을 줄 수 있다.
Show HN: High-Res Neural Cellular Automata
EPFL과 Google Research가 공동 개발한 Neural Cellular Automata(NCA)를 고해상도로 확장하는 기법으로, 기존 NCA의 해상도 한계를 경량 신경망 디코더로 극복한 SIGGRAPH 2026 논문이다.
Claude: Elevated errors across many models [resolved]
2026년 6월 16일 약 2시간 동안 Claude의 Sonnet, Opus, Haiku 모델 전반에 걸쳐 10% 수준의 오류율이 발생한 인시던트 보고서. Claude API에 의존하는 서비스 운영자에게 장애 대응 방식과 신뢰성 문제를 다시 생각하게 만드는 사건.
Ask HN: Has anyone replaced Claude/GPT with a local model for daily coding?
Hacker News에서 Claude/GPT를 로컬 LLM으로 완전 대체한 개발자들의 실제 셋업과 성능 경험담을 공유한 스레드로, Qwen3.6 35B를 중심으로 구체적인 하드웨어·속도·한계점까지 담겨 있어 로컬 AI 코딩 도입을 고민하는 개발자에게 현실적인 참고 자료가 된다.