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 1 video ↓

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

1 use 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.

Videos mentioning Context Mode

1 in the library.