OMP (Oh My Pi)
Install context-mode in OMP (Oh My Pi), a Pi-compatible harness that runs context-mode as an MCP server with isolated storage under ~/.omp/.
OMP (Oh My Pi) is a Pi-compatible harness that stores its agent state under
~/.omp/agent/. It runs context-mode purely as an MCP server — there is no hook
adapter. The dedicated OMP adapter exists mainly to keep ~/.omp/context-mode/
storage isolated, so an OMP install is detected as OMP rather than treated as
plain Pi and never roots its session data under another harness's directory.
OMP has no hook adapter, so context-mode cannot intercept tool calls
automatically. Routing is voluntary — the model follows the SYSTEM.md
instructions at roughly 60% adherence. See
Tool selection for how routing decisions are
made.
Install
Register the MCP server in OMP's settings file, then rely on the routing
instructions. With a global install you can point the command at the
context-mode binary; otherwise use npx -y context-mode for a no-install run.
Register the MCP server
Add context-mode to the mcpServers object in OMP's settings file at the agent
root, ~/.omp/agent/mcp.json. The agent root is overridable with the
PI_CODING_AGENT_DIR environment variable (OMP's upstream convention; there is
no OMP_* runtime variable).
{
"mcpServers": {
"context-mode": {
"command": "context-mode"
}
}
}The bare context-mode binary starts the MCP server by default — there is no
mcp subcommand. To run without a global install, set "command": "npx" and
"args": ["-y", "context-mode"] instead.
Add the routing instructions
Routing instructions live in SYSTEM.md — OMP's native system-prompt file
(project .omp/SYSTEM.md takes precedence over the global
~/.omp/agent/SYSTEM.md). OMP also auto-discovers AGENTS.md. The rules in
these files tell the model to send analysis, parsing, and large command output
through the ctx_execute and ctx_search sandbox tools instead of into the
context window.
Detection
context-mode detects OMP ahead of plain Pi, so an OMP install is never treated as Pi. It identifies OMP through any of:
- The
PI_CODING_AGENT_DIRenvironment variable - The presence of the
~/.omp/directory - The
CONTEXT_MODE_PLATFORM=ompoverride
Session data is rooted at ~/.omp/context-mode/sessions/, kept separate from the
agent directory so multiple OMP instances on one host share an index without
colliding.
Verify
Confirm the install with the doctor. It checks language runtimes, the FTS5 knowledge base, and MCP registration, then reports anything that needs attention.
context-mode doctorThe terminal doctor needs the global binary (npm install -g context-mode). If
you chose the npx path instead, run npx -y context-mode doctor. Because OMP
exposes only MCP integration, the doctor reminds you that there is no hook
layer — that warning is expected.
Related
Zed
Install context-mode in Zed, an MCP-only editor that registers context-mode through context_servers with advisory AGENTS.md routing.
Other MCP clients (unofficial)
A generic, best-effort guide to running context-mode in any MCP-capable client that is not officially supported yet: register the MCP server and steer routing with an AGENTS.md file.