Context Mode
MCP server by mksglu Verified · npm:context-mode
Keeps tool output out of a coding agent's context window by running the work in a local sandbox. It is free and local for 11 coding agents, with session search and no telemetry.
Install Context Mode
Built from the published package, never by AI.
claude mcp add context-mode -- npx -y context-modeRun in your terminal. Add --scope user to use it in every project.
{
"mcpServers": {
"context-mode": {
"args": [
"-y",
"context-mode"
],
"command": "npx"
}
}
}Settings, Developer, Edit config. Paste into claude_desktop_config.json and restart.
{
"mcpServers": {
"context-mode": {
"args": [
"-y",
"context-mode"
],
"command": "npx"
}
}
}Add to ~/.cursor/mcp.json (all projects) or .cursor/mcp.json (this project).
{
"servers": {
"context-mode": {
"args": [
"-y",
"context-mode"
],
"command": "npx"
}
}
}Add to .vscode/mcp.json. VS Code uses "servers", not "mcpServers".
codex mcp add context-mode -- npx -y context-mode{
"mcpServers": {
"context-mode": {
"args": [
"-y",
"context-mode"
],
"command": "npx"
}
}
}Add to ~/.gemini/config/mcp_config.json (all projects) or .agents/mcp_config.json (this project).
gemini mcp add context-mode npx -y context-modeGemini CLI was replaced by Antigravity CLI in June 2026 and remains only for enterprise licences and paid API keys.
MCP servers run with your permissions and can read what you give them access to. Some need an API key: check the README and add it under env in the context-mode block.
About
Context Mode is a free, local plugin for 11 coding agents. It runs tool work such as file reads, commands and page fetches in a local sandbox, so the full output does not fill the agent's context window. The full output is kept in a SQLite index in ~/.context-mode, and the agent gets back only the part it asks for.
The agent can also write a short script that runs in the sandbox, so only what the script prints reaches the context. The plugin has no telemetry and works offline after install. It can be used at home and at work, free of charge, under a source-available license.
Written from the project's README and checked against it.
Tools it gives your assistant
ctx_executeRuns code in the local sandbox and returns only what the script prints.ctx_indexStores full tool output in a local SQLite index on your machine.ctx_searchSearches the indexed output with FTS5 and returns the part the agent asks for./ctx-doctorChecks the install and prints PASS or a fix command for each check.Stats skillProduces a report of how much context the plugin saved.
What you need
- Node.js 24.15.0 or later
- Git for Windows on Windows, for the shell tools (Git Bash)
- One of the 11 supported coding agents
Try asking
- Fetch https://react.dev/reference/react/useEffect and show the cleanup example.
- Index this log file and count the authentication failures in it.
- Run /ctx-doctor and tell me which checks need a fix.
Good to know
- Context Mode Gateway is a separate hosted service with its own account and subscription.
- The plugin is licensed as source-available, with its source open on GitHub.
- On Windows, the shell tools need Git for Windows and run in Git Bash.
- Savings depend on the task. The four examples in the source saved 95.7% to 99.96%.
Security check
ANo download-and-run commands, hidden instructions or signs of sending keys out were found.
Checked automatically: README.md, package.json. This looks for known risky patterns and is not a full audit. How grades work
Alternatives to Context Mode
All alternatives →Turns GitHub repositories into architecture diagrams, written explanations, Mermaid source and narrated explainer videos. Built for developers who want to understand a codebase, and for AI agents that need to read one.
Mocks, records, and chaos-tests HTTP(S) dependencies for development and testing. One port serves many protocols, including gRPC, WebSockets, and LLM chat APIs. Built for developers and testers who need stand-in services during tests.
Provides MCP server and CLI tools that let AI coding agents build, test and manage iOS and macOS projects with Xcode and simulators. It is aimed at developers working on Apple platform apps.
Creates editable draw.io diagrams in AI chat from Mermaid, PlantUML, CSV or draw.io XML. Built for people who want diagrams from text prompts that stay editable in draw.io.
Indexes your code, git history, tests and decisions on your machine so AI coding agents can query the index instead of re-reading files. Built for developers who want fewer files opened and clearer answers about change risk and code health.
Gives your AI assistant hosted codebase intelligence for repos indexed on repowise.dev. Use it to ask how code works, what a change may break, and which tests to run.
Compare with GitDiagram, mockserver or XcodeBuildMCP
Context Mode: common questions
Does Context Mode send my data off my machine?
The source says the plugin keeps all usage data on your machine and has zero telemetry. Its Security and privacy section lists each network call the plugin makes.
Is Context Mode free?
The source says the plugin is free forever. Context Mode Gateway is a separate hosted service with its own account and subscription.
Which coding agents does it support?
It supports 11 agents: Claude Code, Codex, Gemini CLI, Qwen Code, Pi, OMP, OpenCode, Copilot CLI, Kiro, VS Code and ZCode.
How do I install Context Mode?
In Claude Code run claude mcp add context-mode -- npx -y context-mode. For Claude Desktop, Cursor and VS Code, paste the config shown above and restart. See the install guides.
Is Context Mode the official server?
Context Mode is published by npm:context-mode from its verified domain in the official MCP Registry.
Is Context Mode free?
The code is published under the NOASSERTION licence. The service it connects to may have its own pricing.
Is Context Mode safe to use?
It scores 88 of 100. Grades: maintenance A, licence F, quality A. Security check: grade A, no risky patterns found in the files checked. Review the code before you install. How grades work.
What are alternatives to Context Mode?
Similar MCP servers: GitDiagram, mockserver, XcodeBuildMCP, draw.io.
Does Context Mode work with ChatGPT?
Not directly. It runs locally, and ChatGPT only connects to remote servers with a URL. Use it in Claude Code, Claude Desktop, Cursor, VS Code or Codex.
