claude-codex-mcp-bridge
This server provides a local bridge for structured communication and orchestration between AI agents like Claude Code and OpenAI Codex, using a SQLite mailbox and durable worker sessions.
Capabilities:
Registration:
bridge_register— announce an agent and its capabilities.Messaging:
bridge_send— send direct or broadcast messages (supports thread IDs, idempotency keys).bridge_inbox— read unread or all messages for an agent.bridge_wait— block until a matching message arrives (filters by sender, thread; timeout up to 290s).bridge_ack— mark messages as handled (history preserved).bridge_thread— retrieve full ordered thread history.bridge_agents— list all registered agents and their capabilities.
Codex Orchestration:
bridge_orchestrate_codex— launch an autonomous Codex session for a task, optionally in an isolated git worktree, with configurable round limits and durable state.bridge_continue_codex— resume a paused Codex session after the coordinator supplies an answer.bridge_orchestration_status— inspect durable run state and audit events.
Built-in Skills:
ask_codexfor one-shot implementation/verification tasks;review_with_codexfor evidence-led, read-only repository reviews.Safety: No credentials are stored; worker processes receive a restricted environment with prompts that forbid commits, pushes, deployments, credential changes, deletions, and production mutations unless separately approved.
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 |
| Handle a normal implementation, investigation or verification request without mailbox setup |
| Run an evidence-led, read-only Codex repository review |
| 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
One command
Run directly from the public GitHub repository:
npx --yes --package=github:WebisityStudio/claude-codex-mcp-bridge claude-codex-mcp-bridge setupThe setup command:
builds the package automatically;
detects and registers Claude Code and Codex;
resolves the server's absolute path internally;
installs the
ask-codex,review-with-codexand coordinator skills;installs a Claude
codex-teammateagent definition;points both clients at the same local database.
Open fresh Claude and Codex sessions after setup, then verify the bridge:
npx --yes --package=github:WebisityStudio/claude-codex-mcp-bridge claude-codex-mcp-bridge doctor
npx --yes --package=github:WebisityStudio/claude-codex-mcp-bridge claude-codex-mcp-bridge demoOther commands:
claude-codex-mcp-bridge status
claude-codex-mcp-bridge setup --force
claude-codex-mcp-bridge uninstall
claude-codex-mcp-bridge uninstall --purgeuninstall keeps the SQLite history unless --purge is explicitly supplied.
Manual fallback
git clone https://github.com/WebisityStudio/claude-codex-mcp-bridge.git
cd claude-codex-mcp-bridge
npm ci
npm run check
node dist/cli.js setupIf Codex is not available as codex on PATH, set CODEX_BIN in the MCP server environment to the full executable path.
Everyday use
After opening a fresh Claude session:
/ask-codex investigate why the authentication tests are flaky
/review-with-codex focus on authentication and tenant isolationOr simply ask Claude:
Ask Codex to implement this change and verify it.
Have Codex review this repository for security regressions.The installed skills route these requests through ask_codex and review_with_codex. Users do not need to choose agent names, create mailbox threads or manage acknowledgements for ordinary one-shot work.
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
- AlicenseNot gradedqualityBmaintenanceThe self-hosted MCP bridge between Claude Chat and Claude Code.46AGPL 3.0
- AlicenseBqualityDmaintenanceMCP server that enables Claude Code to delegate code generation and debugging to OpenAI Codex, with stall detection and auto-recovery.217MIT
- FlicenseNot gradedqualityBmaintenanceCodex Bridge MCP is a local MCP orchestration service for a stable Claude Code x Codex CLI development workflow.2
- AlicenseAqualityAmaintenanceBridges Claude Code and OpenAI Codex through MCP, allowing cross-harness querying, code review, explanation, and implementation delegation.61MIT
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.
A paid remote MCP for OpenAI Codex memory MCP, built to return verdicts, receipts, usage logs, and a
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