Codex Orchestrator
Orchestrates OpenAI Codex CLI runs for code review, implementation, and integration using ChatGPT Plus authentication, with model/reasoning profiles, quota tracking, and isolated verification.
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.
MACA — Multi-Agent Cooperative Architects (maca-orchestrator v2.2)
English | 简体中文
Zero-dependency Node.js Multi-Agent Delivery Gate, independent verifier, and MCP orchestrator that lets any MCP controller host (Codex / GPT, Claude Code, Cursor, Google Antigravity) safely coordinate any review & execution AI (codex-cli, claude-code, DeepSeek Harness dsh-cli, and openai-compat for DeepSeek/Qwen/GLM/Ollama).
Instead of blindly trusting model self-reports or granting unrestricted disk access, every delegation runs through an isolated git worktree, an independent filesystem-vs-baseline audit, snapshot verification, transactional allowlist patching, and a real cross-module integration gate.
Architecture
Antigravity (Planner / Verifier / Integrator)
│ uses Skill + thin stdio MCP (`src/mcp-adapter.mjs`, timeoutSeconds: 960)
▼
Core Runner & Guards (`src/*.mjs`)
├─ M1 Registry & Path Guard : project whitelist, git toplevel check, NTFS junction/ADS guard
├─ M2 Workspace Manager : atomic run_token locks, disabled git hooks, detached worktree
├─ M3 Codex Runner : direct binary spawn, UTF-8 stdin, `--ignore-user-config`, process-tree kill
├─ M4 Verifier & Patch Applier : filesystem-vs-baseline audit, snapshot test run, wx create + rollback
└─ M5 Integration Gate : full-tree content digest + real cross-module smoke/integration testsWhy --ignore-user-config --ignore-rules?
When Codex CLI runs on a machine that also has the Codex Desktop App installed, default invocations inherit desktop MCP servers and memory stores outside the CLI sandbox. Passing --ignore-user-config --ignore-rules -c windows.sandbox="elevated" -c forced_login_method="chatgpt" keeps your ChatGPT Plus OAuth login while isolating each worker run cleanly.
Related MCP server: codex-antigravity-mcp
Prerequisites
OS: Windows, macOS, or Linux (continuously verified on all 3 platforms via GitHub Actions).
Node.js
>= 20(tested on Node 20, 22, and 26; zero third-party npm dependencies).Git (on Windows, portable MinGit or Git for Windows; on macOS/Linux, system
git).Worker CLI / API (pick any combination): OpenAI Codex CLI (
npm install -g @openai/codex+codex login), Claude Code (claude), DeepSeek Harness (dsh), or any OpenAI-compatible API (DeepSeek / Qwen / GLM / Ollama).
Quick Start (Zero-Clone via npx / Global Install, or Git Clone)
Option A: Zero-Clone CLI (npm / npx)
# Install globally (or run directly via `npx maca-orchestrator <cmd>`)
npm install -g maca-orchestrator
# Try the zero-quota contract-mismatch verification demo immediately (no Codex login required)
maca demo
# 1. Auto-detect toolchain & initialize ~/.maca/config/*.json + host MCP config
maca setup
# Or generate configs for Codex / Claude Code / Cursor:
# maca host codex|claude|cursor
# 2. Register a Git repository you want MACA to orchestrate
maca register my-app /path/to/my-app --modes review,implement,integrate --shared-dep node_modules
# 3. Verify environment & launch the local bilingual dashboard
maca doctor
maca uiWhen installed via
npm/npx, MACA stores writable config & state cleanly under~/.maca/(override withMACA_HOME=/custom/dir), keeping the package directory read-only.
Option B: Local Git Checkout
git clone https://github.com/georgeee817-L/maca-orchestrator.git
cd maca-orchestrator
# Optional: verify everything works on a fresh clone (no Codex login or config/runtime.json required)
npm test
npm run demo:contract
# 1. Auto-detect node/git/codex, generate local config/*.json, and install the host MCP config
node scripts/setup.mjs
# Or generate configs for Codex / Claude Code / Cursor:
# node scripts/setup.mjs host codex|claude|cursor
# 2. Register a Git repository you want MACA to orchestrate
# (Add `--shared-dep node_modules` so isolated verification snapshots can copy local dependencies)
node scripts/setup.mjs register my-app /path/to/my-app --modes review,implement,integrate --shared-dep node_modules
# 3. Verify environment & launch the local bilingual dashboard
node scripts/setup.mjs doctor
npm run uiNote: Local machine files (
config/runtime.json,config/projects.json,state/,scratch/) are gitignored so your personal paths and task logs are never committed. Templates live inconfig/runtime.example.jsonandconfig/projects.example.json.
Capability Profiles, Model Catalog, Quota Cooldown & Auth Fallback (v1.3)
Dynamic Codex Model Catalog & Aliases (
codex_list_models/node src/cli.mjs models): Queriescodex debug models(with automatic--bundledfallback) so any model supported by your Codex CLI / ChatGPT account (gpt-6.2-sol,gpt-6.2-astra,gpt-6.1-terra,gpt-6-luna, etc.) can be inspected and selected dynamically viamodelor shorthandmodel_aliases(sol,astra,terra,luna).Separated Review vs. Execution Routing, Strict
deepGuard & L4 Escalation (light|standard|deep): Profiles distinguish the review layer (codex_review:light/standard=gpt-6.2-astramedium,deep=gpt-6.2-astrahigh) from the execution layer (codex_implement:light=gpt-6.2-solhigh,standard=gpt-6.2-solxhigh,deep=gpt-6.2-astramedium). Heavydeepruns are capped atquota.max_deep_runs_24h(default4per 24h), while routineastra/mediumreviews do not consume the heavydeepcap. Elevated combinations (gpt-6.2-astra+xhighor any model atmax) anddeepruns beyond the 24h budget require explicit user approval via a local CLI order with--approve-elevated.ultraremains hard-blocked by policy.Quota Circuit Breaker & 24h Tracking:
state/quota_state.jsontracks 24h token usage (includingmodelandreasoning_effort) and arms a temporary ChatGPT cooldown when429 / rate_limitedoccurs (cooldown_blocked: trueshort-circuits repeat hits). Unsupported model errors returnmodel_unsupportedwithout consuming code retries. Inspect or clear early with:node src/cli.mjs models node src/cli.mjs quota node src/cli.mjs quota --resetPer-Task Launch Cap & Allowed Profiles (
quota.max_launches_per_task,quota.allowed_profiles,order.max_launches): Optional hard boundaries inconfig/runtime.json(both default tonullfor backward compatibility). Whenmax_launches_per_taskororder.max_launchesis set (e.g.1), initial runs, reworks, and API fallbacks share one atomically persisted launch counter per task, while duplicate non-rework submissions stay idempotent without double-counting. Whenallowed_profilesis set (e.g.["light", "standard"]), disallowed profiles and out-of-band model/effort overrides are rejected before spawning Codex.Compact Return Summaries & Per-Attempt Log Index (
compact: true/status --attempt <id>):codex_review,codex_implement,codex_status, and CLIrun --compact/status --compactcan return a deterministic, locally generated compact summary (with first actionable error, file locations, anddetail_ref) without invoking an extra model. Every attempt (1.1,1.2,2.1,v1, ...) persists its sanitized detail JSON understate/tasks/<task_id>.attempts/so historical runs stay independently readable viacodex_status(task_id, attempt_id)even after rework.Account Window Calibration & Multi-Milestone Estimation (
codex_estimate_usage/node src/cli.mjs estimate <spec.json> [--live-account]): Queriescodex app-serveraccount/rateLimits/read(stripping all account identifiers) to sample 5-hour (primary) and 7-day (secondary) ChatGPT Plus window deltas across natural work orders (quota.sample_account_window: true), excluding cross-reset, API-fallback, and overlapping-task samples. Supports both single-order and multi-milestone project estimates (completable_milestones,first_bottleneck_stage,account_quota_status: sufficient|tight|insufficient|unknown), plus chronological leave-future-out backtesting.Multi-Adapter Role Binding & DeepSeek Harness Adapters (
adapter: "codex-cli" | "dsh-cli" | "deepseek-harness"): Profiles and work orders can bindreviewandimplementto different adapters (e.g.codex-cligpt-6.2-astra/mediumfor review + DeepSeek Harness for implementation). Supports bothdsh-cli(DeepSeek Harness Desktop'sdsh.cmdheadless CLI with directshell: falsespawn,--permission-mode, and--session-idrework) anddeepseek-harness(built-in zero-dependency HTTP API harness withlight=deepseek-chat,standard/deep=deepseek-reasoner, thinking-modereasoning_contentpreservation, HTTPS/SSRF/redirect defense, and pre-request token reservation).Tier 3 API Key Fallback Switch (Opt-In, Disabled by Default):
config/runtime.example.jsondefaults toauth: { primary: "chatgpt", allow_api_key_fallback: false, api_key_env_var: "OPENAI_API_KEY" }so ChatGPT Plus users never incur unexpected API billing. Maintainers or CI users who want automatic API fallback can setallow_api_key_fallback: trueand exportOPENAI_API_KEY.
Verification permissions
For MCP implementation and integration, register the exact executable and arguments of each approved check in the local project entry in config/projects.json. For example, add "mcp_check_argv": [["<absolute-node-executable>", "--test", "tests/contract.test.mjs"]] and list the same executable in allowed_command_bins. Read-only review works without a registered command. After running project registration again, check the local entry before dispatching work.
Verification commands run as the orchestrator's Windows user. Their scripts, imports and candidate code require your trust. Use an isolated, least-privileged Windows environment for untrusted projects. A temporary working directory limits accidental edits and does not enforce OS access controls. The verifier copies declared dependency directories and rejects links in the copied tree. Large dependency trees use extra time and disk space.
MCP cannot grant elevated reasoning approval or skip implementation verification. Use a local, operator-approved CLI order for elevated work. Keep task records and logs private.
Using with Antigravity
node scripts/setup.mjs automatically renders plugin/ into ~/.gemini/config/plugins/codex-orchestrator/ with:
plugin.jsonmcp_config.json(using resolved absolute paths andtimeoutSeconds: 960)skills/codex-orchestrator/SKILL.md(5-stage workflow: prototype → blind adversarial review → final contract → module-by-module implementation → integration gate)
Open a new conversation in Antigravity and toggle Codex Orchestrator under Customizations / Plugins if needed.
CLI Usage (Direct / Scripted)
node src/cli.mjs run orders/my-task.order.json
node src/cli.mjs estimate orders/my-task.order.json
node src/cli.mjs verify <task_id>
node src/cli.mjs apply <task_id>
node src/cli.mjs integrate <project_id> orders/integration.json
node src/cli.mjs status <task_id>
node src/cli.mjs cancel <task_id>
node src/cli.mjs doctor
node src/cli.mjs cleanup [--project <id>] [--include-failed] [--dry-run]
node src/cli.mjs unlock <project_id> --force-reconciled
# Zero-dependency local bilingual dashboard (roles, one-click AI auto-setup prompts, write-only API key vault)
npm run ui
# Generate host MCP + rules configs for Codex, Claude Code, Cursor, or Antigravity
node scripts/setup.mjs host codex
node scripts/setup.mjs host claude
node scripts/setup.mjs host cursor
node scripts/setup.mjs host antigravity
# Reproducible cross-module contract-mismatch demo (zero quota cost), local metrics & P3 comparison harness
npm run demo:contract
npm run report:metrics
npm run compare:workflows -- --plan --rounds 3
npm run compare:workflows -- --snapshot-bench --files 200 --shared-files 200The estimate command and MCP tool codex_estimate_usage use completed work orders from the same project, mode, model, reasoning profile, and authentication method. The first estimate needs three complete samples. Pass an existing task ID to refresh the remaining range using its recorded input and output tokens. Account quota feasibility is shown as unknown.
Repository Layout
src/— Core orchestrator modules (config.mjs,path-guard.mjs,registry.mjs,workspace-manager.mjs,codex-runner.mjs,verifier-applier.mjs,integration-gate.mjs,cli.mjs,mcp-adapter.mjs)plugin/— Portable Antigravity Plugin source (plugin.json,mcp_config.template.json,skills/codex-orchestrator/SKILL.md)scripts/setup.mjs— Cross-machine auto-setup, project registration, and plugin installerconfig/— Example templates (*.example.json); localruntime.json&projects.jsonare gitignoredtests/— Automated unit & negative-boundary test suite (node --test)PILOT_REPORT.md— Recorded 4-gate end-to-end Windows validation report
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
Source-checked CLI guides and model-aware planning for Claude Code, Codex, and Grok Build.
Run Claude Code, Codex and opencode on your own machines, with policy checks and phone approvals.
A paid remote MCP for OpenAI Codex context compressor, built to return verdicts, receipts, usage log
Related MCP Servers
- AlicenseAqualityDmaintenanceA controlled Model Context Protocol bridge that lets OpenAI Codex delegate work to Google Antigravity CLI on demand, with project-scoped opt-in and read-only delegation.151MIT
- 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
- AlicenseBqualityCmaintenanceEnables a local Codex chat to ask a second opinion, review staged, unstaged, or revision-based diffs, and delegate coding tasks to the Antigravity CLI running in isolated or disposable workspaces. Supports starting, polling, retrieving, and cancelling tasks with returned answers, diffs, changed-file lists, exit codes, and time/output limits, while never auto-applying returned patches.81MIT
- AlicenseNot gradedqualityBmaintenanceEnables Gemini in Google Antigravity to delegate coding, testing, debugging, and review tasks to a local OpenAI Codex CLI while providing zero-token live monitoring of progress, quotas, sessions, and history.7MIT