antigravity-codex-mcp

mcp
Security Audit
Warn
Health Warn
  • License — License: MIT
  • Description — Repository has a description
  • Active repo — Last push 0 days ago
  • Low visibility — Only 6 GitHub stars
Code Pass
  • Code scan — Scanned 12 files during light audit, no dangerous patterns found
Permissions Pass
  • Permissions — No dangerous permissions requested

No AI report is available for this listing yet.

SUMMARY

Local OpenAI Codex MCP server & live MCP App monitor for Google Antigravity Orchestrator

README.md

Antigravity Codex MCP (antigravity-codex-mcp)

Seamlessly delegate coding, refactoring, testing, and code review from Google Antigravity (Orchestrator) to your local official OpenAI Codex — with a Frosted Graphite MCP App Monitor (ZH/EN bilingual).

English · 简体中文

CI
Python
Protocol
MCP Apps
License: MIT


Official Protocol Guarantee · Zero Unofficial Ban or Risk-Control Risk

[!IMPORTANT]
antigravity-codex-mcp runs 100% on OpenAI's official local codex app-server --stdio protocol.
It is NOT a reverse-engineered web wrapper, cookie harvester, OAuth hijacker, or third-party proxy pool.

  • Direct Official Binary: Spawns your locally installed official OpenAI Codex executable (codex app-server --stdio), the exact same JSON-RPC protocol used by the official Codex desktop app and IDE extensions.
  • Zero Credential Access: Never reads, extracts, or transmits cookies, session tokens, or API keys from ~/.codex.
  • Zero External Proxy / Zero Outbound HTTP: This MCP server makes zero network requests of its own. All traffic goes directly from your local official OpenAI Codex binary to OpenAI's official servers—identical to running codex yourself in a terminal.
  • No Unofficial Account Ban Risk: Because every call goes through OpenAI's official client and respects official subscription or API quotas, there is no ban or risk-control exposure caused by unofficial reverse-engineered clients.
Security Dimension antigravity-codex-mcp (This Project) Unofficial Reverse Proxies / Cookie Wrappers
Underlying Protocol Official OpenAI codex app-server --stdio Reverse-engineered web endpoints / private APIs
Credential Handling Never touches tokens or cookies (managed by official CLI) Extracts & forwards ChatGPT cookies / OAuth tokens
Network Path Local official codex binary → OpenAI directly Routed through third-party proxies / shared pools
Telemetry Storage Local JSONL file only (~/.gemini/config/), zero upload Often logged on remote relay servers
Account Safety Safe · Official OpenAI client behavior High risk of fraud detection or account suspension

Why This Project?

Google Antigravity's model picker does not support arbitrary OpenAI-compatible endpoints, and newer versions of OpenAI Codex CLI replaced codex mcp-server with codex app-server JSON-RPC.

antigravity-codex-mcp v2.0 bridges Antigravity and your local official Codex over standard MCP stdio + MCP Apps (SEP-1865):

  • Zero External Python Dependencies: Pure Python 3.11+ standard library (codex_mcp/ modular package) with prebuilt single-file HTML UI bundles (ui/dist/*.html). Clone and run—no pip install or Node.js required.
  • Cross-Platform Official Binary Discovery: Automatically locates official Codex on Windows (CODEX_BIN, ~/.codex/config.toml, Get-AppxPackage OpenAI.Codex, ~/.codex/.sandbox-bin/codex.exe), macOS (Codex.app, Homebrew), and Linux (~/.local/bin, PATH).
  • Frosted Graphite UI v2.0 + ZH/EN Switching: Minimalist Apple/Raycast-inspired visual system with automatic Dark/Light host theme sync, Container Query responsive layout for narrow Antigravity sidebars (< 560px) and wide Bento panels, plus instant EN / 中文 switching.
  • Live Official Protocol Health: Built-in codex_app_health tool and --doctor CLI verify the official codex app-server --stdio transport, auth mode (ChatGPT Official Session or Official API Key), binary path, and UI bundle integrity.
  • Production-Grade Concurrency & Git Audit: Non-blocking MCP stdio worker pool, per-thread_id serialization locks, 60-line stderr ring buffer, cached JSONL telemetry (2,000-record retention), and dirty-worktree Git fingerprint diff auditing.

Architecture & Orchestrator Workflow

flowchart LR
    subgraph AGY["Google Antigravity (Orchestrator)"]
        P["Planner<br/>Reads codex-orchestrator Rule"]
        E["Executor<br/>Follows codex-orchestration Skill"]
        UI["MCP Apps Host<br/>Call Card + Codex Monitor (ZH/EN)"]
    end

    subgraph MCP["antigravity-codex-mcp (Zero-Dep Python)"]
        SRV["run_server.py<br/>MCP Tools + ui:// Resources"]
        PKG["codex_mcp/ Package<br/>client · discovery · git_audit · telemetry"]
    end

    CODEX["Official Local OpenAI Codex<br/>codex app-server --stdio<br/>(Direct Official Connection)"]

    P -->|"Delegates complex coding / review"| E
    E <-->|"MCP stdio"| SRV
    SRV <--> UI
    SRV <--> PKG
    PKG <-->|"Official JSON-RPC (Local Only)"| CODEX

Quick Start

1. Prerequisites

  • Python 3.11+ (3.13 recommended, zero external packages needed)
  • Official OpenAI Codex installed and signed in locally (codex login or Codex Desktop app)

2. Clone & Register MCP Server

git clone https://github.com/poliucode/antigravity-codex-mcp.git

Add "codex" to your Antigravity MCP config ~/.gemini/config/mcp_config.json (see examples/mcp_config.json):

{
  "mcpServers": {
    "codex": {
      "command": "python",
      "args": [
        "C:/path/to/antigravity-codex-mcp/run_server.py"
      ],
      "enabled": true,
      "tools": {
        "codex_list_models": { "approval_mode": "approve" },
        "codex_ask": { "approval_mode": "approve" },
        "codex_run_task": { "approval_mode": "approve" },
        "codex_start_task": { "approval_mode": "approve" },
        "codex_task_status": { "approval_mode": "approve" },
        "codex_cancel_task": { "approval_mode": "approve" },
        "codex_manage_threads": { "approval_mode": "approve" },
        "codex_open_monitor": { "approval_mode": "approve" },
        "codex_get_telemetry": { "approval_mode": "approve" },
        "codex_clear_telemetry": { "approval_mode": "approve" },
        "codex_app_health": { "approval_mode": "approve" },
        "codex_app_models": { "approval_mode": "approve" },
        "codex_app_threads": { "approval_mode": "approve" }
      }
    }
  }
}

Verify your environment with one command:

python run_server.py --doctor

3. Enable Autonomous Orchestrator Delegation (Recommended)

Copy the bundled Rule and Skill into your Antigravity global config directory:


MCP Tools & UI Resources

Name Type Visibility Description
codex_list_models Query Model List available local official Codex models, reasoning efforts, and defaults
codex_ask Read-only Model Architecture second-opinions, root-cause diagnosis, and code review (zero chat UI clutter)
codex_run_task Sync Task Model Run sequential workspace-write coding tasks with Git changed_files & diff_stat
codex_start_task Async Task Model Start long-running background task and return job_id immediately
codex_task_status Poll Model Inspect live progress, model/effort, elapsed time, or final result of an async job
codex_cancel_task Control Model + App Interrupt a running background task cleanly
codex_manage_threads Threads Model List, close, or reset local app-server threads
codex_open_monitor Dashboard Model + Aux/Sidebar Open the right-pane Frosted Graphite Codex Monitor with 3D particle orb (ZH/EN)
codex_get_telemetry Telemetry App-only Poll live calls, 7-day trends, model share, and history (zero LLM tokens)
codex_clear_telemetry Telemetry App-only Clear locally persisted JSONL telemetry
codex_app_health Health App-only Inspect official codex app-server --stdio protocol health, auth mode & bundles
codex_app_models Models App-only Read local model matrix inside the Monitor UI
codex_app_threads Threads App-only Inspect, close, or reset app-server threads inside the Monitor UI

UI Resources: ui://codex/card.html · ui://codex/dashboard.html (text/html;profile=mcp-app)


Environment Variables

Variable Default Description
CODEX_BIN Auto-detected Explicit path to the official codex / codex.exe binary
CODEX_ALLOW_API_KEY Off Set to 1 / true to use official OPENAI_API_KEY / CODEX_API_KEY billing instead of your local ChatGPT official subscription session
CODEX_TELEMETRY_FILE ~/.gemini/config/codex-mcp-telemetry.jsonl Custom path for local call telemetry history

Development & Testing

# Run Python unit tests (zero dependencies)
python -m unittest discover -s tests -v

# Rebuild single-file Frosted Graphite UI bundles (only needed if editing ui/src/)
cd ui && npm install && npm run build

See CHANGELOG.md for release history.

Reviews (0)

No results found