Context Mode
contextmode.ai
Free local MCP plugin that keeps raw tool output out of your coding agent's context window and restores session state after compaction.
- Pricing
- Free
- Published
- Nov 3, 2026
Next steps
- Kero
Both tools are listed under AI Code Assistant, AI Developer Tools, codex, and claude-code.
- Claude Squad
Both tools are listed under AI Code Assistant, AI Developer Tools, codex, and claude-code.
- nodeterm
Both tools are listed under AI Code Assistant, AI Developer Tools, codex, and claude-code.
- CodeGraph
- Agent Skills (Addy Osmani)
- Pi
What it does
Context Mode is a free, local MCP server and plugin that tackles context-window bloat in coding agents. Its sandbox tools keep raw data such as Playwright snapshots, GitHub issue lists or log files out of the context — the README's example shrinks 315 KB to 5.4 KB (about 98% less). Every file edit, git operation, task, error and user decision is tracked in SQLite; when the conversation compacts, events are indexed with FTS5 and only relevant ones are retrieved via BM25, so the agent resumes where it left off (without --continue, previous session data is deleted). A 'think in code' rule has the model write a script and print only the result instead of reading dozens of files. It supports 17 clients including Claude Code (plugin marketplace, automatic routing), Codex, Gemini CLI, Copilot CLI, Cursor, OpenCode and Pi, plus an OpenClaw integration, with zero telemetry. Licensed under the source-available Elastic License 2.0 (no hosted-service resale). About 33k GitHub stars.

Use cases
- Stop Playwright snapshots and long logs from filling Claude Code's context
- Let an agent resume the same task after the conversation is compacted
- Reduce token spend on MCP-heavy coding sessions
Frequently asked questions
- Is Context Mode free?
- Yes, it is free and runs locally. It is source-available under the Elastic License 2.0, which forbids offering it as a hosted service.
- Which agents does it support?
- 17 clients, including Claude Code, Codex, Gemini CLI, Copilot CLI, Cursor, OpenCode and Pi, plus an OpenClaw integration.
- Does it send data anywhere?
- The project states zero telemetry; session data is stored locally in SQLite.
- How much context does it save?
- The README example reduces 315 KB of tool output to 5.4 KB, about 98%.