Skip to main content
plugin

context-mode — Claude Code plugin: what it does, how to install

An MCP server that keeps raw tool output out of the context window and rebuilds session state after a compact. Useful when the agent burns through context fast.

Install into Claude Code · Plugin marketplace All methods and platforms ↓
/plugin marketplace add anthropics/claude-plugins-community
/plugin install context-mode@claude-community
Open on GitHub

What context-mode does

Every MCP tool call drops raw output straight into the context window. A Playwright snapshot, a batch of issues, an access log — and half an hour later the window is noticeably emptier. context-mode intercepts that: sandbox tools do the work off to the side, and only the result comes back. The README walks through a case where 315 KB shrinks to 5.4 KB.

Under the hood it's an MCP server with a SQLite database. File edits, git operations, tasks, errors and user decisions land there as events, get indexed into FTS5, and are pulled back through BM25 search when the conversation compacts. The model picks up where it stopped. One catch: without the --continue flag, the previous session's data is deleted right away, so a new session starts from a clean slate.

A separate principle is that the agent writes a script to do the analysis instead of computing it itself. Rather than reading fifty files, it runs code and prints only the result. The mode doesn't dictate how the model phrases its answer — brevity or completeness stays with the model and your CLAUDE.md. Claude v1.0.33 or newer is required; check with claude --version.

What it helps with

  • keep raw MCP tool output out of the context window
  • recover which files were being edited after a compact
  • replace ten tool calls with a single script
  • find a session event by search instead of rereading history
  • start a fresh session without leftovers from the previous one

Example prompts for the agent

  • count lines in every .ts file under src with ctx_execute, don't read them into context
  • what did I edit in the last session? pull it from the events
  • take a Playwright snapshot but return only the headings

How to install context-mode

Plugin marketplace

/plugin marketplace add anthropics/claude-plugins-community
/plugin install context-mode@claude-community

Step by step, with commands for each platform: Claude Code plugins: marketplaces, installing, and building your own

Questions about context-mode

How do I install context-mode in Claude?

Through the plugin marketplace: first /plugin marketplace add anthropics/claude-plugins-community, then /plugin install context-mode@claude-community.

What does context-mode do?

It's an MCP server that runs tools in a sandbox and keeps their raw output out of context. It also logs session events to SQLite so you can get back to the right spot after a compact.

What do I need for context-mode to work?

Claude v1.0.33 or newer — check with claude --version. If you start a session without --continue, the previous session's data is deleted immediately.

Similar plugins

All plugins for Agent setup: memory, context, orchestration →

From the same set10

context-mode-ops This skill coordinates GitHub work and releases through 10-20 dynamic subagents. Use it for issue triage, PR reviews, adapter checks, and branch sync. CX Codex +1 1,700installs ctx-stats Reports how much context window context-mode saved in the current session: token use, savings ratio and a per-tool breakdown. CX Codex +1 1,700installs ctx-upgrade A skill that pulls the latest context-mode from GitHub, rebuilds the plugin, reinstalls it globally, and reconfigures hooks. Run once, get a checklist of results. CX Codex +1 1,600installs ctx-doctor Runs context-mode health checks directly inside your agent session. It inspects runtimes, hooks, FTS5, and package versions to troubleshoot setup issues. CX Codex +1 1,600installs ctx-insight This skill opens the Insight dashboard in your default browser. Use it to review engineer-level productivity, retry waste, blockers, and role-based views. CX Codex +1 1,500installs ctx-purge A skill to permanently delete project context data in bulk or by session. Wipes the knowledge base, session records, and stats — this action cannot be undone. CX Codex +1 1,500installs ctx-search Searches a persistent project knowledge base without reloading source files into context. Queries indexed code, documentation, and session memory via FTS5. CX Codex +1 1,100installs ctx-index Indexes local files and directories into context-mode's FTS5 database. It allows future searches to pull exact snippets without reloading raw project files into context. CX Codex +1 1,100installs

Project sponsors

Companies that keep this analytics open
Gold sponsor

Impressions, clicks and code copies — open statistics. We keep the numbers public for the same reason NeBlask itself is public. Become a sponsor