Context Mode - An MCP Server That Cuts AI Coding Agents' Context Window by 98%
·2026.05.03 09:31
Key point
Context Mode, built for AI coding agents, has been introduced as reducing context usage by 98%.
Details
Context Mode is a local server designed to prevent raw data coming in from MCP tool calls from piling up directly in the context window.
- It isolates raw data in a sandbox, claiming 315KB → 5.4KB, i.e. a 98% reduction.
- It states that it extends session duration from about 30 minutes → 3 hours.
- It stores file edits, git operations, tasks, errors, and user decisions in SQLite + FTS5 and retrieves them via BM25 search to restore session continuity.
- Instead of having the LLM read data directly, it writes a script and receives only the results, reducing output tokens by 65–75% while maintaining technical accuracy, according to the explanation.
- It supports 14 platforms including Claude Code, Codex CLI, Gemini CLI, and Cursor, with session continuity support varying depending on the
PreToolUse,PostToolUse,SessionStart, andPreCompacthooks. - It provides 11 MCP tools such as
ctx_execute,ctx_batch_execute,ctx_execute_file,ctx_index,ctx_search, andctx_fetch_and_index, and applies Claude Code'spermissionsdeny/allow rules to the sandbox as well. - It emphasizes fully local execution, with no telemetry, cloud sync, or usage tracking, and the SQLite DB is stored in the home directory.
- The license is Elastic License 2.0.
This summary was generated automatically by AI. Check the original for the author's claims and context. Copyright belongs to the original author.
Our guide explains how the AI works. Report summary errors, attribution issues, or removal requests via Contact.