codex-bridge
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 GPT Bridge (codex-bridge)
Tired of GPT's defensive lecturing, robotic hedging, and refusal-flavored walls of text? Had enough of arguing with GPT just to get a straight answer?
Put an MCP bridge in between: let Gemini, Claude, or whichever main coding agent you already love handle the conversation under the hood. You keep all of GPT's heavy-duty reasoning and code-review horsepower — while your main agent manages the back-and-forth, filters the attitude, and translates every finding back to you in plain human language.
codex-bridge is a cross-platform, zero-dependency MCP stdio server and native plugin (for Claude Code / Claude Desktop, Antigravity, and DeepSeek Harness / DSH) that connects AI coding agents to your local OpenAI Codex CLI (codex) on Windows, macOS, and Linux.
Table of Contents
Related MCP server: codex-mcp
Key Features
Quota- and Reset-Aware Routing: Queries live 5-hour and 7-day rate-limit windows (
codex app-server) to detectuse_it_or_lose_it,abundant,moderate, orconservestates so your main agent chooses the right model and reasoning effort automatically.No MCP Client Timeouts: Offloads heavy audits or large diffs via
background: trueand batch-collects active jobs in one call (codex_job_status), with host-awarewait_secondsguidance (90–120sfor 180s+ hosts;20–45sfor 30–60s hosts).Resumable Sessions and Clean Recovery: Background jobs persist sessions by default (
ephemeral: false) so interrupted or paused runs can resume with full context and prompt caching, while returning capturedagentMessagesandactivityLogdirectly.Multimodal and Config Profiles: Pass local screenshots to
codex_execviaimages(-i) or reuse your~/.codexconfig profiles viaprofile(-p).Zero-Dependency Cross-OS Support: Uses only the Python 3.10+ standard library, detects native
codex.exeon Windows (x64/ARM64) with UTF-8 / locale decoding fallback, and cleans up full process trees across Windows, macOS, and Linux.
Available Tools
Tool | Purpose | Key Capabilities |
| Live quota & routing | Queries live 5h/7d windows, reset timestamps, surplus pacing ratio, and a 10-tier recommendation (masks |
| Model discovery | Lists available Codex GPT models (e.g. |
| Prompt execution | Non-interactive execution with |
| Git diff review | Read-only review of |
| Job & session tracking | Polls background jobs ( |
| Safe cancellation | Cancels queued or running jobs and terminates the full child process tree (Windows Job Object on Windows; process-group |
Prerequisites
OpenAI Codex CLI installed and signed in:
codex --version # Expected: codex-cli <version> codex login status # Expected: Logged in using ChatGPTPython 3.10+ available on
PATH:python --version # Expected: Python 3.10+
Installation and Setup
Jump to your client (ordered from dedicated native plugins to generic MCP configuration):
1. Claude Code and Claude Desktop — Native plugin, GitHub Marketplace, Release
.plugin, and CLI2. Antigravity — All-in-one plugin (MCP + Skill + Rule +
codex_workersubagent)3. DeepSeek Harness (DSH) — Native Cordis plugin bundle or
cordis.patch.yml4. Generic MCP Clients — Cursor, Windsurf, WorkBuddy, and manual JSON config
1. Claude Code and Claude Desktop
codex-bridge ships standard Anthropic plugin manifests (.claude-plugin/plugin.json, .claude-plugin/marketplace.json, .mcp.json) validated with claude plugin validate.
Claude Desktop
Recommended — Upload
.pluginfrom GitHub Releases:Download
codex-bridge.pluginfrom the latest Release Assets (excludes Antigravity-only files and works offline; or build locally viapython scripts/pack_claude_plugin.py).Open Settings… → Customize → Plugins → Upload local plugin and select
codex-bridge.plugin.
Or Sync Directly from GitHub Marketplace:
Open Customize → Plugins → + Add → Add marketplace.
Enter
longpi233/codex-bridgeand click Sync, then installcodex-bridge.
If the 6 tools do not appear (Claude Desktop's GUI does not inherit
pythononPATHor hits the Windows Store stub):Open Settings… → Developer → Edit Config (
%APPDATA%\Claude\claude_desktop_config.jsonon Windows,~/Library/Application Support/Claude/claude_desktop_config.jsonon macOS), paste the canonical JSON with your absolute Python path from §4 Generic MCP Clients, then completely quit and relaunch Claude Desktop from the system tray / menu bar.
Claude Code
Native Plugin (Recommended):
# Claude Code 2.1.275+ /plugin install codex-bridge --marketplace longpi233/codex-bridge # Or two-step (all versions with /plugin) /plugin marketplace add longpi233/codex-bridge /plugin install codex-bridge@codex-bridge /reload-pluginsOr load a local clone directly:
claude --plugin-dir /path/to/codex-bridge.Manual CLI Registration (use
add-json; on some builds like2.1.332,claude mcp add ... -- python -u ...fails withunknown option '-u'):git clone https://github.com/longpi233/codex-bridge.git /path/to/codex-bridge claude mcp add-json codex-bridge '{"command":"python","args":["-u","/path/to/codex-bridge/server/codex_mcp_server.py"]}' claude mcp get codex-bridge # Expected: Status: √ Connected(Pass
-s userbeforecodex-bridgefor global registration. To also add the skill/rule manually, see §4 Generic MCP Clients with~/.claude/skills/codex-delegateand~/.claude/CLAUDE.md.)
Note for Marketplace /
--plugin-dirusers:agents/codex_worker.mduses Antigravity-specific frontmatter, so in Claude Code / Claude Desktop simply invokecodex-bridgetools from the main agent withcodex-delegaterather than invokingcodex_worker.
2. Antigravity
Antigravity automatically loads the MCP server (codex-bridge_codex-bridge), codex-delegate Skill, rules/AGENTS.md Rule, and codex_worker subagent together.
Clone directly into Antigravity's plugins folder:
macOS / Linux:
git clone https://github.com/longpi233/codex-bridge.git ~/.gemini/config/plugins/codex-bridgeWindows (PowerShell) (use
$env:USERPROFILE— PowerShell 5.1 passes~literally togit.exe):git clone https://github.com/longpi233/codex-bridge.git "$env:USERPROFILE\.gemini\config\plugins\codex-bridge"Windows (
cmd):git clone https://github.com/longpi233/codex-bridge.git "%USERPROFILE%\.gemini\config\plugins\codex-bridge"
Or keep your clone elsewhere: Clone anywhere and register its parent folder in
~/.gemini/config/plugins.json:{ "entries": [{ "path": "/path/to/parent-folder", "include_only": ["codex-bridge"] }] }
3. DeepSeek Harness
DSH uses a Cordis plugin bundle (package.json + cordis.patch.yml) rather than a JSON mcp.json.
Option A — Native DSH Plugin Bundle (Recommended):
Clone to a permanent directory (
git clone https://github.com/longpi233/codex-bridge.git /path/to/codex-bridge).Install via DSH's Plugin Manager (
install_bundlepointing at/path/to/codex-bridge). The bundle automatically locates Python (orCODEX_BRIDGE_PYTHON) andcodex_mcp_server.py, setstoolCallTimeoutMs: 1800000, and disables itself if anothercodex-bridgerow is already active.Install the skill to
~/.dsh/skills/codex-delegate(.agents/skills/does not apply to DSH).
Option B — Manual Profile Patch (also bypasses
ERR_PNPM_UNEXPECTED_STOREon older pnpm v10 profiles): Append to~/.dsh/profiles/<profile>/cordis.patch.yml(check first withgrep serverName cordis.patch.ymlor PowerShellSelect-String -Path cordis.patch.yml -Pattern serverNameto avoid duplicateserverName: codex-bridge), then save to hot-reload without restarting DSH:- insert: - id: codex-bridge-mcp name: '@deepseek-ai/dsh-mcp-client' config: serverName: codex-bridge transport: stdio command: 'C:\Python311\python.exe' # absolute path required args: ['-u', 'D:\tools\codex-bridge\server\codex_mcp_server.py'] cwd: 'D:\tools\codex-bridge' toolCallTimeoutMs: 1800000 # required: DSH defaults to 60000ms failOnStartupError: trueDSH's default
60000ms timeout cuts longcodex_job_statuspolls at 60s, though the background Codex job keeps running and can be collected on the next poll. SettoolCallTimeoutMs: 1800000or keepwait_secondsbetween20and45.
4. Generic MCP Clients
Use this standard configuration for Cursor, Windsurf, WorkBuddy, or manual Claude Desktop setups.
Do not copy
mcp_config.json(${PLUGIN_ROOT}) or.mcp.json(${CLAUDE_PLUGIN_ROOT}) into these clients — GUI apps cannot expand plugin root variables and often do not inherit your shellPATH.
Clone the repository:
git clone https://github.com/longpi233/codex-bridge.git /path/to/codex-bridgeAdd
codex_bridgeto your client's MCP config (~/.cursor/mcp.json,.cursor/mcp.json,%USERPROFILE%\.workbuddy\mcp.json/.workbuddy/mcp.json, Windsurfmcp_config.json, or Claude Desktop'sclaude_desktop_config.json):{ "mcpServers": { "codex_bridge": { "command": "/path/to/python", "args": ["-u", "/path/to/codex-bridge/server/codex_mcp_server.py"] } } }Replace
"/path/to/python"with your real interpreter (e.g.C:/Python311/python.exeon Windows or/usr/local/bin/python3on macOS/Linux; bare"python"only works if the GUI inheritsPATH).WorkBuddy activation: After saving
mcp.json, completely quit and restart WorkBuddy, open Connectors → Custom Connectors, click Trust oncodex_bridge, and confirm the green indicator.Short / unknown call timeouts (e.g. WorkBuddy): Even a small sync
codex_reviewcan take ~45s+, so always passbackground: trueforcodex_reviewandmedium+ tasks, and keepcodex_job_statuswait_secondsat20–45.
Install the
codex-delegateSkill & Rule (recommended):Skill: Copy or link
skills/codex-delegate/to~/.agents/skills/codex-delegate,.cursor/skills/codex-delegate,~/.workbuddy/skills/codex-delegate,.codebuddy/skills/codex-delegate, or~/.dsh/skills/codex-delegate.Rule: Copy
rules/AGENTS.mdinto your project'sAGENTS.mdor client rules folder.
Client | Default Server Key | Exposed Tool Name |
Antigravity |
|
|
Claude Code / Desktop / DSH |
|
|
WorkBuddy / Cursor |
|
|
Quick Start
Once connected, try asking your main agent:
"Check my Codex quota and reset time, and tell me which GPT model and reasoning effort we should use."
"Ask Codex (
gpt-6.2-astra) in read-only background mode to review our uncommitted changes for race conditions.""Send this screenshot to Codex via
codex_exec(images) and check layout alignment againstsrc/App.tsx."
Environment Variables
Variable | Description |
| Explicit path to |
| Custom Codex auth/state directory (defaults to |
| Fallback model id when |
| Optional JSONL diagnostic log file path (off by default; never writes to |
| Set to |
| Optional explicit Python path for the native DSH bundle ( |
Troubleshooting
Verify the MCP server directly over stdio before debugging client configs:
Windows (PowerShell):
$p = @' {"jsonrpc":"2.0","id":1,"method":"initialize","params":{}} {"jsonrpc":"2.0","method":"notifications/initialized"} {"jsonrpc":"2.0","id":2,"method":"tools/list"} '@ $p | python -u server/codex_mcp_server.pymacOS / Linux / bash:
printf '%s\n' '{"jsonrpc":"2.0","id":1,"method":"initialize","params":{}}' \ '{"jsonrpc":"2.0","method":"notifications/initialized"}' \ '{"jsonrpc":"2.0","id":2,"method":"tools/list"}' \ | python -u server/codex_mcp_server.py
Symptom | Diagnosis & Fix |
Stdio returns 2 JSON lines ( | Server is healthy; activation/config issue. WorkBuddy: quit, restart, and Trust in Custom Connectors. Claude Desktop: quit from tray/menu bar and relaunch (or switch to §4 with an absolute Python path). |
Red status light / startup error | Verify JSON/YAML syntax, absolute |
Hangs without output | Ensure |
Running Tests
# Offline unit, concurrency, cancellation, and envelope tests (zero quota cost)
python tests/test_codex_bridge.py
# Live Codex CLI / app-server smoke tests (~23k–110k input tokens on gpt-6-luna low)
python tests/test_codex_bridge.py --liveProject Structure
codex-bridge/
├── assets/logo.png # Project & multi-client plugin icon
├── .claude-plugin/ # Claude Code / Desktop plugin & marketplace manifests
├── .mcp.json # Claude plugin MCP config (${CLAUDE_PLUGIN_ROOT})
├── plugin.json # Antigravity plugin manifest
├── mcp_config.json # Antigravity MCP config (${PLUGIN_ROOT})
├── package.json # Native DSH bundle manifest
├── cordis.patch.yml # Native DSH Cordis patch definition
├── locale/ # DSH localized metadata (en.json, zh.json)
├── server/codex_mcp_server.py # Cross-platform MCP stdio server (zero dependencies)
├── skills/codex-delegate/ # Cross-agent delegation workflow & playbook
├── agents/codex_worker.md # Antigravity subagent definition
├── rules/AGENTS.md # Concise always-on delegation rule
├── scripts/pack_claude_plugin.py # Builds dist/codex-bridge.plugin for Claude Desktop
└── tests/test_codex_bridge.py # Offline + optional --live test suiteLicense
Licensed under the MIT License.
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
A paid remote MCP for OpenAI Codex agent coordination MCP, built to return verdicts, receipts, usage
Shared memory MCP server for Claude Code, Codex, Gemini CLI and Cursor. Cited, editable.
Real-time chat for AI agents. Claude Code, Cursor, Cline and Codex join channels over MCP.
Real-time chat hub for AI agents — Claude Code, Cursor, Cline, Codex over MCP or REST.
Related MCP Servers
- AlicenseAqualityCmaintenanceBridges OpenAI Codex CLI to any MCP client, allowing headless Codex sessions via tools like codex and codex-reply.242 npm1MIT
- AlicenseAqualityCmaintenanceEnables MCP-compatible coding agents to execute the local Codex CLI as a coding agent, including code reviews, session resume/fork, and CLI diagnostics.9MIT
- AlicenseNot gradedqualityAmaintenanceConnects MCP clients to OpenCode's headless API so users can delegate coding tasks, ask questions, monitor background work, respond to prompts and permissions, and review changes across projects.22,709 npmMIT
- AlicenseAqualityBmaintenanceEnables Claude Code or any MCP client to delegate hands-on coding work to OpenAI Codex over a persistent app-server process, keeping long-lived threads with follow-ups, async polling, approvals, steering, and interrupts. Supports native code review, resuming existing sessions, structured output, and parallel worktree-isolated tasks.1024 npm1MIT