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.

★ 33,772⑂ 2,312
JavaScriptCreated 2026-02-23contextmode.ai
33,772
stars
+408+511+8,308
2,312
forks
–
watchers
–
prs
–
issues
–
releases
–
discussions

README

Context Mode

A free, local plugin for 10 coding agents. It keeps tool output out of your agent's context window and keeps all usage data on your machine. The plugin is free forever.

   

33K GitHub stars · 683K npm downloads (read 2026-11-01, stats.json) · on the Hacker News front page and GitHub Trending: charts and sources

 The Context Mode plugin is free and local, with its source open on GitHub. Context Mode Gateway is a separate hosted service with its own account and subscription. It takes the same idea from tool output to the whole conversation: Gateway Recall keeps long sessions searchable, and Gateway Memory shares what your agents learn across sessions and tools. See how the Gateway works


  
  


Contents: Why · Adoption · Install · Try it · Use cases · Benchmarks · How it works · Tools · Security and privacy · Context Mode Gateway · License · Community

 Why

A coding agent reads files, runs commands and fetches pages, and every result goes into its context window.
The Context Mode plugin runs that work in a local sandbox, keeps the full output in a SQLite index on your machine, and gives the agent the part it asks for.

- The plugin is free forever. Use it at home and at work, free of charge, under a source-available license.
- Runs on your machine. The hooks, the sandbox and search run as local processes next to your agent.
- The plugin keeps your data on your machine. Every index lives in ~/.context-mode: one context.db per project.
- Zero telemetry. The plugin keeps all usage data on your machine. Security and privacy lists each network call it makes.
- Works offline after install. Sandbox runs, file indexing and search use local SQLite and your own runtimes.
- Thinking in Code. The agent writes a short script instead of reading the data, and only what the script prints reaches the context: see How it works, step 5.
- Small replies. On the 36 bench rows with 10 KB or more of raw output, the plugin's median reply is 99.4% smaller than the raw output.

 Adoption: stars and npm downloads






Open the interactive chart and point at a bar to read its value. Tabs there show days, weeks, months and years. Stars come from the GitHub GraphQL API (starredAt); npm downloads come from api.npmjs.org/downloads/range. The total up to 2026-10-29 is 683K npm downloads (stats.json keeps a daily copy). A daily job redraws both charts.

- Hacker News. "MCP server that reduces Claude Code context consumption by 98%" reached the front page with 570+ points and 107 comments on 2026-02-28 (thread).
- GitHub Trending. A bot that watches GitHub Trending logged the repo there on 14 days from 2026-04-24 to 2026-10-17 (uibm/trending-watcher).


  
  


Starred by engineers at these companies: each name is the company field of 2 or more stargazer profiles, read with the GitHub GraphQL API on 2026-11-01 (data).

 Install

Pick your agent: Claude Code · Codex · Gemini CLI · Qwen Code · Pi · OpenCode · Copilot CLI · Kiro · VS Code · ZCode

Open its block an

Snapshot: 2026-11-10T09:35:25Z · Data license Apache-2.0 · JSON