codex-bridge-mcp
Allows Claude Code to drive OpenAI Codex CLI jobs: start execute, review, or freeform sessions; wait for questions or turn results; send answers or corrections; and resume Codex sessions.
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.
codex-bridge-mcp
A two-way MCP bridge that lets Claude Code drive the Codex CLI, and lets Codex talk back.
Claude writes a plan → Codex executes it, or adversarially reviews it against the real code.
While working, Codex can ask Claude questions (and block until answered) or send progress / findings.
Claude can answer, send corrections mid-run, or start follow-up turns in the same Codex session.
Keep several named Codex sessions per project, e.g. a
revieweron high effort and anexecutoron a cheaper setting.
Claude Code ──MCP "codex"──▶ server.mjs ──spawns──▶ codex exec --json
▲ │ │
│ ~/.codex-bridge/jobs/<id>/ │ MCP "claude_bridge"
└──── codex_wait ◀──────── mailbox ◀───────────────┘ (injected per job)Requirements
Node.js 18+
Codex CLI, logged in (
codex login). Tested with codex-cli 0.162.Claude Code
Related MCP server: codex-mcp
Install
claude mcp add codex -s user -- npx -y codex-bridge-mcpOr from source:
git clone https://github.com/WeiqiZhou2002/codex-bridge-mcp.git
cd codex-bridge-mcp && npm install
claude mcp add codex -s user -- node "$PWD/server.mjs"Then start a new Claude Code session. claude mcp list should show codex ✔ Connected.
Usage
Just ask Claude in plain language:
Start a Codex reviewer on xhigh and have it adversarially review
plans/plan-v3.md.
Start a Codex executor on high to implement the plan; it should ask me if anything is unclear.
Tell the reviewer that finding #2 is wrong because the cache is per-request, and ask it to re-check.
Tools Claude gets (server codex)
Tool | What it does |
| Start a job in the background. |
| Block until Codex asks a question, sends a message, or finishes/fails its turn. Returns a digest of the commands it ran and files it changed. |
| With |
| Stop a running job. |
| List jobs with status, name, session and cwd. |
Anywhere a job_id is expected you can pass the job's name instead; the newest job with that name wins.
A job's model, effort and sandbox are fixed at start and reused by every follow-up turn.
Tools Codex gets (server claude_bridge, injected via -c per job)
Tool | What it does |
| Blocks until Claude answers (default timeout 30 min; on timeout Codex proceeds and states its assumption). |
| Non-blocking note: |
| Pick up corrections Claude queued. Queued messages are also appended to any bridge tool result. |
Your normal ~/.codex/config.toml (default model, other MCP servers, etc.) still applies.
How it works
Each job gets a directory under ~/.codex-bridge/jobs/<id>/ (override with CODEX_BRIDGE_HOME):
events.jsonl: Codex → Claude. Questions, messages, a digest parsed fromcodex exec --json, turn results.answers/<qid>.json: Claude → Codex answers toask_claude.inbox.jsonl: Claude → Codex unsolicited messages.
Follow-up turns use codex exec resume <session_id>. Job metadata persists on disk, so a later Claude session can keep talking to the same Codex session. Turns that were running when the previous Claude session exited are marked resumable.
Caveats
executemode lets Codex write inside the working directory.danger-full-accessis only used if you ask for it explicitly.In Codex's
workspace-writesandbox, Codex usually cannot write to.git, so let Claude (or you) do the commits.Codex's
--jsonevent format is not a stable API. If a Codex upgrade changes it, the activity digest may get thinner, but final answers still come through.Two jobs in the same folder do not share context. Claude relays between them.
Development
npm testThe tests drive the server through a real MCP client against a fake codex binary (test/fake-codex.mjs), so they are fast and don't spend tokens. Set CODEX_BIN to point the bridge at a different Codex executable.
License
MIT
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
Capture coding-agent sessions and resume them in any other agent: Claude Code, Codex, Cursor, more.
Shared workspace where Claude, ChatGPT, Codex and Grok share files, tasks, decisions and handoffs.
Your AI apps as one team: hand work to Codex or Claude Code on your Mac, with a shared logbook.
Source-checked CLI guides and model-aware planning for Claude Code, Codex, and Grok Build.
Related MCP Servers
- AlicenseCqualityDmaintenanceConnects AI assistants like Claude to the Codex CLI for code analysis, editing, and execution. Supports file references with @ syntax, sandboxed code execution with approval workflows, and structured code changes for automated refactoring and documentation.888 npm176MIT
- AlicenseAqualityBmaintenanceBridges Claude Code and OpenAI Codex CLI for an interactive plan-execute-review workflow, enabling Claude to interview, design, and review while Codex implements code changes.724 npm3MIT
- AlicenseNot gradedqualityBmaintenanceLets Codex delegate coding and repository work to an installed Claude Code CLI with permission-aware inspect/write access, model and effort selection, resumable and cloud-attached sessions, and durable synchronous or asynchronous jobs.MIT
- AlicenseAqualityBmaintenanceEnables Claude Code and OpenAI Codex CLI to act as bidirectional partners by letting each ask the other for code review, explanations, planning, performance analysis, and implementation help. It also provides background job tools for starting, observing, waiting on, and cancelling delegated tasks.6116 npm1MIT