Skip to main content
mcpSource-backed
Context Mode logo

Context Mode MCP Server

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.

by mksglu · submitted by oktofeesh1·added 2026-06-05·
Review first review before installing

Open the source and read safety notes before installing.

Citation facts

Source-backed facts for citing this resource, derived directly from the registry — also available as plain text for AI assistants.

Source URLs
https://context-mode.com, https://github.com/mksglu/context-mode
Brand
Context Mode
Brand domain
context-mode.com
Brand asset source
brandfetch
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.
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.

    Pending
  • Baseline comparison available

    No baseline peer selected yet.

    Pending
  • Diverging trust signals identified

    No major trust-signal divergence found.

    Pending

Setup at a glance

CLI install

Copy-ready — paste the snippet to get started.

10 minutes

Adoption plan

Balanced adoption plan

Current risk score 24/100. Use staged verification before broader rollout.

Risk 24

Pre-adoption checks

Validate source and review signals before any execution.

  • Confirm source provenanceRequired

    Source URL/provenance metadata is present.

    Done
  • Confirm metadata review state

    No review metadata found; increase manual validation.

    Pending
  • Verify install payload

    Install/config payload exists and can be inspected.

    Done

Security checks

Confirm safety, privacy, and package integrity signals.

  • Review safety notesRequired

    Safety notes are present.

    Done
  • Review privacy notesRequired

    Privacy notes are present.

    Done
  • Verify package integrity metadata

    No package verification/checksum metadata.

    Pending

Rollout

Adopt in controlled steps based on the selected plan.

  • Run in isolated sandbox firstRequired

    Use a constrained sandbox and observe behavior across multiple tasks.

    Pending
  • Roll out graduallyRequired

    Roll out to a small cohort before wider usage.

    Pending
  • Set monitoring and fallback

    Define rollback path and monitor errors after adoption.

    Pending

Evidence readiness

Evidence readiness matrix · balanced

Missing required evidence: Metadata review. Risk score 31.

Risk 31

Source provenance

Present

Source repository/provenance is listed.

Required in this preset

Metadata review

Missing

Review metadata is missing.

Required in this preset

Safety notes

Present

Safety notes are present.

Required in this preset

Privacy notes

Present

Privacy notes are present.

Optional in this preset

Package integrity

Missing

Package integrity metadata is missing.

Optional in this preset

Install payload

Present

Install payload is available.

Required in this preset

Required gaps: Metadata review

Decision timeline

Decision timeline · balanced

Blocking gaps: Check metadata review status. Risk 28.

Risk 28

triage

Confirm source provenanceRequired

Source/provenance metadata is available.

Done

triage

Check metadata review statusRequired

Review metadata is missing.

Pending

verify

Review safety notesRequired

Safety notes are available.

Done

verify

Review privacy notes

Privacy notes are available.

Done

verify

Validate package integrity metadata

Package integrity metadata is missing.

Pending

rollout

Verify install payload and commandsRequired

Install payload is available.

Done

Blockers: Check metadata review status

Prerequisite readiness

Prerequisite readiness

4 prerequisites to line up before setup.

0/4 ready
Network & hosting3General110 minutes

Safety & privacy surface

Safety & privacy surface

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.

Schema details

Install type
cli
Troubleshooting
No
Source repository stats
Scope
Source repo
Collection metadata
Estimated setup
10 minutes
Difficulty
intermediate
Full copyable content
{
  "mcpServers": {
    "context-mode": {
      "command": "npx",
      "args": ["-y", "context-mode"]
    }
  }
}

About this resource

Content

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.

Source Review

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 JSON-based MCP clients:

{
  "mcpServers": {
    "context-mode": {
      "command": "npx",
      "args": ["-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.

Source citations

Add this badge to your README

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.

Listed on HeyClaude
[![Listed on HeyClaude](https://heyclau.de/badge/mcp/context-mode-mcp-server.svg)](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).

Field

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.

Open dossier

Local code indexing MCP server that lets AI assistants search repositories, build symbol indexes, inspect file summaries, monitor changes, and navigate multi-language codebases.

Open dossier

Connect Claude to Meilisearch — manage indexes, add and search documents, tune settings, and monitor tasks — with Meilisearch's official Model Context Protocol server.

Open dossier

BittleBits hosted MCP server for Generative Engine Optimization with get_score and get_rewrite tools to measure and improve AI search visibility via OAuth.

Open dossier
Next steps
Trust
Review statusNot reviewedNot reviewedNot reviewedNot reviewed
Package trustPackage not verifiedPackage not verifiedPackage not verifiedPackage not verified
Source provenanceDiffersSource-backedSource-backedSource-backedSubmission linkedSource submission
SubmitterDiffersoktofeesh1oktofeesh1kiannidev
Install riskReview firstReview firstReview firstReview first
Notes Safety ✓ Privacy ✓ Safety ✓ Privacy ✓ Safety ✓ Privacy ✓ Safety ✓ Privacy ✓
BrandContext Mode logoContext Mode
Categorymcpmcpmcpmcp
SourceSource-backedSource-backedSource-backedSource-backed
Authormksglujohnhuang316MeilisearchBittleBits
Added2026-06-052026-06-062026-06-172026-06-14
Platforms
Harness
Source repo
Safety notesContext 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 notesContext 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
uvx code-index-mcp --project-path ABSOLUTE_PATH_TO_REPOSITORY
claude mcp add meilisearch -e MEILI_HTTP_ADDR=<your-meili-url> -e MEILI_MASTER_KEY=<your-key> -- uvx -n meilisearch-mcp
claude mcp add --transport http bittlebits https://bittlebits.ai/mcp
Config
{
  "mcpServers": {
    "context-mode": {
      "command": "npx",
      "args": ["-y", "context-mode"]
    }
  }
}
Manual-only setup:
uvx code-index-mcp --project-path ABSOLUTE_PATH_TO_REPOSITORY
{
  "mcpServers": {
    "meilisearch": {
      "command": "uvx",
      "args": ["-n", "meilisearch-mcp"],
      "env": {
        "MEILI_HTTP_ADDR": "<your-meili-url>",
        "MEILI_MASTER_KEY": "<your-key>"
      }
    }
  }
}
{
  "mcpServers": {
    "bittlebits": {
      "url": "https://bittlebits.ai/mcp",
      "type": "http"
    }
  }
}
Citations
ClaimUnclaimedUnclaimedUnclaimedUnclaimed
Open 4 picks in the interactive comparison tool

Related guides

Signals

Loading live community signals…

More like this, weekly

A short, calm digest of reviewed Claude resources. Unsubscribe any time.