Context Mode MCP

An MCP server that keeps large tool output out of the agent's context window and stores session memory in SQLite

  • 34,013 ★ on the repository
  • Last commit
MCP server

Extended access

Why this level

  • Executes code through ctx_execute and reads project files
  • Installs hooks that intercept the agent's tool calls
All reasons and checks

mksglu/context-mode

Install

In your terminal, with SkillFoxx CLI

npx skillfoxx add mcp/context-mode

Detects the agents on your machine, shows the access level and pins the version.

Other ways to install

Access and checks

How we review

Extended accessThe tool runs code or makes network calls and only reads external data.

  • Executes code through ctx_execute and reads project files
  • Installs hooks that intercept the agent's tool calls

This is third-party code. Review the repository files before installing.

What it does

Context Mode connects to the agent as an MCP server and fights context bloat. It moves large tool output into a sandbox and returns only a compact summary to the context rather than raw data. It records work history, file edits, git operations, tasks and errors in SQLite, and on conversation compaction it retrieves only what is relevant via full-text search. It also encourages a specific habit: instead of reading dozens of files into context, write a short script through ctx_execute and print only the result. On hook-capable platforms routing to these tools turns on automatically; on others the rules are added by copying a single file.

Who it is for. For developers who run long sessions with a coding agent and keep hitting context-window limits.

Good fit when

  • Long sessions where context fills up fast with tool output
  • You need to keep memory across compactions and resume where you left off
  • You want to compute and analyze code with a script rather than reading files into context

Not a fit when

  • Short one-off tasks where saving context is not needed
  • The agent or platform does not support MCP
  • You are not ready to install a local server and set up hooks

Example request

Count the functions in the src folder by writing a script and print only the number

MCP

Transport
stdio
Authentication
not required

Limitations

It needs a suitable Node.js version and a local server install. Automatic routing works only on hook-capable platforms; elsewhere the rules are added by copying a file manually. The Insight analytics panel is a separate hosted service. It is under the Elastic License v2, which is not a fully open license, so keep that in mind.

How to disable. Remove the server from your agent's MCP configuration, and if you installed the Claude Code plugin, remove it via /plugin. Remove the hooks from the platform settings.

FAQ

Does it change how the model writes answers?

No. The server controls where tool data goes and does not dictate how the model phrases its final answer.

What happens to a previous session without continuation?

If you do not ask to continue, the previous session's data is deleted and a new session starts clean.

Discussion

No questions or reviews yet.

ContextKeep gives agents persistent memory on SQLite with full-text search, categories and a web interface.

MCP serverExtended access159Repository stars

An MCP server that preserves Claude Code context between sessions: decisions, checkpoints and a file cache kept in local SQLite.

MCP serverExtended access136Repository stars

A local MCP server with five verbs that keeps project decisions across sessions: store, retrieve, supersede and audit diffs.

MCP serverExtended access83Repository stars

A universal MCP CLI client from Apify: persistent sessions, OAuth, JSON output for scripts and shell access to any MCP server for agents

CLIBroad access1.1KRepository stars

Shared memory for coding agents: messages in SQLite, old context compacted into a summary tree and MCP tools to search it.

PluginExtended access60Repository stars

A local-first MCP memory server for agents: session history, codebase index and a concept graph in one SQLite database

MCP serverExtended access438Repository stars

Comparison with similar tools

Cards that share the main search query, and how they differ.

ToolOfficialAuthenticationRepository starsMain difference
Context Mode (this card)nonot required34,013
AXIno2,293ten design principles for CLIs that agents use
Lossless Clawno4,924an OpenClaw plugin that keeps the whole conversation in SQLite
Context Attachment Managerno798plugin for Codex and Claude Desktop that keeps old images out of

README in short

The README presents Context Mode as an MCP server that tackles context bloat from several angles. It moves large tool output into a sandbox, keeps session memory in SQLite with full-text search, and promotes a pattern where the agent writes a script instead of reading many files. A set of platforms is supported: where hooks exist, routing turns on by itself; where they do not, the rules are copied manually. Installation is via the Claude Code plugin, a standalone MCP server, or a global npm package with per-platform config and hooks. There are utility commands for stats, diagnostics and clearing the index.

README badge

Report a problem