Codex MCP Bridge
Provides a tool to run Codex's built-in non-interactive Git code review on uncommitted changes, a base branch, or a specific commit SHA.
Orchestrates the local OpenAI Codex CLI: runs and resumes Codex sessions, performs non-interactive Git reviews, launches and tracks background jobs, and applies model, reasoning, sandbox, and workflow settings.
Click on "Deploy 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., "@Codex MCP Bridge Set up a goal to refactor the payments API, then start Codex on it"
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.
Codex Bridge
An Antigravity plugin with an interactive control panel, persistent goal & milestone board, auto-callback progression loop, and zero-dependency MCP bridge to orchestrate your local OpenAI Codex CLI.
English · 简体中文
Why Codex Bridge?
Codex Bridge turns your local OpenAI Codex CLI into a persistent, goal-driven coding & analysis worker inside Google Antigravity — built specifically for iterative workflows like backend debugging/refactoring and meta-analysis / data pipelines that require continuous investigation, execution, and verification.
Let Antigravity analyze requirements, design verifiable milestones, inspect diffs, and verify outcomes.
Let Codex execute edits, run backend tests/scripts, resume multi-turn sessions, and wake Antigravity automatically when background runs finish.
Related MCP server: codex
Features
Native Interactive Sidecar Panel — Appears right inside Antigravity's Plugins side-pane menu with two clean tabs (Control & Goals & Jobs):
Model selection (auto-populated from your local
~/.codex/models_cache.json)Reasoning effort (dynamically adapts to each model's supported levels:
low,medium,high,xhigh,max,ultra)Progression mode (switchable live):
manual— No automatic callbacks; wait for your next prompt.notify— Automatically wakes Antigravity when a background Codex job finishes so it can verify and report findings.autonomous— Automatically verifies completed milestones, callscodex_resumeon failure, or advances to the next pending milestone until done (guarded by a configurablemaxAutoIterationscap and one-click Pause button).
Sandbox policy (
read-only,workspace-write,danger-full-access) & Briefing workflow (directvs.plan_first)
Persistent Goal & Milestone State Machine — Goals, ordered milestones, verification commands, blockers, and linked
Session IDs persist on disk (goals.json), surviving conversation compaction and restarts.Restart-Resilient Background Jobs — Background jobs (
codex_start) are persisted tojobs.jsonwith live event counts and capturedSession IDs; interrupted jobs after a restart can be resumed cleanly with one click viacodex_resume.Automatic Codex Discovery — Automatically locates the newest
codex.exebundled with Codex Desktop on Windows (survives hash-folder auto-updates), falls back tocodexonPATH, or respectsCODEX_BIN.Zero External Dependencies — Pure Node.js ESM (
>= 18). Nonpm install, no build step, instant startup, UTF-8stdinprompting.
Architecture
flowchart LR
User["User in Antigravity"] <--> Agent["Antigravity Agent"]
User <--> Panel["Sidecar Control Panel & Goal Watcher<br/>(sidecars/codex_panel)"]
Panel -->|Auto-Callback on Job Done| Agent
Panel <--> Store["Persistent State<br/>(settings.json / goals.json / jobs.json)"]
Agent <-->|MCP Stdio JSON-RPC| Server["Codex MCP Bridge<br/>(server/mcp-server.js)"]
Store <--> Server
Server <-->|JSONL Stream + UTF-8 stdin| Codex["Local OpenAI Codex CLI<br/>(codex exec / resume / review)"]Quick Start
Prerequisites
Google Antigravity (Desktop or CLI)
Node.js
>= 18OpenAI Codex (Codex Desktop app or
codexCLI installed and signed in)
Install
macOS / Linux:
git clone https://github.com/yeyuhants-prog/codex-bridge.git ~/.gemini/config/plugins/codex-bridgeWindows (PowerShell):
git clone https://github.com/yeyuhants-prog/codex-bridge.git "$env:USERPROFILE\.gemini\config\plugins\codex-bridge"Enable & Open the Panel
Open Skills & Customizations (自定义扩展) in Antigravity's left sidebar and ensure Codex Bridge is toggled ON.
Open the interactive control panel from the right-hand Plugins (
插件) menu → Codex Bridge.Pick your Codex model, reasoning effort, progression mode (
manual/notify/autonomous), and sandbox — opening the panel in a conversation automatically binds it for completion callbacks.
MCP Tools (9)
Tool | Description |
| Create, inspect, update milestones, pause/resume, or delete persistent multi-step Goals shared with the Sidecar goal board. |
| Run a task synchronously via |
| Continue a previous Codex session by |
| Run Codex's built-in non-interactive Git code review ( |
| Launch a persistent background Codex worker and return |
| Inspect progress events, |
| Terminate a running background Codex job along with its child process tree. |
| Read or update shared preferences ( |
| Health check showing resolved Codex binary & version, active panel settings, bound conversation, active goal progress, and tracked jobs. |
Example Prompts
Continuous backend debugging:
"Create a persistent Codex Bridge goal to reproduce the 500 error in
backend/auth, fix the root cause, and passpytest. Start milestone 1 in the background and keep verifying until all tests pass."Iterative meta-analysis pipeline:
"Set up a goal with milestones for cleaning the dataset, checking heterogeneity (I² / Q-test), running sensitivity analysis, and exporting forest plots. Dispatch Codex step-by-step and verify each output table."
Code review:
"Have Codex review my uncommitted Git changes in this repository and summarize bugs or edge cases."
Per-call model override:
"Use
gpt-6.2-astrawithxhighreasoning effort and have Codex refactor the parser module."
Environment Variables
Variable | Default | Purpose |
| Auto-discovered | Explicit path to the |
|
| Directory containing Codex's |
|
| Directory storing |
Testing
# Zero-token MCP protocol, settings & persistent goal board smoke test
npm test
# End-to-end live check against your local Codex CLI (read-only, ephemeral)
npm run test:liveProject Structure
codex-bridge/
├── plugin.json # Antigravity plugin manifest
├── mcp_config.json # Portable MCP server definition
├── assets/
│ └── logo.png # Plugin icon (512×512 transparent PNG)
├── server/
│ ├── mcp-server.js # Zero-dependency MCP Stdio JSON-RPC server
│ ├── codex-runner.js # Codex CLI auto-discovery, spawn & JSONL parser
│ ├── goal-store.js # Persistent Goal & Milestone state machine
│ ├── job-manager.js # Persistent async worker & process-tree manager
│ └── settings-store.js # Shared preferences, history & model catalog reader
├── sidecars/
│ └── codex_panel/ # Native Antigravity side-pane UI & callback watcher
│ ├── sidecar.json
│ ├── main.mjs
│ ├── index.html
│ ├── app.js
│ └── styles.css
├── skills/
│ └── codex-worker/SKILL.md # Orchestration skill for Antigravity
├── rules/
│ └── AGENTS.md # Active rules while plugin is enabled
└── test/
└── smoke-test.mjs # End-to-end MCP smoke testLicense
Released under the MIT License.
Available Tools
9 toolscodex_cancelB
Cancel a running background Codex job by job_id.
Inputs: job_id (required).
codex_configB
Read or update persistent Codex Bridge preferences (model, reasoning_effort, sandbox, workflow_mode, progression_mode, max_auto_iterations) shared with the Codex Bridge UI panel, and list available local Codex models.
Inputs: model, sandbox, list_models, workflow_mode, +3 more.
codex_goalB
Manage persistent multi-step Goals & Milestones shared with the Codex Bridge Sidecar panel (survives restarts and conversation compaction). Use this for ongoing backend debugging, refactors, or meta-analysis pipelines that require iterative verification.
Inputs: cwd, notes, title, action, +9 more.
codex_infoB
Check Codex Bridge health: shows resolved codex.exe path & version, active UI panel preferences (model, reasoning effort, sandbox, workflow mode, progression mode), active goal progress, and tracked background jobs.
Inputs: no named parameters.
codex_resumeA
Continue a previous Codex session synchronously by session_id (or 'last' for the most recent session) with follow-up instructions, preserving Codex's full conversation context.
Inputs: prompt (required), session_id (required), cwd, model, +7 more.
codex_reviewC
Run Codex's built-in non-interactive code review (codex exec review) on a Git repository.
Inputs: cwd (required), base, model, title, +6 more.
codex_runA
Run a task synchronously with local OpenAI Codex CLI (codex exec) using the model, reasoning effort, and sandbox configured in the Codex Bridge UI panel (unless explicitly overridden). Returns final response, session_id, modified files, executed commands, and token usage.
Inputs: prompt (required), cwd, model, config, +12 more.
codex_startA
Launch a Codex task asynchronously in the background and immediately return a job_id. Persisted to disk; when progression mode is 'notify' or 'autonomous', the Sidecar automatically sends a callback message back to Antigravity upon completion so verification and milestone progression continue seamlessly.
Inputs: prompt (required), cwd, model, config, +14 more.
codex_statusA
Check status, live progress events, session_id, or final output of a background Codex job started with codex_start (also inspects jobs persisted across restarts). Optionally waits up to wait_seconds.
Inputs: job_id, wait_seconds.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 9 tools
The async/sync split is clearly labeled (codex_start vs codex_run), and job-scoped status is separated from health-check info (codex_status vs codex_info). The main seam is codex_info vs codex_config, which both surface current preferences (model, sandbox, workflow mode) and could be confused about which is the right tool to inspect settings.
All tools share a clean codex_ prefix, so the namespace is predictable and easy to scan. The action segments are slightly mixed in style—verbs (start, cancel, run, resume, review) versus nouns (info, status, goal, config)—but each remains readable and there's no case-style mixing.
Nine tools is well within the ideal range for a Codex bridge and each one maps to a distinct operation: async lifecycle, sync execution, session continuation, review, goal tracking, config, and info. Nothing looks redundant or missing from the set.
The surface covers the full async lifecycle (start, status, cancel), synchronous run/resume, code review, persistent goals, configuration, and health inspection—no obvious dead ends for the core workflow. Minor gaps exist around enumerating all tracked jobs/sessions or fetching raw logs, which currently must be inferred via codex_status/codex_info.
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.
GitHub Copilot MCP: code, repo, PR, workflow tools for AI assistants.
Goal and task planning MCP for Codex and AI agents, with evidence-backed completion.
Related MCP Servers
- AlicenseCqualityDmaintenanceBridges MCP clients with local Codex CLI to execute autonomous coding tasks, manage threads, and inspect history via SQLite state.134Apache 2.0
- AlicenseNot gradedqualityCmaintenanceEnables Grok Build to orchestrate the local Codex CLI for code reviews, adversarial reviews, task rescue, session transfer, and background job management through MCP tools.1Apache 2.0

forge-orchestratorofficial
FlicenseNot gradedqualityAmaintenanceEnables orchestrating multiple AI coding tools (Claude Code, Codex CLI, Gemini CLI) on shared repositories with file locking, knowledge capture, task planning, and drift detection via an MCP server.168-- 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