MCP server for context-window optimization that routes large tool outputs through sandbox tools, indexes session state, and helps agents retrieve only the context they need.
Context Mode encourages agents to execute scripts and route large outputs through sandbox tools; review allowed commands and workspace boundaries., Hook-based installs can affect tool routing automatically. Verify the installed hooks and settings before using it in shared or sensitive workspaces., Indexed session state can influence future retrieval and continuity; purge state when switching projects, clients, or sensitivity levels., Do not rely on compressed or searched summaries for high-stakes decisions without inspecting original files or outputs.
Privacy notes
Context Mode can index file edits, git operations, tasks, errors, user decisions, local files, and command output in SQLite/FTS5 stores., Indexed data may include source code, logs, secrets accidentally printed to terminal, customer data, repository paths, and private prompts., Local analytics and statusline data can reveal workflow patterns, tool usage, and project activity.
Author
mksglu
Submitted by
oktofeesh1
Claim status
unclaimed
Last verified
2026-06-05
Decision playbook
Review trust signals before you adopt
Signals are present but mixed. Use the checklist below to confirm the source and operational safety for your environment.
Compare context
Selected
0
Current score
63
Baseline
—
Delta
No baseline selected
No major trust-signal divergence detected in the current selection.
Source and provenance checks
Needs review
Confirm ownership and provenance before trusting install instructions.
Source link availableRequired
Open the canonical repository and verify ownership.
Done
Source provenance statusRequired
Marked as source-backed.
Done
Metadata reviewed
No reviewed flag detected in metadata.
Pending
Safety and privacy checks
Complete
Validate risk disclosures before installation or API wiring.
Safety notes presentRequired
Review the listed safety guidance before running commands.
Done
Privacy notes presentRequired
Review data handling notes before connecting accounts or secrets.
Done
Trust level risk gateRequired
Trust level does not block evaluation.
Done
Package and install checks
Needs review
Check package metadata and artifact integrity signals.
Install payload available
Install or copy payload is available for review.
Done
Package verification flag
No package verification flag provided.
Pending
Checksum metadata
No checksum provided for downloaded artifact.
Pending
Compare-driven decision checks
Needs review
Use compare context to validate trade-offs before adoption.
Compare tray has multiple entries
Add at least one more entry to compare trust differences.
4 safety and 3 privacy notes across 4 risk areas. Review closely: credentials & tokens.
4 areas
SafetyExecution & processesContext Mode encourages agents to execute scripts and route large outputs through sandbox tools; review allowed commands and workspace boundaries.
SafetyExecution & processesHook-based installs can affect tool routing automatically. Verify the installed hooks and settings before using it in shared or sensitive workspaces.
SafetyCredentials & tokensIndexed session state can influence future retrieval and continuity; purge state when switching projects, clients, or sensitivity levels.
SafetyLocal filesDo not rely on compressed or searched summaries for high-stakes decisions without inspecting original files or outputs.
PrivacyLocal filesContext Mode can index file edits, git operations, tasks, errors, user decisions, local files, and command output in SQLite/FTS5 stores.
PrivacyCredentials & tokensIndexed data may include source code, logs, secrets accidentally printed to terminal, customer data, repository paths, and private prompts.
PrivacyTelemetryLocal analytics and statusline data can reveal workflow patterns, tool usage, and project activity.
Safety notes
Context Mode encourages agents to execute scripts and route large outputs through sandbox tools; review allowed commands and workspace boundaries.
Hook-based installs can affect tool routing automatically. Verify the installed hooks and settings before using it in shared or sensitive workspaces.
Indexed session state can influence future retrieval and continuity; purge state when switching projects, clients, or sensitivity levels.
Do not rely on compressed or searched summaries for high-stakes decisions without inspecting original files or outputs.
Privacy notes
Context Mode can index file edits, git operations, tasks, errors, user decisions, local files, and command output in SQLite/FTS5 stores.
Indexed data may include source code, logs, secrets accidentally printed to terminal, customer data, repository paths, and private prompts.
Local analytics and statusline data can reveal workflow patterns, tool usage, and project activity.
Prerequisites
Node.js 22.5 or newer, or Bun for supported installs.
MCP client such as Claude Code, Gemini CLI, VS Code Copilot, Cursor, Codex, or another supported host.
Optional Claude Code plugin marketplace support for automatic hooks and slash commands.
Team agreement on what files, command outputs, and session events may be indexed locally.
Context Mode is an MCP server and multi-platform context-management system for
AI coding agents. It is designed to keep raw tool output out of the model
context window, index useful session events locally, and retrieve only the
context that matters for the current task.
For Claude Code, the project documents a plugin marketplace install with hooks,
slash commands, and routing enforcement. It also provides an MCP-only install
for trying the server without automatic hooks.
These sources were reviewed on 2026-06-05. Prefer the live repository and
site for current platform support, plugin instructions, hook behavior, command
names, and license details.
Features
MCP sandbox tools for executing scripts and returning compact results.
Local indexing and search for files, session events, and prior context.
Session continuity through SQLite and FTS5 retrieval.
Diagnostics, stats, purge, upgrade, and insight tools.
Optional Claude Code plugin hooks and slash commands.
Support for multiple agent platforms, including Claude Code, Gemini CLI, VS
Code Copilot, Cursor, Codex, and others.
Installation
For MCP-only Claude Code setup:
claude mcp add context-mode -- npx -y context-mode
For Claude Code plugin setup with hooks and slash commands, use the project
README's marketplace instructions and run its doctor command after installation.
Use Cases
Run a compact script instead of reading many files into context.
Search indexed session state after compaction.
Track context savings and tool-output reductions.
Keep long coding sessions recoverable without dumping full transcripts back
into the model.
Use local search over previously indexed files or outputs.
Safety and Privacy
Context Mode changes how agents route tool calls and store context. Review the
installed MCP server, hooks, and local data stores before using it with
sensitive projects. Purge indexed state when changing clients or projects, and
inspect original files or outputs when exact evidence matters.
Duplicate Check
Existing context and statusline entries cover related workflow ideas, but no
mksglu/context-mode MCP entry or source URL was found in content/mcp.
Show that Context Mode MCP Server is listed on HeyClaude. Paste this Markdown into your README — it renders the badge and links back to this page.
[](https://heyclau.de/entry/mcp/context-mode-mcp-server)
How it compares
Context Mode MCP Server side by side with 3 alternatives on trust, install, platform support, and disclosed safety notes — all from reviewed registry metadata.
2 trust signals differ across this comparison (Source provenance, Submitter).
MCP server for context-window optimization that routes large tool outputs through sandbox tools, indexes session state, and helps agents retrieve only the context they need.
Local code indexing MCP server that lets AI assistants search repositories, build symbol indexes, inspect file summaries, monitor changes, and navigate multi-language codebases.
Connect Claude to Meilisearch — manage indexes, add and search documents, tune settings, and monitor tasks — with Meilisearch's official Model Context Protocol server.
BittleBits hosted MCP server for Generative Engine Optimization with get_score and get_rewrite tools to measure and improve AI search visibility via OAuth.
✓Context Mode encourages agents to execute scripts and route large outputs through sandbox tools; review allowed commands and workspace boundaries.
Hook-based installs can affect tool routing automatically. Verify the installed hooks and settings before using it in shared or sensitive workspaces.
Indexed session state can influence future retrieval and continuity; purge state when switching projects, clients, or sensitivity levels.
Do not rely on compressed or searched summaries for high-stakes decisions without inspecting original files or outputs.
✓Code Index MCP reads repository files, builds shallow and deep indexes, exposes file summaries, and can return source snippets through search and file resources.
Point `--project-path` at one approved repository; avoid broad parent directories, home directories, generated dependency trees, or secret-heavy paths.
Deep indexing and watcher refreshes can consume CPU, memory, disk IO, and temp storage on large codebases.
The server can create and clear index/cache settings and temporary directories used for stored index data.
Search results, file summaries, and symbol bodies can surface credentials, private code, customer data, internal URLs, or proprietary implementation details if they exist in the repository.
✓Tools create and delete indexes and documents and rotate API keys — scope the key and confirm destructive actions.
Settings and index deletes change live search behavior; review before running them through Claude.
✓get_rewrite may replace marketing copy; review output before publishing to production sites.
get_score fetches and analyses live page content from URLs you provide.
OAuth tokens grant persistent BittleBits access until revoked.
Automated rewrites can introduce factual errors; human review is recommended.
Privacy notes
✓Context Mode can index file edits, git operations, tasks, errors, user decisions, local files, and command output in SQLite/FTS5 stores.
Indexed data may include source code, logs, secrets accidentally printed to terminal, customer data, repository paths, and private prompts.
Local analytics and statusline data can reveal workflow patterns, tool usage, and project activity.
✓Tool calls may expose file paths, filenames, source code snippets, imports, classes, methods, functions, symbols, search matches, complexity summaries, and project settings.
Index data and temp directories can persist derived repository structure or symbol metadata outside the source tree.
File watcher status, exclude patterns, and settings can reveal local project layout and development conventions.
If an MCP client forwards tool results to a model provider, repository contents and search snippets may leave the local machine.
Exclude secrets, generated artifacts, vendored dependencies, build output, and private data before indexing.
✓Indexed documents and search results enter the MCP client context and the model's prompt.
MEILI_HTTP_ADDR and MEILI_MASTER_KEY are secrets — keep them in the client config or environment.
✓Page URLs and content sent to get_score are processed by BittleBits for analysis.
Rewrite requests may include proprietary marketing text; avoid sending unreleased campaign copy to untrusted sessions.
OAuth sessions should not be shared across users or pasted into public support threads.
Prerequisites
Node.js 22.5 or newer, or Bun for supported installs.
MCP client such as Claude Code, Gemini CLI, VS Code Copilot, Cursor, Codex, or another supported host.
Optional Claude Code plugin marketplace support for automatic hooks and slash commands.
Team agreement on what files, command outputs, and session events may be indexed locally.
Python 3.10 or newer.
uv or another Python package runner that can install `code-index-mcp`.
An approved repository path that the MCP client is allowed to inspect.
Optional native search tools such as ripgrep, ugrep, ag, or grep for faster search backends.
A reachable Meilisearch instance URL (MEILI_HTTP_ADDR).
A Meilisearch master or API key (MEILI_MASTER_KEY) when your instance requires authentication.
uv (uvx) or pip to run meilisearch-mcp, or Docker (getmeili/meilisearch-mcp).
An MCP client such as Claude Code or Claude Desktop.
BittleBits account with OAuth access to GEO scoring and rewrite features.
Claude Pro, Team, or Enterprise with Connectors support, or another MCP client with remote HTTP connectors.
URLs or page content you are authorised to analyse and rewrite for GEO.
Basic understanding of Generative Engine Optimization goals and brand voice guidelines.
Install
claude mcp add context-mode -- npx -y context-mode