Open Source Alternatives
  • Alternatives
  • Categories
    Categories by size882 projects
    • Developer Tools461
    • AI & Machine Learning404
    • Web Development196
    • Business & Productivity191
    • Communication & Collaboration126
    • Security & Monitoring126
    • IT Management123
    • Product & Project Management106
    • Cloud & Hosting105
    • Data & Analytics104
    Browse all 21 categoriesLLMOps & AI Tooling, Design & Creative and 9 more
  • Blog
  • Advertise
SearchNotion, Slack, password manager.../
Submit
Open Source Alternatives
  • Alternatives
    • Developer Tools461
    • AI & Machine Learning404
    • Web Development196
    • Business & Productivity191
    • Communication & Collaboration126
    • Security & Monitoring126
    • Browse all 21 categories
  • Blog
  • Advertise
Submit your project

New open source projects by email

The projects we add and every new guide. Free, unsubscribe any time.

Open Source Alternatives LogoOpen Source Alternatives

Handpicked Open Source Alternatives to Paid Softwares

Product

  • Categories
  • Tag
  • Advertise

Resources

  • Blog
  • Collection
  • Submit

Company

  • Privacy Policy
  • Terms of Service
  • Refund Policy
  • Sitemap

Alternatives

  • Claude Code
  • Jira
  • Notion
  • Slack
  • Linear
  • Wispr Flow
  • All alternatives
© 2026 Open Source Alternatives. All rights reserved.
Open SourceAlternatives
Home/Categories/Developer Tools/context-mode
icon of context-mode

context-mode

Open source alternative to Tokenade, Cursor and Windsurf

  • 31.3K stars
  • Elastic License 2.0 (ELv2)
  • Active this week
  • Last commit 1 day ago

Last verified Oct 20, 2026

Optimize LLM context for AI coding agents: an open source MCP plugin that sandboxes large tool output locally, reducing context use by up to 98% per session.

Visit websiteGitHub31.3K starsDeploy on Hostinger
image of context-mode
TL;DR

context-mode is an MCP plugin that reduces LLM context window use by up to 98% per session for AI coding agents. It intercepts raw tool output before it enters context, stores it in a local SQLite FTS5 database, and retrieves only what the agent needs via BM25 search. The plugin works across 17 AI adapters including Claude Code, Cursor, GitHub Copilot, and Codex, and runs entirely on your machine under the Elastic License 2.0. Best for developers who hit context limits mid-session and teams who need cross-agent context optimization without vendor lock-in.

Read the full breakdownHide the full breakdownWho it is for, how it works, trade-offs, the quick start and the FAQ
who it's for

Who context-mode is for#

Developers who hit context limits mid-session

A developer running extended Claude Code or Cursor sessions regularly sees context compaction erase task state and force session restarts. Context-mode sandboxes large tool output automatically, saving up to 98% of context per tool call, and persists session state in local SQLite so the agent resumes exactly where it left off.

Skip if:

Your sessions are short, use few tool calls, or you work with models where token costs are low enough that context overflow is not a practical constraint.

Engineering teams wanting AI tool usage visibility

Engineering managers and technical leads at teams running AI-assisted development can connect the free plugin to the commercial Platform to see productive session rates, retry waste, and capacity imbalance across the org. Data forwarded is structural events only: tool names, file paths, error counts. Source code and prompt content never leave developer machines.

Skip if:

You need per-developer context optimization only, without team-wide analytics. The free OSS plugin covers that without a Platform subscription.

Developers working across multiple AI coding clients

Teams that use a mix of Claude Code, Cursor, GitHub Copilot, Gemini CLI, and other MCP-compatible agents get uniform context optimization from a single plugin install. The same FTS5 index and session memory layer applies regardless of which client the developer opens on a given day.

Skip if:

You use a single AI coding client that already provides built-in context management satisfactory for your session lengths.

AI coding power users building large features

Developers building features that require reading many files, running shell commands, and iterating across long sessions see the largest gains. The Think in Code routing replaces bulk file reads with analysis scripts, reducing context use from hundreds of KB to a few KB for tasks like counting functions across a codebase.

Skip if:

Your primary AI coding use is short, bounded tasks like single-file edits or question-answer sessions where context accumulation is not a bottleneck.

the problem

The problem it solves#

Every AI coding agent burns through context the same way. A single gh issue list call dumps 59 KB into the conversation. A Playwright snapshot costs 56 KB. After thirty turns, 40% of the context window is gone, filled with raw data the agent re-sends with every subsequent turn. When the conversation compacts to free space, the agent loses track of which files it was editing, which tasks were in progress, and what the user last asked.

The context window is not infinite, and expanding it at the model level does not fix the routing problem. More tokens per request means higher per-session cost, not fewer unnecessary reads. Developers work around this by manually pruning context, resetting sessions, or paying for higher-tier models. None of these address the root cause: raw data that should never have entered the context in the first place.

how context-mode solves it

How it solves it#

Context Saving via Local FTS5 Sandbox

Intercepts large MCP tool output before it enters the LLM context window and stores it in a local SQLite FTS5 database. The agent searches the index via BM25 when it needs the data, rather than re-reading raw output each turn. A 315 KB Playwright snapshot becomes 5.4 KB in context, a 98% reduction per tool call.

Session Continuity Across Compaction

Tracks every file edit, git operation, task, error, and user decision in SQLite throughout the session. When the conversation compacts, context-mode does not dump buffered data back into context: it indexes events into FTS5 and retrieves only what is relevant via BM25. The agent picks up exactly where it left off after compaction.

Think in Code Routing

Enforces a paradigm where the LLM writes a script to analyze data rather than reading it directly into context. Instead of 47 individual file reads (700 KB), the agent writes one script that runs the analysis and logs only the result (3.6 KB). This routing is applied automatically across all 17 supported adapters.

17-Adapter MCP Support

Registers as an MCP server across Claude Code, Cursor, GitHub Copilot, VS Code Copilot, JetBrains Copilot, GitHub Copilot CLI, Gemini CLI, Codex, Kiro, Antigravity CLI, OpenCode, pi-agent, Zed, and more. Hook-capable adapters get automatic routing enforcement via SessionStart and PreToolUse hooks with no manual file writes.

Fully Local, No Telemetry

All data, the FTS5 index, session events, and tool output, stays on the developer's machine. There is no account, no cloud connection, and no telemetry in the free OSS tier. The commercial Platform tier is opt-in and forwards only structural metadata (tool names, file paths, error counts), never source code or prompt content.

strengths · trade-offs

Strengths and trade-offs#

Strengths

  • Cross-agent, vendor-neutral context optimizationWorks across 17 AI coding clients via standard MCP protocol. A developer running Claude Code for some workflows and Cursor for others gets the same context optimization on both without separate integrations. No single editor or model vendor required.
  • Documented 98% per-call context reductionThe README documents specific reduction ratios from real tool calls: 315 KB to 5.4 KB (98%) for tool sandboxing, and 47 file reads (700 KB) versus one ctx_execute call (3.6 KB), a 194x reduction. Both figures are verifiable against the plugin's own ctx_stats output.
  • Session memory that survives conversation compactionMost AI coding agents lose task state when the conversation compacts. Context-mode persists that state in local SQLite and retrieves it via BM25 search after compaction, so the agent does not forget what it was doing. This is a qualitatively different guarantee from simply having a larger context window.
  • Zero cloud dependency, 331,000+ active installsOver 331,200 developers run the plugin locally with no account required. Engineering teams at companies with strict cloud-access policies can install it because it never calls home. Adoption at this scale inside security-conscious organizations (Microsoft, Google, NVIDIA, Red Hat) signals it passes typical enterprise security review.

Trade-offs

  • -Elastic License 2.0 restricts managed service resaleContext-mode is licensed under the Elastic License 2.0 (ELv2), not an OSI-approved open source license. You may self-host, run, modify, and distribute it for any internal purpose including commercial team use. You may not offer it to external users as a hosted or managed service, and you may not remove licensing notices. Teams building a developer tooling product for external customers should review the ELv2 terms before bundling it.
  • -Org-level analytics require the paid Platform tierThe free OSS plugin handles context optimization. Visibility into AI tool usage across an engineering team (productive session rates, retry waste, capacity patterns, and role-based views for CTOs, EMs, and FinOps) requires the commercial Context Mode Platform at $20 per seat per month. The plugin itself stays free.
  • -Node.js 22.5 or Bun requiredThe plugin requires Node.js 22.5 or higher, or the Bun runtime. Developers on Node LTS 18 or 20 must upgrade their runtime before installing. On Claude Code the plugin marketplace handles this automatically, but manual installs on other adapters require the runtime prerequisite check first.
versus alternatives

context-mode vs alternatives#

Context-mode vs Cursor Pro

Cursor Pro ($20/month) includes a codebase indexing feature that embeds your repository and retrieves relevant files for each agent request. This solves a different part of the context problem: Cursor adds files to context rather than intercepting the raw output that tool calls generate mid-session. Context-mode operates at the tool output layer, and the two approaches are complementary rather than competing.

FeatureContext-modeCursor Pro
LicenseELv2 (free plugin)Proprietary
Self-hostingYesNo
Per-session reductionUp to 98% per tool callNot reported
Adapter support17 clientsCursor only
PriceFree plugin$20/month

Context-mode is the better pick when you work across multiple AI coding clients, when tool output volume is the bottleneck rather than file discovery, or when uploading codebase embeddings to a third-party server is not allowed by your security policy. Cursor Pro remains the right choice if you want a fully integrated AI coding environment under a single vendor.

Context-mode vs GitHub Copilot (paid)

GitHub Copilot's paid tiers ($10-19/month) surface relevant code from open files and recent edits. Like Cursor, Copilot adds relevant context rather than compressing tool call output. Context-mode works as an MCP server inside VS Code Copilot and JetBrains Copilot, addressing tool output volume independently: the two tools complement rather than replace each other.

FeatureContext-modeGitHub Copilot
LicenseELv2 (free plugin)Proprietary
Self-hostingYesNo
Works inside CopilotYes (MCP + hooks)N/A
PriceFree plugin$10-$19/month

Installing context-mode inside an existing Copilot subscription is additive. Register it as an MCP server in the Copilot config and it starts intercepting large tool outputs at no extra cost. For developers already on a Copilot plan who hit context limits during tool-heavy sessions, context-mode is the first extension to try.

install · quick start

Quick start#

bash
Install context-mode as a global npm package, then configure it as an MCP server in your AI coding client's settings.
```bash
npm install -g context-mode
```
tech stack · detected from GitHub

What it's built on#

Languages
JavaScriptTypeScript
Tooling
esbuild
frequently asked

FAQ#

Is context-mode free to use?

The OSS plugin is free to install and run under the Elastic License 2.0. It works without an account, without a cloud connection, and without usage limits. The commercial Context Mode Platform ($20 per seat per month) adds org-level analytics and is completely separate from the free plugin.

Which AI coding tools does context-mode support?

Context-mode supports 17 adapters: Claude Code (via plugin marketplace), Cursor, GitHub Copilot, VS Code Copilot, JetBrains Copilot, GitHub Copilot CLI, Gemini CLI, Codex, Kiro, Antigravity CLI, OpenCode, pi-agent, Zed, and more. Hook-capable adapters get automatic routing enforcement via session hooks. Non-hook adapters require a one-time routing file copy.

Does context-mode send my code or prompts to a third party?

No. The free OSS plugin stores all data locally in SQLite on your machine. There is no telemetry, no cloud connection, and no account required. The optional Platform tier forwards only structural metadata (tool names, file paths, error counts) over an authenticated channel, and explicitly never source code, prompt content, or file content.

What does the Elastic License 2.0 allow and restrict for self-hosters?

ELv2 allows you to self-host, run, copy, modify, and distribute context-mode for any internal purpose, including commercial and team use. It does not allow offering context-mode to external users as a hosted or managed service. It also prohibits removing licensing notices or tampering with license key functionality. For most individual developers and internal engineering teams, ELv2 imposes no practical restrictions.

How does context-mode preserve session state across conversation compaction?

Context-mode tracks every file edit, git operation, task, error, and user decision in a local SQLite database throughout the session. When the AI agent compacts the conversation to free context space, context-mode indexes those events into FTS5 full-text search and retrieves only what is relevant via BM25. The agent resumes its task state without the developer needing to re-explain what was in progress.

also worth a look

Similar open-source tools#

vscode

Alternative toCursor

Open source AI code editor for multi-agent development

  • 194,168 GitHub stars
  • MITLicence MIT

codex

Alternative toClaude Code

OpenAI's terminal coding agent, Apache-2.0 licensed

  • 130,162 GitHub stars
  • Apache-2.0Licence Apache-2.0

Threadlines

Alternative toConductor

Open-source ADE for Claude Code, Codex, and Cursor in one thread

  • 20 GitHub stars
  • MITLicence MIT

magic-compact

Alternative toTokenade

Lossless context compression for Claude Code and OpenCode

  • 173 GitHub stars
  • BSD-3-ClauseLicence BSD-3-Clause

token-optimizer-mcp

Alternative toTokenade

Token savings and persistent knowledge graphs for AI coding agents

  • 554 GitHub stars
  • MITLicence MIT

monocode

Alternative toConductor

One desktop UI for all your AI coding agents.

  • 3,177 GitHub stars
  • MITLicence MIT
by category

Open source tools in these categories#

461

Developer Tools

REA (Reverse Engineer Anything), superpowers, Skills for Real Engineers
404

AI & Machine Learning

freeCodeCamp, OpenClaw, REA (Reverse Engineer Anything)
86

DevOps & CI/CD

Nvm, Uptime Kuma, Netdata
Hostinger

Run context-mode on your own server

Self-host context-mode on a Hostinger VPS.

Deploy on Hostinger

Featured

Inbox Zero

Alternative toSuperhuman

AI email assistant that drafts replies and clears your inbox

  • 12,712 GitHub stars
  • AGPL-3.0Licence AGPL-3.0
  • #Email

Omnara

Alternative toCClaude Managed Agents

Open-source agent deployment API. Self-host or use Omnara Cloud.

  • 2,957 GitHub stars
  • Apache-2.0Licence Apache-2.0
  • #AI Agents

rakazo

Alternative toGrok Bot

AI teammates you own: your keys, your model, your machine.

  • 4,904 GitHub stars
  • Apache-2.0Licence Apache-2.0
  • #AI Agents
Feature your project

New open source projects by email

The projects we add and every new guide. Free, unsubscribe any time.

Find open source alternatives to paid software

/
  • Claude Code to OpenCode
  • Jira to Windshift
  • Notion to AppFlowy
  • Slack to Mattermost
  • Linear to GitLab
  • Wispr Flow to Handy
  • CapCut to Concat
  • Grok Bot to rakazo
  • Superhuman to Inbox Zero
  • Airtable to AITable
  • Muse to OpenClaw
  • GitHub Copilot to Cline
  • Datadog to Netdata
  • Microsoft Teams to Rocket.Chat
  • Pinecone to Qdrant
  • Zapier to n8n
  • Devin AI to OpenHands
  • Firebase to Supabase
  • 1Password to KeePassXC
  • Confluence to Docmost
  • Contentful to Strapi
  • Adobe Premiere Pro to Shotcut
  • ChatGPT to AnythingLLM
  • LangSmith to Langfuse
  • Claude Code to OpenCode
  • Jira to Windshift
  • Notion to AppFlowy
  • Slack to Mattermost
  • Linear to GitLab
  • Wispr Flow to Handy
  • CapCut to Concat
  • Grok Bot to rakazo
  • Superhuman to Inbox Zero
  • Airtable to AITable
  • Muse to OpenClaw
  • GitHub Copilot to Cline
  • Datadog to Netdata
  • Microsoft Teams to Rocket.Chat
  • Pinecone to Qdrant
  • Zapier to n8n
  • Devin AI to OpenHands
  • Firebase to Supabase
  • 1Password to KeePassXC
  • Confluence to Docmost
  • Contentful to Strapi
  • Adobe Premiere Pro to Shotcut
  • ChatGPT to AnythingLLM
  • LangSmith to Langfuse