Best for
- Developers using one of the supported AI coding CLIs, IDEs, or agents
- Teams working with large codebases, logs, web pages, or batch queries
- Users who need work-state recovery after context compaction
Context Mode is designed for context governance in AI coding agents. Isolation, output filtering, indexed retrieval, caching, and session tracking can reduce context consumption. It supports many clients, but installation complexity, automatic routing, and hook coverage vary; users should evaluate local code execution, credential inheritance, and persistent indexing before deployment.
Strongest · Documentation 14/20 Weakest · Security and permissions 8/20
Static review · not runListed 2026-07-29
Read the FMRS scoring method →Runtime:Node.js 22.5+ · Bun
CONTEXT_MODE_PLATFORM
Manually pins the platform identity (e.g. copilot-cli, antigravity-cli, codex) to override auto-detection; only needed for special install paths.
CONTEXT_MODE_DIR
Set to an absolute writable root when Codex cannot write the default storage directory; sessions and indexed content live under it.
OPENCLAW_STATE_DIR
State directory for the OpenClaw plugin installer, default /openclaw; only used when installing into OpenClaw.
COPILOT_HOME
Set first if you use an isolated Copilot home, so the Copilot CLI finds the right hooks config.
Choose the configuration for the target client. The general MCP-only approach is to run npm install -g context-mode and configure the server command as context-mode; the README also provides the Claude Code command claude mcp add context-mode -- npx -y context-mode. For automatic routing and session tracking, configure the target client's hooks, plugin, or rules file as documented in the README.
{"mcpServers":{"context-mode":{"command":"npx","args":["-y","context-mode"]}}}
Shown for Claude Code. Other clients may use a different file or key (VS Code uses "servers") — the configurator below converts it.
{
"servers": {
"context-mode": {
"command": "npx",
"args": [
"-y",
"context-mode"
]
}
}
}
Goes in your project's .vscode/mcp.json (VS Code uses a "servers" key).
claude mcp add context-mode -- npx -y context-mode
Run it in a terminal; replace any <…> placeholders with your own values first.
Type `ctx stats` in your client session (or run /context-mode:ctx-doctor); if the ctx_* tools appear and return stats/diagnostics, the MCP server is connected.
Once connected, you can ask your AI assistant things like:
No matching tools
Listed from the project's documentation, not tested by this site.
Context Mode is an MCP server for optimizing AI coding-agent context usage through MCP and hooks. It runs tool work in isolated subprocesses and returns only stdout to the context, while providing session memory, SQLite FTS5/BM25 indexing, targeted retrieval, batch execution, and routing support across many coding clients. The README claims roughly 98% reduction for typical tool output.
Upstash's official server providing up-to-date third-party library docs for AI coding assistants
AI-powered NPM package analysis MCP server
An independent control layer that gives AI coding agents budgets, brakes, and receipts
GitHub's official MCP server for managing repos, issues, PRs, and workflows via natural language
Source revision 6006a3511ea2 Data synced 2026-10-19 Read the FMRS scoring method