Codex Orbit MCP Server
Provides tools to delegate coding, testing, debugging, and review tasks to a local OpenAI Codex CLI session, including session resume, live progress monitoring, quota-aware model routing, process control, and Codex Desktop continuity.
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.

52-week AGY vs. Direct Codex heatmap, model distribution, low-quota guardrail & 7-point diagnostics, live session monitoring, and Light/Dark multi-language UI — at zero host model token cost.
Why Codex Orbit?
Codex Orbit lets Gemini in Antigravity hand coding, testing, debugging, and review tasks to your local OpenAI Codex CLI. You watch live progress in the Orbit panel without polling the chat, receive a compact result back in Gemini, and resume the same Codex session whenever you need another round.
flowchart LR
subgraph Control["Task Delegation (Gemini ↔ CLI Wrapper)"]
G["Gemini (Antigravity)"] -->|"Task brief + mode"| W["delegate_cli.py"]
W -->|"exec / exec resume + sandbox"| C["Local Codex CLI"]
C -->|"JSONL events + final message"| W
W -->|"Compact JSON summary"| G
end
subgraph Monitor["MCP App Monitoring (App-Only Tools)"]
R["rollout-*.jsonl (byte cursor) + state_5.sqlite"] --> M["Codex Orbit MCP Server"]
Q["codex app-server (5h/7d quota) + models_cache.json"] --> M
W -->|"Writes run metadata & Desktop sync"| R
M <-->|"App-only polling & control (hidden from Gemini)"| UI["Orbit Panel (EN / 简中 / 繁中 / 日本語)"]
UI -.->|"Optional user-triggered summary"| G
endHow It Compares to Other Tools
Different tools solve different layers of the workflow. API gateways route model requests; CLI/MCP bridges let one assistant call another; Codex Orbit focuses on Antigravity-native live monitoring, quota-gated delegation, and unified local Codex history:
Dimension | Model API Gateways(OpenRouter / LiteLLM / CCR / CLIProxyAPI) | Agent Delegation Bridges(PAL MCP / | Codex Orbit ( |
Unit of Work | Routes HTTP model requests (provider selection, format translation, fallbacks; clients still keep their own tool loops) | Delegates agent tasks from a host tool/CLI (many support session IDs, sub-CLIs, or background runs) | Antigravity-to-Codex task cockpit: wraps |
Live Progress & Context | Dashboard/logs live in the proxy; model context depends on the client | Typically returns structured tool outputs or background status polls in the host session | Out-of-band Orbit panel: panel polling & controls use |
Auth & Quota | Supports API keys, credits, and OAuth/subscription upstream setups | Often reuses local CLI logins or configured API keys | Reuses local Codex sign-in and surfaces available 5h/7d rate-limit windows directly in the Orbit topbar |
Quota-Aware Routing | Focuses on rate-limit retries, key rotation, and fallback models | Usually picks models explicitly or by role | Eco / Balanced / Max: |
History & Desktop Sync | Per-gateway request logs/analytics | Session resume per bridge or host plugin | Unified 52-week Profile (AGY delegated + Direct Codex from local logs/SQLite) plus |
Workspace & Control | Managed by whichever client calls the gateway | Many offer read-only review, background cancel, or worktree wrappers | Shared cwd, read-only, or Git worktree per session, process-tree stop button, and safe idle-worktree pruning |
Related MCP server: codex-antigravity-mcp
Core Features
1. Out-of-Band Live Monitor & 52-Week Profile
Dual Mounting: Lives in both Antigravity's left sidebar (
global) and right auxiliary pane (aux_pane), auto-focusing newly dispatched tasks when Gemini invokesopen_codex_orbit(focus_running=True). Panel polling and controls usevisibility: ["app"]so watching progress costs zero host model tokens.Profile Overview & Heatmap: Tracks total tokens, AGY vs. Direct Codex share, longest run, active streaks, a 52-week calendar heatmap (filterable by
All / AGY Delegated / Direct CodexandTokens / Sessions, with click-to-filter day drill-down), Model Distribution, and frequently modified files.Clean Reading Canvas: Collapsible turn prompts, reasoning summaries, GFM Markdown rendering, muted single-row collapsed command logs, and clickable changed-file chips that open directly in Antigravity.
Multilingual UI:
Auto(follows host locale),简体中文,繁體中文,EN, and日本語.
2. Quota-Aware 3-Mode Routing & Low-Quota Guardrail
Switch policies anytime from the topbar dropdown or via chat. Both default (gpt-6.2-sol) and escalation (gpt-6.2-astra) models are configurable from your local ~/.codex/models_cache.json catalog inside ⚙ Settings.
Task Tier |
|
|
|
Light | Default model ( | Default model ( | Default model ( |
Standard | Default model ( | Default model ( | Escalation model ( |
Complex | Default model ( | Asks user + live 5h/7d quota readout | Escalation model ( |
* Low-Quota Guardrail (enabled by default at < 15% 5h remaining, configurable 5%–50%): in Max, automatically falls back to your default model while preserving the target reasoning effort; in Balanced, attaches an advisory warning before escalating; topbar quota badge highlights in amber/red.
3. Workspace Modes, Web Research & Live Control
Same-Workspace Handoff (
workspace-write, default): When Gemini and Codex edit sequentially by workflow convention, Codex writes directly in your active Antigravity workspace — no merge step needed.Read-Only Review (
read-only): Independent audits and PR/diff reviews without modifying files in the workspace.Parallel Isolation (
worktree): Spawns an isolated Git worktree per session under${PLUGIN_DATA}/worktrees, reuses it across multi-turn follow-ups, and cleans idle worktrees safely via ⚙ Settings → Prune idle worktrees or--prune-worktrees.Live Web Research (
--web-search): Uses Codex's native--searchtool in Git or non-Git folders and writes cited Markdown reports back to your workspace.Live Process Control & Selective Handoff: Stop any Orbit-managed running task cleanly (terminates the full child process tree) and attach or send only concise round/session summaries back to Gemini.
4. Codex Desktop Continuity
Delegated runs attempt to title threads with an agy: prefix via codex app-server (thread/name/set), bind them to the matching workspace project/section, and promote closed exec rollout visibility so compatible Codex Desktop setups can display and continue them (if Codex Desktop is already open, a restart may be needed to show newly created projects).
Quick Start
Prerequisites
Google Antigravity 2.0
OpenAI Codex CLI (or Codex Desktop / VS Code Codex extension) installed and signed in
Python 3.11+ (No Node.js or
pnpmrequired — the single-file UI bundle is pre-built indist/index.html)
Install
Windows (PowerShell):
git clone https://github.com/LIU423/agy-codex-orbit.git
cd agy-codex-orbit
.\scripts\install.ps1If
pythonis not on yourPATH, pass-PythonBin C:\Path\To\python.exe.
macOS / Linux (sh / bash / zsh):
git clone https://github.com/LIU423/agy-codex-orbit.git
cd agy-codex-orbit
./scripts/install.shIf
python3is not the target interpreter, runPYTHON_BIN=/path/to/python3 ./scripts/install.sh.
Both installers copy the plugin bundle to ~/.gemini/config/plugins/agy-codex-orbit/, create an isolated .venv inside the plugin directory, generate mcp_config.json, and run --doctor diagnostics automatically. Reload plugins or restart Antigravity if the Codex Orbit entry does not appear immediately.
Verify Health
In UI: Click ⚙ in the Codex Orbit topbar → Run check.
In Terminal:
# Windows ~/.gemini/config/plugins/agy-codex-orbit/.venv/Scripts/python.exe -u ~/.gemini/config/plugins/agy-codex-orbit/server/delegate_cli.py --doctor# macOS / Linux ~/.gemini/config/plugins/agy-codex-orbit/.venv/bin/python -u ~/.gemini/config/plugins/agy-codex-orbit/server/delegate_cli.py --doctor
Usage Examples
Just ask Gemini naturally inside Antigravity:
Open Monitor: "Open Codex Orbit to check my recent Codex sessions and remaining quota."
Backend + Frontend Collaboration: "Let Codex implement the
/api/webhookssignature validator and pytest suite in this workspace, then wire up the settings form in the frontend."Independent Read-Only Review: "Have Codex review my uncommitted changes in read-only mode for race conditions and missing error handling."
Parallel Feature Work: "Delegate the parser refactor to Codex in an isolated git worktree while we keep working on the UI here."
Live Web Research: "Use Codex with web search to research the latest MCP Apps spec updates and write a cited summary to
research/mcp-apps.md."Switch Routing Policy: "Switch Codex Orbit to Eco mode" / "Balanced mode" / "Max mode".
Configuration & Troubleshooting
Settings & CLI Flags
All user preferences persist in ${PLUGIN_DATA}/settings.json and can be changed in the ⚙ Settings popover or via delegate_cli.py:
Setting / CLI Flag | Default | Description |
|
|
|
|
| Default model slug (pass |
|
| Escalation model slug for complex/Max tasks (pass |
|
|
|
|
| 5h remaining quota threshold percentage ( |
| — | Print persisted settings, run 7-point diagnostics, or clean idle worktrees |
Environment Variables
CODEX_ORBIT_CODEX_BIN: Explicit path tocodex/codex.exeif installed in a non-standard location.CODEX_HOME: Override Codex home directory (defaults to~/.codex).CODEX_ORBIT_DATA_DIR: Override plugin data directory.
Common Issues
codex_clicheck fails: Sign in to Codex CLI (codex) or setCODEX_ORBIT_CODEX_BINto your executable path.Quota shows rollout fallback: Live quota uses
codex app-server; when offline or unauthenticated, Codex Orbit falls back to the latest local rollout'srate_limits.Running in dev checkout: Use
.\scripts\dev-link.ps1(Windows) or./scripts/dev-link.sh(macOS/Linux); see Development Guide.
Development & Testing
For UI rebuilding (ui/), live dev-linking (dev-link.ps1 / dev-link.sh), MCP hot-refresh (refresh-mcp.ps1), and running the 72-test synthetic suite (pytest -v), see docs/DEVELOPMENT.md.
License
Distributed 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
Your AI apps as one team: hand work to Codex or Claude Code on your Mac, with a shared logbook.
Shared memory and context across ChatGPT, Claude, Claude Code, Codex, Cursor and 20+ AI tools
Use your Mac, Windows or Linux computer from ChatGPT, Claude or Codex: files, commands, documents.
No-data MCP handoff for local Claude Code to Codex harness moves. $49 lifetime.
Related MCP Servers
- AlicenseAqualityCmaintenanceEnables OpenAI Codex to delegate tasks to Google Antigravity CLI, running them headlessly and polling for results.41MIT
- AlicenseNot gradedqualityBmaintenanceEnables Codex users to delegate engineering, refactoring, auditing, and test execution tasks to Google Antigravity CLI as a persistent autonomous subagent, with tools for managing sessions and running prompts.1MIT
- AlicenseAqualityBmaintenanceEnables Codex to delegate routine tasks to Gemini through Google subscription access via Antigravity CLI and have TypeSafe Jev validate results against specified criteria, with batch evaluations and local status checks.32MIT
- AlicenseNot gradedqualityBmaintenanceEnables Antigravity to delegate concrete local coding tasks to Codex CLI with durable sessions, background execution, native chat links, and event-driven receipts.MIT