AI product Open source

Context Mode

Context Mode is an MCP server and plugin for AI coding agents that reduces context-window usage by routing large tool outputs through sandboxed subprocesses. Its execution tools run code in supported languages, process files, fetch and analyze URLs, and return selected stdout or search results instead of exposing raw logs, snapshots, API responses, or file contents to the conversation. The project reports up to 98% context reduction in its benchmarks.

View repository Visit site Mentioned in 4 videos ↓

Overview

It also provides session continuity across supported agents. Hooks capture tool calls, edits, prompts, decisions, errors, and other session events in SQLite; before compaction, the system builds a prioritized resume snapshot, and after compaction or session resumption it retrieves relevant events through SQLite FTS5 search with BM25 ranking. Content indexing uses heading-aware chunking, stemming, trigram matching, reciprocal-rank fusion, proximity reranking, fuzzy correction, and smart snippets. The MCP interface includes execution, batching, indexing, search, fetching, statistics, diagnostics, upgrade, and purge tools.

Context Mode supports multiple coding-agent platforms through MCP servers, native plugins, and platform-specific hooks, with automatic routing enforcement where hooks are available and instruction files for platforms without them. The repository states that processing and SQLite storage are local, with no account or telemetry requirement. It is licensed under the Elastic License 2.0, which permits use, modification, and distribution but restricts offering the software as a hosted or managed service and removing licensing notices.

What Context Mode is used for

5 uses taken from transcripts — each links to the moment in the video.

  • An MCP server that prevents AI coding agents from being overwhelmed by large tool outputs. It indexes full results locally, gives agents pointers to retrieve relevant sections, persists memory across compaction, and routes requests through hooks.

  • An MCP server that protects AI coding agents' context windows by sandboxing tool output in an isolated subprocess so only answers enter context, and indexes file edits, tasks and decisions into a searchable store so work survives compaction.

  • A free tool that optimizes the context window of AI coding agents by sandboxing large tool call outputs instead of dumping them into context, keeping a searchable reference the agent can query. It persists session memory, enforces tool routing via MCP and hooks, and wires into 17 platforms like Claude Code, Codex, Cursor and Gemini.

  • MCP server that runs tool commands in a sandbox and keeps only printed results in the agent's context window, tracking edits and decisions in local SQLite

  • An MCP server that keeps raw tool output out of an AI coding agent's context window by running tools in a sandbox and returning only printed results. It tracks edits, tasks and decisions in a local SQLite database with full-text search and restores them after compaction.

Videos mentioning Context Mode

4 in the library.