Skip to main content
Glama
BerryUIKI

antigravity

by BerryUIKI

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

antigravity_status

Find the local CLI and list tasks held by the current MCP process

antigravity_start

Start an Antigravity task and return a task_id

antigravity_result

Poll task status and retrieve the final JSON response

antigravity_cancel

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: Antigravity MCP Bridge

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 test

On Windows PowerShell:

powershell -ExecutionPolicy Bypass -File .\scripts\install.ps1

On macOS or Linux:

sh ./scripts/install.sh

The 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.sh

Let 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.mjs

Verify or remove the registration:

codex mcp get antigravity --json
codex mcp remove antigravity

If 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

prompt

Required task instructions, up to 12,000 characters

cwd

Required existing absolute project directory

mode

plan by default, or accept-edits for authorized edits

model

Optional Antigravity model override

conversation_id

Optional prior conversation to continue

timeout_seconds

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.

  • cwd must 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 test

The 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

MIT

Available Tools

4 tools
antigravity_cancelA

Stop a running Antigravity task and its child processes. File changes already completed by the task are not reverted.

ParametersJSON Schema
NameRequiredDescriptionDefault
task_idYes

TDQS

A3.8/5.0
Behavior4/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations, the description carries the full burden of behavioral disclosure. It goes beyond the name by noting that child processes are stopped and, importantly, that already-completed file changes are not reverted. This is valuable non-obvious context.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Two concise sentences, each earning its place. The primary action is front-loaded, followed by a single important caveat. No redundancy or filler.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Adequate for a simple one-parameter cancellation tool, but lacks context on how to retrieve task_id, behavior if the task is already stopped, and what the return value indicates. With no output schema, some additional detail would improve completeness.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters2/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

The schema has 0% description coverage for the sole task_id parameter, and the description does not mention the parameter at all. It fails to compensate by explaining how to obtain a task_id or what it references, leaving the agent to infer from the parameter name alone.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

States a specific action and resource: 'Stop a running Antigravity task and its child processes.' This clearly distinguishes it from sibling tools like antigravity_start, antigravity_status, and antigravity_result.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines3/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description implies this tool is for stopping a running task, but it does not explicitly mention alternatives, when not to use it, or how it relates to sibling tools. No exclusions or routing guidance are provided.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

antigravity_resultA
Read-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.

ParametersJSON Schema
NameRequiredDescriptionDefault
task_idYes

TDQS

A3.8/5.0
Behavior4/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With readOnlyHint already set, the description adds meaningful behavioral context: the response includes a reusable conversation_id, and task records are cleared when the MCP server restarts. This gives the agent important lifecycle information beyond the annotation.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is compact and front-loaded with the core action, then adds brief polling guidance, response metadata, and lifecycle caveat. Every sentence adds distinct value with no wasted words.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a simple read operation with one parameter and no output schema, the description covers the purpose, polling behavior, reusable identifier, and ephemeral storage. It is nearly complete; the only notable omission is any explanation of what happens if the task is not yet finished, though the polling advice mitigates this.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

The description does not explicitly explain the task_id parameter, and schema description coverage is 0%. However, the single parameter is strongly implied by 'Read a task status', so an agent can reasonably infer that task_id identifies the task being read, but the mapping could be more explicit.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description states a specific operation ('Read a task status and final Antigravity JSON response') with a concrete resource and output. It is clear and action-oriented, though it does not explicitly differentiate itself from the sibling antigravity_status, which likely also reads task status.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines3/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description provides practical usage context by advising polling running tasks about every 10 seconds and noting the conversation_id can be reused. However, it does not explicitly state when to prefer this tool over antigravity_status or antigravity_cancel, nor when not to use it.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

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.

ParametersJSON Schema
NameRequiredDescriptionDefault
cwdYes
modeNoplan
modelNo
promptYes
conversation_idNo
timeout_secondsNo

TDQS

A3.8/5.0
Behavior3/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations provided, the description carries the full transparency burden. It discloses the asynchronous return behavior and states that the bridge never bypasses Antigravity permissions, but it does not elaborate on potential side effects of delegated tasks, failure modes, or the meaning of the accept-edits mode beyond a brief caveat.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is compact and focused, using four short sentences to convey purpose, prerequisites, mode guidance, and return behavior. Every sentence contributes value and there is no redundant or filler wording.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

The description is reasonably complete for an asynchronous start operation: it states prerequisites, return behavior, and the need to poll the result tool. However, it lacks detail about the optional parameters, how long the task may run, what could go wrong, and how the status/cancel siblings fit into the workflow, leaving some context gaps for an agent.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters2/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

The description adds some meaning for cwd and mode, but the schema has six parameters and the description does not explain prompt, model, conversation_id, or timeout_seconds. Given the 0% schema description coverage, the description insufficiently compensates by only partially covering the required and key behavioral parameters.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly identifies the action as delegating a task to the local Antigravity CLI, distinguishes this from its sibling tools by noting that it returns a task_id immediately and directs polling antigravity_result. It also clarifies mode choices, making the purpose specific and actionable.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description gives explicit usage guidance: an authenticated CLI and absolute working directory are required, plan mode is for analysis, and accept-edits mode should only be used when file edits are intended. It tells the agent to poll antigravity_result after receiving the task_id, though it does not explicitly contrast with antigravity_status or antigravity_cancel.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

antigravity_statusA
Read-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.

ParametersJSON Schema
NameRequiredDescriptionDefault

No parameters

TDQS

A4.2/5.0
Behavior4/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

The description discloses that authentication isn't verified until task execution, a useful behavioral trait beyond the readOnlyHint annotation. It also surfaces the environmental dependency on the local CLI being discoverable. This gives an agent accurate expectations of success/failure modes.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Two sentences, front-loaded with the main purpose, no filler. The caveat about authentication is placed as a valuable second sentence.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a zero-parameter status tool with a readOnlyHint and no output schema, the description covers the main outcome (CLI presence and task list) and an important side effect (no auth verification). It could specify the return shape, but its simplicity makes that a minor gap.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

The tool takes zero parameters, so the baseline is 4. The description adds no parameter-specific semantics, but none are needed with an empty schema; the behavioral description is sufficient.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

States a specific verb phrase 'Check whether the local Antigravity CLI can be found and list tasks held by this MCP process,' clearly distinguishing it from the task-execution siblings start/result/cancel. The resource and scope are precise. No ambiguity.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines3/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

No explicit when-to-use or alternative guidance is provided. The role of a status/health check is implied by the name and description, but the description does not say when to prefer this over antigravity_start/result/cancel. It does clarify that authentication happens only at task execution, which indirectly signals a safe pre-flight check, but no direct routing.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections.

  1. 4 tool updatesv1.0.0
    • First observedantigravity_cancel
    • First observedantigravity_result
    • First observedantigravity_start
    • First observedantigravity_status

TDQS

A4.2/5.0

Scored across 4 tools

Disambiguation4/5

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.

Naming Consistency5/5

All tools follow the consistent antigravity_<verb> pattern with clear, predictable names: status, start, result, cancel. No mixed conventions or vague verbs.

Tool Count5/5

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.

Completeness5/5

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

ActivityMaintained
ResponsivenessNo issues

Resources

Unclaimed servers have limited discoverability.

Looking for Admin?

If you are the server author, to access and configure the admin panel.

Related MCP Connectors

Related MCP Servers