Independent by design · no pay-to-rank placements  · How we evaluate tools →
Anclum Submit
M

mksglu/context-mode

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, OpenCode, Gemini CLI, Copilot CLI and 4 more agents. Zero telemetry.

Before you install: a copy-paste command is available · license NOASSERTION · link reachable

View on GitHub ↗Link checked 2026-11-12 · HTTP 200 · opens the vendor's own site
Install & config
  1. Copy the command above
  2. Paste it as one entry under mcpServers in claude_desktop_config.json — local servers take command + args (example: clients)
  3. Restart your client
Install command from the repository
claude mcp add context-mode -- npx -y context-mode

Parsed from the README we fetched on 2026-10-26; we have not executed it.

This is the install method the repository states, not an MCP client config, so no JSON is generated.
Key names differ by client: Clients & CLI
Star count
34,048 ★ · mksglu/context-mode · read from the GitHub search API · (checked 2026-11-13 20:00:50)
Source
read directly from its GitHub page · type: MCP server
Harvest history
first seen 2026-10-26 · last seen 2026-11-14 · seen 21× · listed by 1 sources
Install
claude mcp add context-mode -- npx -y context-mode
FAQ (answers come from our records)
How do I install it?
The repository provides this install command: claude mcp add context-mode -- npx -y context-mode. It comes from the repository itself; we cannot guarantee it runs as-is in your client.
Who is it for?
We have no tags recorded for it yet.
Who maintains it?
repository mksglu/context-mode;first catalogued 2026-10-26;last seen 2026-11-14。There is no official certification or quality rating here — we record sources and dates only.

# Context Mode

以下摘录自该仓库的 README(片段) · 在 GitHub 读完整 README →

The other half of the context problem.
Used across teams at
## The Problem
Every MCP tool call dumps raw data into your context window. A Playwright snapshot costs 56 KB. Twenty GitHub issues cost 59 KB. One access log — 45 KB. After 30 minutes, 40% of your context is gone. And when the agent compacts the conversation to free space, it forgets which files it was editing, what tasks are in progress, and what you last asked for. On top of that, the agent wastes output tokens on filler, pleasantries, and verbose explanations — burning context from both sides.
### How Context Mode Solves It
Context Mode is an MCP server that solves all four sides of this problem:
1. Context Saving — Sandbox tools keep raw data out of the context window. 315 KB becomes 5.4 KB. 98% reduction.
2. Session Continuity — Every file edit, git operation, task, error, and user decision is tracked in SQLite. When the conversation compacts, context-mode doesn't dump this data back into context — it indexes events into FTS5 and retrieves only what's relevant via BM25 search. The model picks up exactly where you left off. If you don't --continue, previous session data is deleted immediately — a fresh session means a clean slate.
3. Think in Code — The LLM should program the analysis, not compute it. Instead of reading 50 files into context to count functions, the agent writes a script that does the counting and console.log()s only the result. One script replaces ten tool calls and saves 100x context. This is a mandatory paradigm across all 17 supported clients, plus the OpenClaw gateway integration: stop treating the LLM as a data processor, treat it as a code generator.
js
// Before: 47 × Read() = 700 KB. After: 1 × ctxexecute() = 3.6 KB.
ctxexecute("javascript",
const files = fs.readdirSync('src').filter(f => f.endsWith('.ts'));
files.forEach(f => console.log(f + ': ' + fs.readFileSync('src/'+f,'utf8').split('\\n').length + ' lines'));
);
4. No prose-style enforcement — context-mode keeps raw data out of context but never dictates how the model writes its final answer. Brevity, completeness, formatting — your model's call (or yours via your own CLAUDE.md / AGENTS.md). Aggressive brevity prompts have been shown to degrade coding/reasoning benchmarks (Moonshot AI on kimi-k2.5) — the routing block stays focused on where data goes, not on how the model talks.
## Install
Platforms are grouped by install complexity. Hook-capable platforms get automatic routing enforcement. Non-hook platforms need a one-time routing file copy.
Claude Code — plugin marketplace, fully automatic
Prerequisites: Claude Code v1.0.33+ (claude --version). If /plugin is not recognized, update first: brew upgrade claude-code or npm update -g @anthropic-ai/claude-code.
Install:
bash
/plugin marketplace add mksglu/context-mode
/plugin install context-mode@context-mode
Restart Claude Code (or run /reload-plugins).
Verify:
/context-mode:ctx-doctor
All checks should show [x]. The doctor validates runtimes, hooks, FTS5, and plugin registration.
Routing: Automatic. The SessionStart hook injects routing instructions at runtime — no file is written to your project. The plugin registers all hooks (PreToolUse, PostToolUse, UserPromptSubmit, PreCompact, SessionStart, Stop) and 11 MCP tools — six sandbox tools (ctxbatchexecute, ctxexecute, ctxexecutefile, ctxindex, ctxsearch, ctxfetchandindex) plus five meta-tools (ctxstats, ctxdoctor, ctxupgrade, ctxpurge, ctxinsight).
Listed badge (optional)
Copy this line into the README if you want the listing mark. Optional, and it does not affect being listed.
[![Listed on Anclum](https://anclum.com/badge/listed.svg)](https://anclum.com/en/s/mksglu-context-mode/)
Source
github · https://github.com/mksglu/context-mode
Traction
34,048 ★
added
today

More like this

← Back to index