Magi
This server does not currently have a deployable release on Glama. Follow the repository's setup instructions to install and configure it for your MCP client, including any required credentials and local dependencies.
Magi
Claude Code, Codex CLI and Oh My Pi, working as peers. Evidence over agreement.
Three agents, one verdict, and a rule about what counts as proof.
What it does
You already run more than one coding agent. Magi lets them check each other's work.
Not "one model asks another for the answer." Two engineers who review each other, argue when they disagree, and settle it with something you can verify. A second model agreeing with the first proves nothing, so Magi is built around one rule:
EVIDENCE > REASONING > MODEL AGREEMENTYou do not call a tool. You ask in plain words, and the agent decides when a second opinion is worth it:
Ask Codex to independently review this implementation.
Have Claude fact-check these claims before answering.
Use Codex as an adversarial reviewer of this architecture.
Delegate the test implementation to Codex, then review its changes.
Each harness loads one Magi MCP server. A request goes to a session that is already running in the right directory, so the peer keeps its own context. If nobody is home, Magi starts a restricted headless process instead. Every exchange is written to a ledger under ~/.magi.
Related MCP server: ape
A consultation, start to finish
Here is one illustrative run, as it looks from your chair.
You tell Claude: "Have Codex review this before I merge it."
Claude sends Codex a
REVIEWpinned toHEAD~1..HEAD, asks forfile:lineevidence, and keeps its own opinion out of the message.Codex reads the diff in its own session and replies with four findings.
Claude opens the files and checks each one. Three hold. One is wrong, because the guard it says is missing sits two lines above the cited line.
Claude records the outcome (3 accepted, 1 rejected, 0 open) and tells you what it changed and why it dismissed the fourth.
Skip step 4 and Magi nags you: unreconciled cards are named on later calls, and more than three in one coordinator session hold new cards. magi log shows over time how often each peer's findings actually held up.
The rules
Rule | What happens |
Independent first pass | The peer reviews without seeing your conclusions, so its agreement means something. |
Pinned artifacts | A review records the diff hash and a repository snapshot, so you can tell after an edit whether the peer saw the current code. A hash records bytes, not proof anyone read them. |
One orchestrator per task | Whoever you asked is in charge. The peer answers and stops, and cannot start its own request and loop. Roles reset per task, so both directions work (recursion.md). |
Reconcile, don't relay | The asking agent checks every finding against the source and reports what it changed, rejected and left open. |
Bounded conversation | A peer can ask a question before it answers, and a debate can carry claims back for a rebuttal. Rounds are capped. |
Read-only by default | Headless launches are restricted, and live reviews keep their session's permissions. Only a |
No secrets in transit | Context carries only what the peer needs. Message text that |
Modes
Mode | For | Waits for a live reply by default |
| uncertainty, sanity checks | yes |
| code and plans, after your own pass | yes |
| expensive or irreversible decisions | yes |
| claims where being wrong costs something | yes |
| a bounded subtask you will review | no |
Headless requests return after launch in every mode. Pass wait: true to block for the reply inline. DEBATE, PARALLEL and BAKEOFF exist in the engine but are not in the MCP tool schema.
Options on a request
Option | What it does |
| Pins the review to a git diff: |
| Tells the peer what proof you want, for example "cite file:line for every finding". |
| Lets a |
| Names a long-lived peer that resumes its own context on every request, so it remembers the project. |
| On a headless omp worker, runs omp's advisor beside it. A second model reads each turn and steers only on a concrete problem. It costs a model call per turn, so it suits long runs (usage.md). |
|
|
| Sends the request to a machine listed in |
Three harnesses, every direction
Any of the three can consult the other two, and omp can consult a distinct omp session. Anything else that loads MCP servers can join: serve it under its own name (magi serve ... --as <name>) and a small shim inside its session lets it be answered. Oh My Pi ships with both halves.
Unit | Harness | Reaches the others through |
MELCHIOR-1 | Claude Code |
|
BALTHASAR-2 | Codex CLI |
|
CASPER-3 | Oh My Pi |
|
Watch it work
The /magi deck, drawn with sample data.
magi install adds a Claude Code mod, magi-view. Peer messages show as a plain header (Reply from omp · magi-… · round 2) over their body, without the protocol text, and your own Magi calls collapse to one line each with their delivery state. The model still reads every message as delivered.
The /magi deck shows what waits on you, the three units with the cards in flight between them, every agent working on a card, the last messages, a seven-day ledger and the provider switches. A band above the prompt appears only when a delivery fails, and the status line reads Magi: claude ✓ · codex – · omp ✓ · 1 working here. Details are in install.md.
No mod? The terminal covers the same ground:
Command | Shows |
| the three units, open cards, unreconciled replies, a seven-day ledger |
| who is reachable: working, idle or blocked, and how full each context is |
| every task: mode, who asked whom, how the round ended, and the reconciliation outcome |
| the words of one task: request, reply, outcome |
| retained replies |
| starts a named live session that peers can address |
| checks CLIs, auth, registrations and skills |
Memory that all three share
remember, recall and forget keep notes in SQLite, one bank per repository (worktrees share it). Requests can carry relevant recalled evidence, and anything already delivered is not repeated. magi memory export writes the bank as markdown.
Get started
You need Node.js 22.13 or newer (for built-in node:sqlite), git, and Claude Code and Codex CLI installed and signed in. Oh My Pi is optional and is wired in when Magi finds it.
git clone https://github.com/howeasy/Magi.git
cd Magi
npm install
node bin/magi.mjs install # add --omp to set up Oh My Pi explicitlySet
"crossSessionInbound": "accept"in Claude'ssettings.json. The installer does not write it.Restart every Claude Code, Codex and omp session. Each harness reads its MCP servers at startup.
Run
node bin/magi.mjs doctoruntil it shows noFAILrow.Open a session in a project that has a live peer and ask for a review.
The steps, with what each one checks, are in install.md, including the omp setup. More prompts and what each one triggers are in usage.md. To remove everything, see uninstall.md.
Documentation
how it works, state layout, and prior art | |
requirements, install and verify, upgrading, the Claude Code mod | |
the MCP entries and the load-bearing settings | |
what each prompt triggers, and the CLI | |
permissions, sandboxing, redaction, bounds | |
the anti-recursion model | |
symptoms, their checks and fixes, error codes | |
what matches Claude cross-session messaging, and what does not | |
why not A2A, and when to revisit | |
the delivery contracts, and how to repair them if they break | |
how the bridge identifies the calling session | |
how the skills and prompts are tested against a fresh agent | |
the MAGI visual identity, as a design record | |
captured evidence for the private formats Magi depends on, true for the versions each file names | |
removal |
Development
npm test # offline: fake CLIs, an isolated state home per test, no model calls
PEER_E2E=1 npm test # adds real Claude and Codex callsConventions, what is live and when, and where each kind of change belongs are in AGENTS.md. Private formats (the Claude inbox frame, the Codex desktop steer channel, the omp extension API) are pinned to the versions they were checked against, and transport-recon.md is the repair guide when one breaks.
Licence and credits
Magi is MIT licensed. The Claude Code mod's clock, pulse and layout follow Flightdeck (MIT); see NOTICE. Prior art lists the other projects whose ideas Magi took. The MAGI look is a nod to the display in Neon Genesis Evangelion.
Claude, Codex and Oh My Pi are products of their respective owners. Evangelion and MAGI are trademarks of their owners. This is an unaffiliated tool.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
This server cannot be deployed
Maintenance
Related MCP Connectors
Shared workspace where Claude, ChatGPT, Codex and Grok share files, tasks, decisions and handoffs.
Persistent cross-session memory shared by Codex, Claude Code, ChatGPT, and other AI agents.
Your AI apps as one team: hand work to Codex or Claude Code on your Mac, with a shared logbook.
Agents message each other and partners' agents. Claude Code, Codex (beta): memory, board, key vault.
Related MCP Servers
- AlicenseAqualityDmaintenanceEnables Claude Code to delegate tasks to OpenAI's Codex CLI (GPT-5.4) with structured execution traces, parallel execution, session persistence, and adversarial code review.15MIT
- AlicenseNot gradedqualityAmaintenanceEnables evidence-gated, multi-session AI coding runs with plan-build-ship state management, coordinating Claude Code and Codex native agents.20 npmMIT
- AlicenseNot gradedqualityBmaintenanceEnables Claude Code and OpenAI Codex to exchange messages directly within their sessions, including optional cross-review of plans, without copying between terminals.174 npmMIT
- AlicenseNot gradedqualityBmaintenanceEnables Codex and Claude Code to collaborate autonomously as persistent peers that research, exchange questions and challenges, jointly edit a shared versioned report or coding repository, and record disagreements and evidence. A deterministic coordinator enforces the lifecycle and a dual approval gate on an exact artifact version before exporting an immutable final result.1MIT