GitHub - mksglu/context-mode: Context window optimization for AI coding agents. Sandboxes tool output, 98% reduction. 12 platforms
Context Mode is an MCP server that reduces AI coding agent context window consumption by up to 98% through three mechanisms: sandboxed tool execution (raw data never enters context), SQLite-backed session continuity with FTS5/BM25 search for compaction recovery, and a 'think in code' paradigm where the LLM generates scripts instead of reading raw data. It supports 12 platforms including Claude Code, Cursor, Gemini CLI, VS Code Copilot, and others, with varying levels of hook-based routing enforcement. Benchmarks show a Playwright snapshot shrinks from 56 KB to 299 B, and a full session compresses from 315 KB to 5.4 KB, extending usable session time from ~30 minutes to ~3 hours.