Context Mode: an MCP server claiming 98% context savings for coding agents
Context Mode is an MCP server that aims to keep raw tool output out of a coding agent's context window, claiming it can shrink 315 KB of data to 5.4 KB (roughly a 98% reduction) by sandboxing tool results. It persists session state — file edits, git operations, tasks, errors and user decisions — in SQLite, indexes events into FTS5 and retrieves only relevant items via BM25 search so a model can resume after a conversation compaction; without --continue, previous session data is deleted. The project says it supports 17 clients including Claude Code (installed via its plugin marketplace), Gemini CLI, VS Code and JetBrains Copilot, and GitHub Copilot CLI, plus an OpenClaw gateway integration, using hooks and 11 MCP tools for routing. It also pushes the "think in code" pattern — one script instead of many reads (it cites 47 Read calls ≈700 KB versus one ctx_execute ≈3.6 KB) — and says it deliberately avoids enforcing output brevity because aggressive brevity prompts have been reported to hurt coding and reasoning benchmarks (it cites Moonshot AI on kimi-k2.5). All quantitative savings figures are the project's own claims without independent verification.
Context limits and post-compaction amnesia are persistent pain points for long-running coding agents, so an effective sandbox-plus-indexed-memory approach could influence how agent toolchains are built.