Skip to content

Other MCP clients

Brandon White edited this page Dec 2, 2026 · 3 revisions

Other MCP clients

atlas is built and measured in Claude Code, but it is a plain MCP server over stdio, so any client that runs local MCP servers can use its tools. This page says how to set it up in Codex, Zed and Claude Desktop, what each one gets, and the hook contract a client with command hooks can rely on.

What works without hooks

Without hooks atlas is project memory; the measured token savings need hooks (Claude Code; in Codex, SessionStart and UserPromptSubmit are verified). The tools (recall, search, grep, section, lookup, symbol, journal, handoff and the rest) work in every client below, and what one session writes the next one recalls, whatever client wrote it.

What hooks add is everything atlas does without being asked: recall injected on each prompt, the compaction card, the context cap, subagent briefs, and the output swaps behind routing (shell output into handles), which carry about two thirds of the net saving measured in Claude Code. A client with no hooks at all keeps at most the share that comes from the model calling atlas's lookups itself, less what the tool definitions cost: about 40% of the hooked net, and that is an estimate, never measured outside Claude Code. It assumes the model calls atlas as often as Claude does; a model that calls it rarely saves close to nothing. See Token savings and method for how the hooked numbers are measured.

Profiles. atlas picks what it serves a client at initialize, by its clientInfo.name: Claude Code and Codex get full (today's surface, hooks do the steering); Claude Desktop, Zed and any client atlas does not know get pull, where hook is left out of the tool list, recall, remember and journal are described to steer the model to memory, journal needs no lane (it files to inbox:<client>), and the project card comes with a conversation's first answer where atlas can tell conversations apart (a Codex session, a Claude Code process). Claude Desktop and Zed send no conversation key, so every answer ends with a one-line pointer to a no-argument recall instead. Where atlas can tell conversations apart but no hook runs (a client forced to pull, or one that sends a Codex-style _meta session id), a read answer can also end with up to 150 tokens of related records, once each per conversation and at most 1,500 tokens per conversation by default (pull.footer_session_tokens), found from the call's own text arguments. That footer is off by default: the pull-arm memory eval found it changed no answer and saved no follow-up for about 1,429 tokens per 100 conversations, and it waits on a harder question set to show payback. pull.footer = on turns it on; auto turns it on until the first hook event arrives, then off for the server process's life. Its budget and the records it has pointed at are kept by the server process too: a restart starts them afresh. Claude Desktop and Zed get the pointer line and no footer, and Claude Code and Codex, being full, get neither. recall with no arguments answers the project card in every profile. Override with atlas --profile full|pull, ATLAS_PROFILE or profiles.by_client; see the "Server profiles" section of Configuration reference.

Codex

Verified with Codex CLI 0.172.0 on Windows, 2026-11-25: the MCP server, the SessionStart and UserPromptSubmit command hooks, and their context reaching the model.

The server

Project .codex/config.toml (or the same table in your user config.toml):

[mcp_servers.atlas]
command = 'C:\path\to\atlas.exe'
args = []
startup_timeout_sec = 30
env = { ATLAS_UNATTENDED = '1' }

# Only if shell commands call atlas themselves (`atlas run`):
[shell_environment_policy]
set = { ATLAS_UNATTENDED = '1' }

args takes the same flags as anywhere else, for example ['--config', 'C:\path\to\atlas.json']. ATLAS_UNATTENDED=1 tells atlas no user is there to answer its SessionStart offers (see Sessions with no user); Codex never asks them. The env key is Codex's documented one; the verification run set the variable another way, so env itself is not yet run against atlas.

The hooks

Project .codex/hooks.json. The command form is recommended for both events: it is the one verified end to end. Forward slashes avoid JSON escape mistakes on Windows.

{
  "hooks": {
    "SessionStart": [{"hooks": [{"type": "command", "command": "C:/path/to/atlas.exe --hook", "timeout": 30}]}],
    "UserPromptSubmit": [{"hooks": [{"type": "command", "command": "C:/path/to/atlas.exe --hook", "timeout": 30}]}]
  }
}

A hook process does not inherit the server's env, so set ATLAS_UNATTENDED=1 in the environment Codex runs in, or add --config to the command the same way as args above.

The no-spawn alternative for UserPromptSubmit is Codex's mcp_tool handler calling atlas's hook tool on the server that is already running:

{"type": "mcp_tool", "server": "atlas", "tool": "hook",
 "input": {"event": "UserPromptSubmit", "session_id": "${session_id}", "prompt": "${prompt}", "cwd": "${cwd}"}}

Its reply is the same hook JSON as text (see The hook contract); whether Codex unwraps hookSpecificOutput from a tool's text is untested, so it may reach the model as the JSON itself. In the verification run Codex filled ${session_id} with the turn's id rather than the session's, so on this form a record can be pointed to again on every turn.

Use one transport per event. Both share the per-session dedupe through the store: a --hook process reads what was injected in the session before it started, and the server reads it again at every prompt, so a record either one pointed to by its own key is not pointed to again by the other. A record shown only inside a lane view is not covered: the view is logged under its lane key alone, so the other transport can still point to that record. Rows are written after the answer: a --hook process writes its rows before it exits, and the server's rows come from its log thread, so a hook that answers while that thread lags behind the server's last answer can point to a record the server has just pointed to.

Trust

  • The project must be trusted: codex exec --trust, or accept the trust prompt in interactive codex.
  • Each hook must be trusted too, in /hooks or Settings > Hooks. codex exec skips an untrusted hook without a warning, so a missing answer in exec is first a trust question.
  • On Windows the trust keys are lowercased paths: a project trusted under one casing is the same project.

Shell commands

Under PowerShell, atlas run -- echo X fails (echo is a PowerShell alias, not a program). Run a shell built-in through its shell: atlas run -- cmd /c echo X, or atlas run -- powershell -NoProfile -Command "...".

Zed

Not yet run against atlas: set up from Zed's own documentation.

The Zed Agent (Zed's native agent) reaches MCP servers through context_servers in Zed's settings. It supports MCP's tools and prompts, nothing else, and it has no hooks: no event of any kind reaches a server, so atlas there is the tools alone.

{
  "context_servers": {
    "atlas": {
      "command": "C:\\path\\to\\atlas.exe",
      "args": [],
      "env": { "ATLAS_UNATTENDED": "1" }
    }
  }
}
  • Tool approval. Zed asks before every tool call until you allow it; atlas's tools are keyed mcp:atlas:<tool> in agent.tool_permissions.
  • Rules. Zed reads the first match only of .rules, .cursorrules, .windsurfrules, .clinerules, .github/copilot-instructions.md, AGENT.md, AGENTS.md, CLAUDE.md and GEMINI.md at the project root, so an atlas block in a project's AGENTS.md is silently unread where a .rules file exists. The personal file is read for every project and is the safer carrier: %APPDATA%\Zed\AGENTS.md on Windows, ~/.config/zed/AGENTS.md elsewhere. A rule block to paste there is planned as atlas settings agents-md; atlas prints it and never writes Zed's files.
  • External agents. Zed forwards its context_servers to external agents (Claude Agent, Codex and the others it runs through ACP), and each agent reads its own MCP configuration as well. An agent that already has atlas in its own configuration then gets two atlas servers: two tool lists to pay for, and hooks that talk to one server while the model calls the other. Put atlas in Zed's settings only for the Zed Agent, or configure it in one place only.

Claude Desktop

Not yet run against atlas: set up from Anthropic's documentation.

claude_desktop_config.json (Settings > Developer > Edit Config):

{
  "mcpServers": {
    "atlas": {
      "command": "C:\\path\\to\\atlas.exe",
      "args": [],
      "env": { "ATLAS_UNATTENDED": "1" }
    }
  }
}
  • Chat has no hooks and drops a server's instructions, so the model learns atlas from its tool descriptions alone. Recall works when it is called; nothing is injected.
  • The Code tab is Claude Code. Use the atlas plugin there, as in Install and setup; everything on the other pages applies.

Command hooks in GitHub Copilot, OpenCode, Codex and Gemini CLI

Each client has its own hook format, so atlas --hook --client NAME (claude by default, copilot, codex, gemini or opencode) reads that client's events and answers in its format. The model does not matter; the client does. The files under clients/ in the repository are ready to copy.

What was run, and what was not. Codex's SessionStart and UserPromptSubmit are the only setup run against a client here (above). Everything else in this section came in from a contributor (public pull request #29) and has not been run against the client itself by us: the Copilot rows rest on payloads the contributor captured from Copilot CLI 1.0.114, which tests replay (fixtures/clients/copilot) but which never ran against Copilot here; the OpenCode plugin and its notes on OpenCode 2.4.1 are the contributor's, with no test of the plugin; Gemini CLI and the rest of Codex follow the clients' documentation. Each is marked below.

Claude Code GitHub Copilot OpenCode Codex Gemini CLI Cursor, Grok Build
MCP tools yes yes yes yes yes yes
Digest of a long Bash result yes yes yes yes, as a block yes, as a deny no
Recall on each prompt yes yes yes yes yes no
Session card yes yes yes yes yes no
Deny (the merge gate) yes yes yes yes yes no
Agent caps, orchestrated mode yes no no no no no
Compaction instructions yes no yes no no no
Subagent lane recall yes at start, no brief no at start no no
Status yes untested (payloads replayed) untested SessionStart and UserPromptSubmit verified; the rest untested untested MCP only

Cursor and Grok Build cannot replace a built-in tool's result from a hook, which is what the digest needs, so atlas offers them its MCP server only. A hook run with --client <name> is never offered Claude Code settings, and atlas leaves Claude Code's own status line and hooks alone in it. Codex's SessionStart and UserPromptSubmit run plain atlas --hook (the verified setup), so there the status-line repair and the drift line still run; ATLAS_UNATTENDED stops only the offers.

atlas on PATH

The copied hook files run atlas, and the commands atlas asks a model to run (atlas settings add-project) need it too, so atlas must be on PATH in every shell, not as a shell alias. Link the binary itself, or the plugin's bin/atlas launcher (which follows links to find the binary beside it), from ~/.local/bin:

ln -s <plugin>/bin/atlas-x86_64-unknown-linux-gnu ~/.local/bin/atlas

The name after atlas- is your machine's (atlas-aarch64-apple-darwin, for one). The link holds only while the plugin folder stays where it is, as one given to claude --plugin-dir does. A plugin installed with /plugin lives in a folder per version, so the link breaks at its next update: link it again then.

Where the files go

They need an atlas that knows --client on PATH: Copilot refuses every tool call whose PreToolUse hook fails, and an older atlas fails on the unknown flag. An atlas that knows --client lets the event through whenever it fails itself, with the error on standard error.

  • GitHub Copilot: copy clients/copilot/hooks.json to ~/.copilot/hooks/atlas.json (every repository), or to .github/hooks/atlas.json in a trusted repository. VS Code, the GitHub Copilot app and Copilot CLI read the same files. The MCP server: copilot mcp add atlas -- atlas, or in VS Code .vscode/mcp.json: {"servers": {"atlas": {"type": "stdio", "command": "atlas"}}}.
  • OpenCode: copy the folder clients/opencode/atlas to .opencode/plugins/atlas in a project, or to ~/.config/opencode/plugins/atlas. The plugin runs atlas, or the binary ATLAS_BIN names. The MCP server: opencode.jsonc: {"mcp": {"servers": {"atlas": {"type": "local", "command": ["atlas"]}}}}.
  • Codex: copy clients/codex/hooks.json to ~/.codex/hooks.json or .codex/hooks.json, then trust it in /hooks (see Trust above). Its SessionStart and UserPromptSubmit entries are the plain atlas --hook form verified above; the other events use --client codex and are untested.
  • Gemini CLI: merge the hooks object of clients/gemini/settings.json into ~/.gemini/settings.json or .gemini/settings.json. The MCP server: {"mcpServers": {"atlas": {"command": "atlas"}}}. Untested.
  • Cursor: .cursor/mcp.json: {"mcpServers": {"atlas": {"command": "atlas"}}}. Grok Build: grok mcp add. MCP only.

How each client differs

  • GitHub Copilot (untested) sends its PascalCase events in Claude Code's shape, tool names included. Two events exist only in camelCase and name no event in their input, so the hooks file passes --event: userPromptTransformed carries the prompt's recall (Copilot drops what a command hook answers to UserPromptSubmit), and subagentStart carries a subagent's start. Copilot ignores a hook's rewrite of a tool's input, so atlas sends none. A long output Copilot keeps in a file is digested from that file; atlas reads only a file named ...-copilot-tool-output-....txt directly in the temporary folder, not a link, and not one over 32 MiB.
  • OpenCode (untested) runs plugins, not commands. The plugin adds the session card and each prompt's recall to that prompt in every model call, but never to the prompt OpenCode stores and shows you. A long shell output OpenCode cut short is digested from the file it keeps.
  • Codex: its hook JSON is Claude Code's; a digest goes back as a PostToolUse block whose reason replaces the result. Only the two events above were run; the block is untested.
  • Gemini CLI (untested) has its own event and tool names (BeforeTool, run_shell_command), mapped to Claude Code's.

What is lost outside Claude Code

  • Compaction instructions: only Claude Code and OpenCode let a hook add to the summary's instructions. Elsewhere the checkpoint is still written before a compaction, but the summary does not carry its keys.
  • The context cap: atlas reads the context size from Claude Code's transcript. Other clients' transcripts differ, so the cap and its warnings do not apply there.
  • The skills (atlas, orchestrate) are Claude Code skills. Other clients get the tools' own descriptions only.
  • Agent caps: atlas frees an agent's slot when the agent stops, and Copilot's built-in general-purpose agent sends no stop. Other clients' launches are not counted, and their sessions are not offered orchestrated mode.

The design and what it rests on: docs/design/clients.md.

The hook contract

atlas --hook reads one hook event as JSON on stdin and prints its answer on stdout, a process per event; the hook MCP tool takes the same event as its arguments and replies with the same text. Only SessionStart and UserPromptSubmit are pinned for clients other than Claude Code, by the tests the_hook_contract_for_other_clients_is_pinned_command and the_hook_contract_for_other_clients_is_pinned_tool; every other event --hook accepts is not stable. (PreCompact, for one, does run on a Codex rollout: it writes a checkpoint whose card, at the next SessionStart compact, says the transcript was unread.)

Input. The fields atlas reads for these two events:

Field Required Meaning
hook_event_name (or event) yes SessionStart or UserPromptSubmit; the hook tool's name for it is event
session_id yes the conversation; dedupe and the session budget are per session
prompt UserPromptSubmit the user's prompt, what recall is matched against
cwd yes the working folder, which names the project
source no SessionStart: startup, resume, clear or compact
transcript_path no a Claude Code transcript; null, missing, or a file that is not Claude Code's (a Codex rollout) is ignored, never parsed

Any other field (Codex sends turn_id, model and permission_mode) is accepted and ignored. A ${...} value the client did not substitute counts as empty.

Output. A UserPromptSubmit that recalls something prints exactly one JSON object:

{"hookSpecificOutput": {"hookEventName": "UserPromptSubmit", "additionalContext": "atlas recall ..."}}

That is hookSpecificOutput holding exactly hookEventName and additionalContext, nothing else, on both transports. additionalContext names each record by its key, one recall key= away. Nothing to say is empty stdout with exit 0. A SessionStart answer has the same shape with "hookEventName": "SessionStart"; with ATLAS_UNATTENDED=1 it never asks an offer, and on a fresh store it prints nothing, where the same start attended (0, or unset) prints the first-session offers on the command form. Exit is 0 in every case atlas answers, including a time budget overrun (the answer is then one line saying what was skipped).

Per session. A record pointed to by its own key is pointed to once per session, across processes and across both transports: a second --hook process of the same session reads what the first injected from the store, and the server reads it again at every prompt. Records shown inside a lane view are deduped within one process only (the view is logged under its lane key). The session budget (recall.session_budget_tokens) counts from the same rows: each holds every byte its answer sent, the pointer header and the "+N more" line included, so a --hook process and the server charge a prompt alike. Rows not yet written (the other process is still answering) are not counted.

A prompt that gets nothing is the relevance gate, not the session: a record must hold recall.min_terms (3) of the prompt's words, so "what is the widget colour decision?" gets nothing from a record that says "widget" and "colour" but never "decision", in any session, fresh or not.

Cost. Each command-hook call is a process start, a store open and, with the embedding model, a model load. Measured 2026-11-26 at commit 2e045dde, release build, Windows, a temp store of 1,604 records, 20 UserPromptSubmit runs per arm timed from process spawn to exit (one warm-up run first); the machine had another build running, so treat these as provisional:

Arm Median p95 What the hook answered
no model (lexical recall) 34 ms 36 ms nothing, on every run (random prompts cleared no gate)
embedding model (bge int8) 338 ms 353 ms a pointer, on every run

About 270 ms of the model arm is loading the model, once per process. The hook tool through the running server pays it once per server, not per prompt, which is the case for mcp_tool where a client offers it. The Codex verification run measured 34 to 105 ms per call on a fresh store, through a Python logging wrapper.

Clone this wiki locally