Back to browse
GitHub Repository

Context window optimization for AI coding agents. Sandboxes tool output, 98% reduction. 15 platforms

16,339 starsTypeScript

Context Mode – 315 KB of MCP output becomes 5.4 KB in Claude Code

by mksglu·Feb 25, 2026·84 points·23 comments

AI Analysis

●●●BangerSolve My ProblemBig BrainShip It

Context compression for Claude Code—98% reduction, 315KB becomes 5.4KB, extends sessions 6x.

Strengths
  • Directly solves a real Claude Code pain point with quantified proof (40% context loss in 30min → 3hr sessions).
  • Thoughtful architecture: executes in sandboxes so raw outputs never bloat context, supports 10 runtimes.
  • FTS5 BM25 search + batch execution means summaries are queryable, not lossy text truncation.
Weaknesses
  • Tightly coupled to Claude Code ecosystem; unclear if it works with other MCP clients.
  • Depends on user adoption—only valuable if MCP tool ecosystem continues expanding with verbose outputs.
Target Audience

Claude Code users hitting context window limits with heavy MCP tool usage

Similar To

Cloudflare Code Mode (inverse problem: compresses tool definitions)

Post Description

Every MCP tool call dumps raw data into Claude Code's 200K context window. A Playwright snapshot costs 56 KB, 20 GitHub issues cost 59 KB. After 30 minutes, 40% of your context is gone. I built an MCP server that sits between Claude Code and these outputs. It processes them in sandboxes and only returns summaries. 315 KB becomes 5.4 KB. It supports 10 language runtimes, SQLite FTS5 with BM25 ranking for search, and batch execution. Session time before slowdown goes from ~30 min to ~3 hours. MIT licensed, single command install: /plugin marketplace add mksglu/claude-context-mode /plugin install context-mode@claude-context-mode Benchmarks and source: https://github.com/mksglu/claude-context-mode Would love feedback from anyone hitting context limits in Claude Code.

Similar Projects