mksglu/context-mode
Context window optimization for AI coding agents. Sandboxes tool output (98% reduction), persists session memory, and enforces routing across 17 platforms via MCP + hooks.
From the publisher
README & documentation
Source previewRead the project’s overview, installation instructions and usage examples. The original README is the source of truth.
The other half of the context problem. [](https://www.npmjs.com/package/context-mode) [](https://www.npmjs.com/package/context-mode) [](https://github.com/mksglu/context-mode) [](https://github.com/mksglu/context-mode/stargazers) [](https://github.com/mksglu/context-mode/network/members) [](https://github.com/mksglu/context-mode/commits) [](LICENSE) [](https://discord.gg/DCN9jUgN5v) [](https://news.ycombinator.com/item?id=47193064) Used across teams at 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. Context Mode is an MCP server that solves all four sides of this problem: 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…
Read the full README ↗ · Preview checked 2026-10-27T07:21:22.664Z
Inside the original README — Document outline
- Context Mode
- The Problem
- How Context Mode Solves It
- Install
- Option A — Marketplace plugin (recommended once published)
- Option B — Manual install (existing path)
- Tools
- How the Sandbox Works
- How the Knowledge Base Works
- Ranking: Reciprocal Rank Fusion
- Proximity Reranking
- Fuzzy Correction
Headings are captured from the source. Links open the publisher’s document, not a locally hosted copy.
Links from the README
References supplied by the publisher, not independently verified endorsements. Check the destination before downloading files or entering credentials.
Documentation belongs to its respective authors. Reported project/model license: Other. A listing is not a grant of reuse or training rights. Confirm the document’s own terms at the source.
What this repository does
Context window optimization for AI coding agents. Sandboxes tool output (98% reduction), persists session memory, and enforces routing across 17 platforms via MCP + hooks.
Repository facts
- Owner
- mksglu
- Primary language
- TypeScript
- Stars
- 33,083
- Forks
- 2,282
- Open issues + pull requests
- 248
- License
- Other
- Archived
- No
- Default branch
- main
- Created
- 2026-02-23T05:56:28.000Z
- Last push
- 2026-09-15T18:04:54.000Z
Topics and intended use
Owner-supplied topics: antigravity, claude, claude-code, claude-code-hooks, claude-code-plugins, claude-code-skill, codex, codex-cli, context-mode, copilot, cursor-plugin, kiro, mcp, mcp-server, mcp-tools, openclaw, opencode, pi-agent, skills, zed-extension
Review the README for scope, installation, examples and limitations. We do not run repository code or certify it.
Evaluate before installing
Review licensing and dependencies, inspect recent commits and unresolved issues, and test in an isolated environment before production use. Stars and forks alone cannot answer these questions.
Source and freshness
Source: GitHub. Metadata observed 2026-11-01T12:15:48.337Z. Daily imports are snapshots, not real-time monitoring.
Popularity and source listings do not establish security, suitability, licensing rights or benchmark performance.