context-mode

Level ALocal

Free, local plugin that keeps tool output out of your coding agent's context window. Sandbox and SQLite FTS5 search, 99% fewer bytes in context. Works with Claude Code, Codex, Pi, OMP, OpenCode, Gemini CLI, Copilot CLI and 4 more agents. Zero telemetry.

Overview

Context Mode is an MCP server that optimizes the context window for AI coding agents. Sandbox tools keep raw tool output out of context—315 KB becomes 5.4 KB, about a 98% reduction. It records file edits, git operations, tasks and errors in SQLite, then retrieves only relevant events via FTS5 and BM25 search so work continues after compaction. It also promotes "think in code": the model writes scripts that analyze data and log only results. Routing is enforced across 17 platforms via MCP and hoo…

⭐ 34.3kDatabaseJavaScriptRepo ↗Updated 2026-11-20

Installation

MCP client config (paste into mcp.json)

{
  "mcpServers": {
    "context-mode": {
      "command": "npx",
      "args": [
        "-y",
        "context-mode"
      ]
    }
  }
}

Agent install prompt

Copy and paste into Cursor / Claude / other agents to install this MCP for you

Please read this MCP repository and install it into my current environment:
https://github.com/mksglu/context-mode

Known working client config (can write into mcp.json):
{
  "mcpServers": {
    "context-mode": {
      "command": "npx",
      "args": [
        "-y",
        "context-mode"
      ]
    }
  }
}

Please: 1) check README for deps and env vars; 2) write config for my client; 3) if secrets are missing, tell me what to fill — do not invent values.

Related servers