claude-codex-mcp-bridge
Enables OpenAI Codex to communicate with Claude Code through the same bridge, allowing Codex to receive tasks, respond, and resume saved sessions.
Click on "Install Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@claude-codex-mcp-bridgeOrchestrate Codex to fix the failing tests in the project"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
A local MCP bridge for Claude Code and OpenAI Codex. It combines a durable SQLite mailbox with a bounded orchestration loop that can start and resume saved Codex workers.
Claude Code ──stdio MCP──┐
├── local SQLite WAL store
Codex ──stdio MCP──┘The default mode has no account, cloud relay, HTTP server or listening network port.
Why
Plain MCP tools are request-response. Writing a message to a mailbox does not automatically start a new model turn in another GUI chat.
This project supports two practical patterns:
Two visible chats: both agents use
bridge_waitbefore going idle. A pending MCP call returns when the matching message arrives.Claude coordinates Codex: Claude calls
bridge_orchestrate_codex; the bridge starts a saved Codex CLI session, waits for structured output and can resume that exact session after a Fable decision.
See INSTRUCTIONS.md for copy-paste prompts.
Related MCP server: subcodex-mcp
Features
Local SQLite WAL mailbox
Direct messages and broadcasts
Stable thread IDs
Recipient-scoped acknowledgements
Idempotency keys
Blocking waits with sender/thread filters
Durable Codex run state and audit events
Saved Codex session continuation
Optional isolated Git worktrees
Structured worker output
Round and timeout limits
Explicit safety boundaries
Tools
Tool | Purpose |
| Register an agent name and capabilities |
| Send a direct or broadcast message |
| Read unread messages immediately |
| Keep the current turn open until a matching message arrives |
| Acknowledge handled messages without deleting history |
| Read a complete thread |
| List registered agents |
| Start a saved Codex worker, optionally in a worktree |
| Resume the same Codex session with Claude's answer |
| Read durable run state and audit events |
Requirements
Node.js 22.5 or newer
Claude Code
OpenAI Codex CLI
Git, if using worktree isolation
The mailbox works anywhere Node and both MCP clients run. The automated Codex launcher uses CODEX_BIN when set, then the bundled Codex binary inside the macOS ChatGPT app when available, then codex from PATH.
Core tests run on macOS, Linux and Windows in GitHub Actions. The live Claude Desktop/Fable plus Codex Desktop workflow was developed and verified on macOS.
Install
git clone https://github.com/WebisityStudio/claude-codex-mcp-bridge.git
cd claude-codex-mcp-bridge
npm ci
npm run checkBuild output is written to dist/:
npm run buildUse the absolute path to dist/server.js in both clients.
Claude Code
claude mcp add --scope user claude-codex-bridge -- node /absolute/path/to/claude-codex-mcp-bridge/dist/server.jsCodex
codex mcp add claude-codex-bridge -- node /absolute/path/to/claude-codex-mcp-bridge/dist/server.jsRestart or open a fresh session in each client after changing MCP configuration.
Windows
Use a quoted Windows path:
claude mcp add --scope user claude-codex-bridge -- node "C:\path\to\claude-codex-mcp-bridge\dist\server.js"
codex mcp add claude-codex-bridge -- node "C:\path\to\claude-codex-mcp-bridge\dist\server.js"If Codex is not available as codex on PATH, set CODEX_BIN in the MCP server environment to the full executable path.
Quick start: two visible chats
Pick one canonical thread ID, for example invoice-review-001. Register unique names, send with bridge_send, and wait with:
{
"agent": "claude-main",
"fromAgent": "codex-main",
"threadId": "invoice-review-001",
"timeoutSeconds": 285,
"acknowledge": true
}Most MCP hosts cut tool calls near five minutes. The bridge caps waits at 290 seconds and defaults to 285. Agents should renew a timed-out wait while the task remains active.
A filtered wait only wakes for the exact sender and thread. Agree the thread ID before either side starts waiting.
Quick start: autonomous Codex worker
Claude calls:
{
"coordinatorAgent": "claude-main",
"projectPath": "/absolute/path/to/repository",
"task": "Implement and test the bounded change",
"threadId": "feature-x",
"useWorktree": true,
"maxRounds": 6
}If the result is waiting_for_fable, Claude answers the returned question and calls bridge_continue_codex using the same run ID. The bridge resumes the exact Codex session and worktree.
The bridge does not commit, push, merge, deploy or clean worktrees automatically.
Storage
The default database is:
~/.local/share/claude-codex-bridge/bridge.sqliteOverride it in both MCP configurations with:
BRIDGE_DB_PATH=/absolute/path/to/bridge.sqliteAll MCP processes must point to the same database.
Honest limitations
MCP cannot cold-wake a GUI chat after its model turn has ended.
bridge_waitworks by keeping the current call alive.Agent registration does not prove active processing.
A mismatched thread filter can leave valid messages unread.
Codex session persistence does not guarantee immediate appearance in every desktop app version's thread list.
The default transport is local to one machine. It is not a cross-machine broker.
Safety
No credentials are stored by this project.
Child processes receive a small allowlist of environment variables, not the full parent environment.
Messages are local but are stored unencrypted in SQLite.
Do not send secrets through the mailbox unless every connected client is trusted.
Worker prompts prohibit commits, pushes, deployments, external sends, credential changes, deletion and production mutations unless separately approved.
Development
npm test
npm run build
npm run check
npm audit --omit=dev --audit-level=highThe test suite covers mailbox routing, acknowledgements, idempotency, independent MCP processes, blocking waits, durable orchestration state, session continuation, loop limits and platform-safe process environments.
Related work
This is not the only Claude/Codex bridge. See docs/ALTERNATIVES.md for a comparison with Claude Channels bridges, ACP delegation tools and general agent mailboxes.
License
MIT
Maintenance
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Related MCP Servers
- Alicense-qualityBmaintenanceThe self-hosted MCP bridge between Claude Chat and Claude Code.46AGPL 3.0
- Alicense-qualityDmaintenanceMCP server that enables Claude Code to delegate code generation and debugging to OpenAI Codex, with stall detection and auto-recovery.8MIT
- Alicense-qualityBmaintenanceMCP bridge for using local Claude CLI as a bounded reviewer and analysis delegate for Codex.MIT
- Flicense-qualityBmaintenanceCodex Bridge MCP is a local MCP orchestration service for a stable Claude Code x Codex CLI development workflow.2
Related MCP Connectors
A paid remote MCP for OpenAI Codex agent coordination MCP, built to return verdicts, receipts, usage
Real-time chat hub for AI agents — Claude Code, Cursor, Cline, Codex over MCP or REST.
User-owned memory for AI agents, Copilot, Claude, IDEs, CLIs, and chat apps over remote MCP.
Latest Blog Posts
- Who's Calling? MCP Hosts Are an Identity Blind Spot (And the Spec Knows It)By Om-Shree-0709 on .mcpAgent IdentityOAuth 2.1
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
MCP directory API
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/WebisityStudio/claude-codex-mcp-bridge'
If you have feedback or need assistance with the MCP directory API, please join our Discord server