antigravity
This server bridges OpenAI Codex to Google Antigravity CLI, letting Codex launch, monitor, and stop Antigravity tasks.
Check Antigravity availability:
antigravity_statusverifies the CLI is installed and lists tasks tracked by the current MCP process.Start a task:
antigravity_startsends a prompt (up to 12,000 characters) with a working directory, mode (planfor analysis,accept-editsfor authorized edits), optional model/conversation/timeout, and returns atask_id.Poll for results:
antigravity_resultretrieves task status and final JSON response, including aconversation_idfor follow-up tasks.Cancel tasks:
antigravity_cancelstops a running task and its child processes (does not revert changes already made).Single concurrent task: Only one task runs at a time per MCP process; up to 30 recent task records are kept in memory.
No permission bypass: The server never passes
--dangerously-skip-permissions; Antigravity’s own security and sandbox rules apply.
Provides tools to delegate coding tasks to Google Antigravity CLI, enabling headless task execution, status polling, result retrieval, and cancellation.
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., "@antigravity Investigate the failing build in the current project and return likely causes."
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.
AGY MCP for Codex
A small, dependency-free MCP server that lets OpenAI Codex delegate local tasks to Google Antigravity CLI (agy). It starts Antigravity in headless mode, returns immediately with a task ID, and lets Codex poll for the final response.
This is an independent community bridge. It is not an official Google or OpenAI project.
What it provides
MCP tool | Purpose |
| Find the local CLI and list tasks held by the current MCP process |
| Start an Antigravity task and return a |
| Poll task status and retrieve the final JSON response |
| Stop a running task and its child processes |
The bridge supports Windows, macOS, and Linux. It has no npm dependencies and does not read or copy authentication credentials.
Related MCP server: Codex Antigravity Subagent MCP
Requirements
Node.js 18 or newer
Codex CLI or the Codex desktop app with CLI access
Google Antigravity CLI installed and authenticated
Git, if installing from the repository
Install Antigravity CLI from the official download page, then run agy interactively once to complete Google sign-in. Headless runs use the credentials cached by the official CLI.
Quick installation
Clone the repository and test it:
git clone https://github.com/BerryUIKI/AGY_MCP_CODEX.git
cd AGY_MCP_CODEX
npm testOn Windows PowerShell:
powershell -ExecutionPolicy Bypass -File .\scripts\install.ps1On macOS or Linux:
sh ./scripts/install.shThe installer detects Node.js and agy, replaces an existing Codex MCP entry with the same name, and registers this repository's server.mjs. Restart Codex after installation.
To use a nonstandard CLI path on Windows:
.\scripts\install.ps1 -AntigravityCliPath "C:\path\to\agy.exe"On macOS or Linux:
ANTIGRAVITY_CLI_PATH=/path/to/agy sh ./scripts/install.shLet an agent install it
PROMPTS.md contains ready-to-paste prompts for full installation, configuration of an existing clone, analysis tasks, authorized code edits, follow-up conversations, and cancellation.
SYSTEM_PROMPT.md provides a complete Lead Agent system prompt. It makes the primary agent responsible for task design, Antigravity delegation, independent verification, and final acceptance.
The shortest setup prompt is:
Install and configure AGY_MCP_CODEX from https://github.com/BerryUIKI/AGY_MCP_CODEX.git as a user-level Codex MCP server named "antigravity". Check Git, Node.js 18+, Codex CLI, and `agy`; clone the repository; run `npm test`; run the correct script in `scripts/`; verify with `codex mcp get antigravity --json`; and perform a safe plan-mode test that replies exactly AGY_MCP_OK. If Google sign-in is required, ask me to run `agy` interactively. Never handle my credentials or disable Antigravity permissions.Manual configuration
Codex stores user-level MCP configuration in ~/.codex/config.toml. The recommended way to update it is through Codex CLI:
codex mcp add antigravity --env ANTIGRAVITY_CLI_PATH=/absolute/path/to/agy -- /absolute/path/to/node /absolute/path/to/AGY_MCP_CODEX/server.mjsVerify or remove the registration:
codex mcp get antigravity --json
codex mcp remove antigravityIf ANTIGRAVITY_CLI_PATH is omitted, the bridge searches the platform's normal installation location and PATH.
Usage
After restarting Codex, ask:
Use the Antigravity MCP to analyze the project at C:\work\my-project. Run in plan mode, investigate the failing build, and return likely causes with evidence. Poll until the task finishes.For an edit you explicitly authorize:
Use the Antigravity MCP to fix the failing build in C:\work\my-project. I authorize edits inside that project. Use accept-edits mode, preserve unrelated changes, run relevant tests, and poll until completion. Then inspect the diff and summarize it.antigravity_start accepts:
Argument | Meaning |
| Required task instructions, up to 12,000 characters |
| Required existing absolute project directory |
|
|
| Optional Antigravity model override |
| Optional prior conversation to continue |
| 10–1,800 seconds; default 300 |
Only one task runs at a time in each MCP process. Up to 30 recent task records remain in memory and are cleared when Codex restarts the server. Poll antigravity_result about every 10 seconds.
Security model
The bridge never passes
--dangerously-skip-permissions.Antigravity retains its own permission and sandbox behavior.
cwdmust be an existing absolute directory.Arguments are passed directly to the executable without a shell.
Output is capped at 2 MB; diagnostics retain only the latest 12 KB.
Cancelling a task stops its process tree but does not revert changes already written.
Credentials remain under the official Antigravity CLI's authentication system.
Because MCP clients can invoke powerful tools, review the task prompt and working directory before authorizing file-changing work.
Troubleshooting
installed: false from antigravity_status
Install agy, add it to PATH, or reinstall the MCP entry with ANTIGRAVITY_CLI_PATH set to the executable's absolute path.
authentication required
Run agy in a terminal, complete Google sign-in, exit the interactive session, and retry from Codex. Do not paste authorization codes into an agent chat.
Tools do not appear in Codex
Run codex mcp get antigravity --json, confirm that the entry is enabled, then restart Codex so the MCP server is loaded in a new session.
A file operation needs approval or fails in headless mode
Antigravity's normal permission policy still applies. Grant only the specific operations required for the task through Antigravity's own configuration, then retry. The bridge intentionally offers no permission-bypass option.
Development
Run the protocol and validation smoke test:
npm testThe test verifies MCP initialization, tool discovery, CLI status shape, and rejection of invalid working directories, modes, and task IDs. A real model request requires an authenticated Antigravity account and is intentionally excluded from automated tests.
References
License
Available Tools
4 toolsantigravity_cancelA
Stop a running Antigravity task and its child processes. File changes already completed by the task are not reverted.
Inputs: task_id (required).
antigravity_resultARead-only
Read a task status and final Antigravity JSON response. Poll running tasks about every 10 seconds. The response includes a conversation_id that can be passed to a later task. Task records are cleared when the MCP server restarts.
Inputs: task_id (required).
antigravity_startA
Delegate a task to the local Antigravity CLI. An authenticated CLI and an existing absolute working directory are required. Returns a task_id immediately; poll antigravity_result. Use plan for analysis and accept-edits only when file edits are intended. The bridge never bypasses Antigravity permissions.
Inputs: cwd (required), prompt (required), mode, model, +2 more.
antigravity_statusARead-only
Check whether the local Antigravity CLI can be found and list tasks held by this MCP process. Authentication is verified only when a task runs.
Inputs: no named parameters.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 4 tools
Each tool has a distinct role in the task lifecycle, but antigravity_status and antigravity_result both surface task status information, which could cause minor confusion. Overall, the purposes are separable: one checks CLI availability and process-held tasks, the other reads a specific task's status and response.
All tools follow the consistent antigravity_<verb> pattern with clear, predictable names: status, start, result, cancel. No mixed conventions or vague verbs.
Four tools cover the essential operations for delegating and managing tasks through a CLI bridge. The scope is tight and each tool earns its place.
The tool surface covers the full task lifecycle: initiate (start), monitor/retrieve output (result), terminate (cancel), and environment/process health (status). No obvious dead ends or missing operations for the stated purpose.
Maintenance
Related MCP Connectors
Hosted coding agent: start, follow up on and stop tasks that can open GitHub pull requests.
A paid remote MCP for OpenAI Codex agent coordination MCP, built to return verdicts, receipts, usage
Use your Mac, Windows or Linux computer from ChatGPT, Claude or Codex: files, commands, documents.
Operate Linux, macOS and Windows from your LLM. Every action runs through an auditable allowlist.
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
- AlicenseAqualityBmaintenanceLets Codex delegate tasks to the Google Antigravity CLI (agy) with background job execution, live progress tracking, a visual dashboard, and structured error diagnostics.8MIT
- 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