poliucode/antigravity-codex-mcp
Local Python MCP bridge for delegating and monitoring Codex jobs in Antigravity
Automated SPDX check for reference only — not legal advice. Disclaimer
GitHub Star History
Tracked from daily D1 telemetry snapshots. Hover any data point for exact daily star counts.
Evidence-Backed Technical Brief
AI Deep ReviewArchitecture & Core Mechanics
run_server.py is the Python 3.11+ MCP stdio entry point; pyproject.toml declares no third-party runtime dependencies. The codex_mcp/ package separates the Codex client, executable discovery, Git auditing and telemetry. Antigravity's Executor calls the MCP tools, and the bridge launches the local codex app-server --stdio subprocess and exchanges JSON-RPC messages with it. The Planner/Executor split remains in Antigravity, guided by the optional Rule and Skill templates.
The MCP surface separates model-facing tools from app-only polling and exposes the monitor as ui://dashboard.html. This split keeps dashboard refresh traffic out of the model conversation while giving the host UI access to task progress, telemetry, health and quota. The local Codex process owns authentication and upstream network communication; the Python process is a protocol bridge, not a model runtime or an HTTP proxy.
Key Capabilities & Differentiators
The tools cover read-only questions and review, serial coding tasks in a specified working directory, model discovery, and thread inspection, closure and reset. Coding results include changed_files and diff_stat. Model discovery returns the models, reasoning levels and defaults available through the installed Codex client rather than a fixed model catalog or a separate provider backend.
Long work can start asynchronously or continue after the synchronous wait expires. codex_ask and codex_run_task default to a 120-second wait, capped at 150 seconds, and return status="running" plus a job_id before the documented 180-second MCP timeout. Status calls support long polling, and running jobs can be cancelled. The dashboard reads five-hour and weekly quota windows through account/rateLimits/read with a 60-second cache, alongside seven-day telemetry. The execution sidebar shows progress, steps and changed-file chips without bringing the full dashboard into the task view.
Trade-offs & Limitations
Compared with running Codex directly in a terminal, this bridge adds structured job control, change summaries and host-side visibility, but also adds a subprocess and makes compatibility depend on both the installed Codex app-server protocol and the host's MCP App support. App rendering, sidebar placement and tool-only polling should be validated in the intended host rather than assumed from MCP tool support alone. A multi-provider integration is a better fit when backend switching matters more than Codex-specific thread and quota controls.
The bridge runs locally, but inference still uses OpenAI through Codex. A local JSONL history and direct protocol access do not imply offline operation or exemption from service terms and quotas. For write-capable tasks, review the sample approval settings, constrain the working directory, and verify the effective Codex permissions before enabling automatic delegation. Protect the telemetry file as local operational data; its location is configurable independently of Codex authentication.
Hardware & Deployment Guide
Install Python 3.11+ and an official Codex client with working login, then register the absolute path to run_server.py under mcpServers in ~/.gemini/config/mcp_config.json. Run python run_server.py --doctor to check the environment; set CODEX_BIN if discovery does not find the intended executable. Copy the optional Orchestrator Rule and Skill into the corresponding directories under ~/.gemini/config/, then refresh or restart the host's MCP servers.
Standard launch from the checkout does not require pip install. UI changes under ui/src/ use cd ui && npm install && npm run build; the Python tests use python -m unittest discover -s tests -v. CODEX_ALLOW_API_KEY=1 enables the official API-key billing path. Operationally, v2.0.0 added live protocol-health verification, v2.1.0 separated the execution sidebar from the global dashboard, and v2.2.0 expanded the visual status indicator to seven execution phases.
run_server.py bridges MCP over stdio to the local Codex app-server over JSON-RPC with no third-party Python runtime dependencies.job_id for polling or cancellation.codex_run_task accepts a working directory and returns structured changed_files and diff_stat fields.account/rateLimits/read supplies five-hour and weekly quota windows through an app-only tool with a 60-second in-memory cache.--doctor checks the environment, CODEX_BIN selects the executable explicitly, and CODEX_TELEMETRY_FILE overrides the local JSONL path.Antigravity Orchestrator users who already run official Codex and want structured delegation, reviewable change summaries and in-host monitoring for long coding jobs.
You need offline inference, interchangeable model providers, or only a manually supervised terminal session.
Quick Start & Installation
flowchart LR
subgraph AGY["Google Antigravity (Orchestrator)"]
P["Planner (强推理规划)<br/>读取 codex-orchestrator Rule"]
E["Executor (轻量执行/验收)<br/>遵循 codex-orchestration Skill"]
UI["右侧辅助面板<br/>Codex Monitor (3D 粒子球 · 中英切换)"]
end
subgraph MCP["antigravity-codex-mcp (零依赖 Python)"]
SRV["run_server.py<br/>MCP Tools + ui://dashboard.html"]
PKG["codex_mcp/ 模块包<br/>client · discovery · git_audit · telemetry"]
end
CODEX["本机 OpenAI 官方 Codex<br/>codex app-server --stdio<br/>(官方进程直连,零代理)"]
P -->|"拆解并委派复杂编码 / 评审"| E
E <-->|"MCP stdio (精简 JSON 省 Token)"| SRV
SRV <--> UI
SRV <--> PKG
PKG <-->|"官方本地 JSON-RPC"| CODEXComparison vs. Top Coding, Skills & MCP Alternatives
Full comparison →| Repository | Stars | 7d Trend | Stack | License | Core Positioning |
|---|---|---|---|---|---|
| antigravity-codex-mcp ★ | 63 | +63 | TypeScript | MIT | Local Python MCP bridge for delegating and monitoring Codex jobs in Antigravity |
| chrome-devtools-mcp | 60.4k | +760 | TypeScript | Apache-2.0 | Chrome DevTools via MCP and CLI for live browser debugging and performance analy |
| context7 | 65.8k | +333 | TypeScript | MIT | A hosted documentation index with MCP and CLI access for coding agents |
| rea | 488.8k | +7.6k | TypeScript | MIT | A local CLI and MCP server for evidence-backed app and binary analysis |
AI Context Briefing (for Claude / Cursor / Windsurf)
Standardized architecture summary & quickstart commands ready to paste into coding agents.
curl -sL https://repoforai.com/repo/poliucode/antigravity-codex-mcp.md
Active README embeds unlock Hot-Tier 6h Telemetry Refresh automatically (zero pay-to-rank).
Frequently Asked Questions about antigravity-codex-mcp
What runs between Antigravity and Codex, and where is authentication handled?
run_server.py as an MCP stdio server. The Python bridge starts the installed codex app-server --stdio process and exchanges JSON-RPC messages with it. Codex manages authentication and communication with OpenAI. The optional Rule and Skill guide Orchestrator delegation; the bridge does not independently schedule the Planner and Executor.Does the bridge need a GPU, and what should I measure to size it?
Can we use it commercially and keep all processing on our own machines?
When is the bridge preferable to running Codex directly?
Upstream README & Documentation
This profile focuses on independent engineering analysis and live telemetry. Read the full upstream README, changelog, and examples directly on GitHub.
Top 10 Breakout Open-Source AI Repos, Every Thursday
Signal-only digest of fast-growing AI repos, SPDX license alerts, and architecture picks. Zero spam.
Zero spam · 1-click unsubscribe · Privacy Policy