claude-antigravity-mcp
Summary: It lets an MCP client delegate work to the Google Antigravity CLI (agy) running on your own machine and account, then track the resulting runs.
Run tasks —
antigravity_tasksends a self-contained prompt to agy and returns the agent's final response plus aconversation_id.Continue conversations — pass
conversation_idto resume a prior run (cwd/model default to what that conversation used).Control safety — pick
access:read-only(plan mode, default),edit(file edits, shell denied), orfull(everything auto-approved, sandboxed unless disabled).Choose the model — set a
modelslug fromantigravity_models(or omit for agy's default) and aneffortlevel (low → max).Scope the workspace — set
cwdandadd_dirsto the folders agy may work in, plustimeout_secondsfor a hard limit.Run in the background — runs longer than
wait_secondsreturn ajob_idinstead of blocking.Manage jobs —
antigravity_jobwaits for, checks, or cancels a job;antigravity_jobslists recent jobs.Inspect models & quota —
antigravity_modelslists the models available to your account with remaining quota per model group.
Allows Claude to delegate tasks to Google Antigravity through the official agy CLI and the user's Antigravity account, including model/effort/access selection, conversation resume, background jobs, quota checks, and changed-file reporting.
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., "@claude-antigravity-mcp have antigravity review my staged diff for bugs"
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.
Antigravity MCP server (agy MCP) for Claude Code, Codex and Cursor
antigravity-mcp is an MCP server for the Google Antigravity CLI (agy). It lets Claude Code, Claude Desktop, OpenAI Codex, Cursor, Windsurf, Gemini CLI or any other MCP client hand tasks to Antigravity: Gemini 4, Claude or GPT models, through your own Antigravity account. You don't need an API key.
Features
Three access levels enforced by agy itself:
read-only(plan mode),edit(file edits, no shell),full(everything, sandboxed by default). You can cap the highest level allowed.Allowed folders: agy only runs in folders you allow. Symlinks and junctions are resolved before the check.
Jobs that survive crashes: every job is saved to disk, and agy runs detached with its output in files. If the server crashes or restarts, or the client disconnects, the next server picks the job up and returns its result. Any session can read any job.
Native MCP Tasks (spec 2025-11-25): clients that support tasks run long calls in the background, with
tasks/get,tasks/result,tasks/listandtasks/cancel. Other clients get ajob_idand wait withantigravity_job.Multi-model council:
antigravity_councilasks 2 to 5 models the same question in parallel, for example Gemini 4 and Claude, which come from different providers and quota pools. A judge model then checks their answers against the files and writes one consolidated answer.Reliable resume: each
conversation_idkeeps its model, effort and folders, because agy forgets the model when you resume.Results you can check:
changed_files,denied_actions, tokenusage, andserved_by, the backend model agy's own log says answered. Misrouting is flagged.Quota-aware routing:
model: "auto"(the default) picks the strongest model, or the fastest withprefer: "fast", from the pool with the most quota left. If that pool runs out mid-run, the task is re-run once on the other pool automatically (fallback). The council skips pools with no quota left.Git worktree isolation:
isolation: "worktree"runs agy in its own worktree on a newagy/<id>branch, so parallel runs and your uncommitted work never collide. Review the result, then commit it on the branch or discard it with one call.No polling: the Claude Code plugin ships an
asyncRewakehook that wakes Claude when a background run finishes. The server also pushes ajob_finishednotification, and MCP Tasks clients get status notifications.Local dashboard: a page that shows jobs from every session, live agy logs and the quota. It is read-only, local only, protected by a token, and served with a strict CSP.
One-command install: a Claude Code plugin marketplace, plus
install, which registers the server with every MCP client it finds on the machine.Zero dependencies: plain Node.js 20+, no SDK, no build step. CI runs the tests and the benchmarks on Windows, macOS and Linux with Node 20, 22 and 24. The 94 tests run offline against a fake agy.
Related MCP server: claude-antigravity-mcp-bridge
Quick start
Install the official Antigravity CLI, then run
agyonce and sign in:irm https://antigravity.google/cli/install.ps1 | iex # Windows PowerShellcurl -fsSL https://antigravity.google/cli/install.sh | bash # macOS / LinuxInstall the server. Pick one option:
Claude Code plugin (adds the server and a delegation skill):
/plugin marketplace add aristidew1/antigravity-mcp /plugin install antigravity-mcp@antigravityRecent Claude Code versions can do both steps at once:
/plugin install antigravity-mcp --marketplace aristidew1/antigravity-mcp.Any MCP client: clone the repo, check the setup, and register the server with every client found on the machine (Claude Code, Claude Desktop, Cursor, Windsurf, Gemini CLI, Codex):
git clone https://github.com/aristidew1/antigravity-mcp node antigravity-mcp/src/cli.mjs --check node antigravity-mcp/src/cli.mjs install # --dry-run to preview, --client cursor,codex to chooseRestart your client and ask something like: "Ask Antigravity with gemini-4-neon-high to review src/ in read-only mode.", or "Hold an Antigravity council on whether this migration is safe."
Let your agent install it
Paste this into Claude Code, Codex or any coding agent:
Install the MCP server from https://github.com/aristidew1/antigravity-mcp.
1. Check that `agy --version` works. If it doesn't, tell me to install the Antigravity CLI and sign in.
2. Clone the repo into a tools folder and run `node src/cli.mjs --check`. Show me the output.
3. Run `node src/cli.mjs install --dry-run`, show me the plan, and run it without --dry-run once I agree.
4. Tell me to restart the session, then call `antigravity_models` to confirm it works.
Do not run paid agy tasks without asking me first.JSON clients (claude_desktop_config.json, ~/.cursor/mcp.json, ~/.codeium/windsurf/mcp_config.json, ~/.gemini/settings.json):
{
"mcpServers": {
"antigravity": {
"command": "node",
"args": ["C:\\path\\to\\antigravity-mcp\\src\\cli.mjs"]
}
}
}Codex (~/.codex/config.toml):
[mcp_servers.antigravity]
command = "node"
args = ["/absolute/path/to/antigravity-mcp/src/cli.mjs"]Claude Code: claude mcp add -s user antigravity -- node /absolute/path/to/antigravity-mcp/src/cli.mjs
Tools
Tool | What it does |
| Runs |
| The same read-only question to 2-5 |
| Waits for a job or a council, or cancels it with |
| Lists recent jobs from every session. |
| Lists the live models ( |
| Starts the local dashboard and returns its URL. You can also run it standalone with |
Access levels
| agy flags | Effect |
|
| No changes. agy only writes a plan in its own state folder. |
|
| Edits files. Shell commands are auto-denied in headless mode and listed in |
|
| Everything is auto-approved, including shell commands. Use it only when you mean it, or forbid it with |
Configuration
Settings come from the MCP server's env block first, then from config.json in the state folder (%LOCALAPPDATA%\antigravity-mcp\ on Windows, ~/.antigravity-mcp/ elsewhere):
{
"allowed_roots": ["C:\\Users\\you\\Dev", "D:\\work"],
"max_access": "edit",
"max_concurrent": 3,
"on_exit": "keep"
}Variable |
| Default | Purpose |
|
| home folder + temp folder | Folders agy may run in ( |
|
|
| Highest |
|
|
| agy runs at once. Further runs wait in a queue. |
|
|
| When the client disconnects: |
|
|
|
|
| see above | Where jobs, conversations and | |
| auto | Path to |
node src/cli.mjs --check shows the settings in effect.
How it works
Prompt passing: the prompt goes in as
--print=<prompt>in an argv array, with no shell and stdin closed. A prompt starting with-is never taken for a flag, and cmd.exe never expands anything.Long prompts: prompts over 20,000 characters are written to a private temp file that agy is asked to read, because Windows caps a command line at 32,767 characters.
Persistence: each job is saved to
jobs/<id>.jsonin the state folder. agy is started detached, and its stdout, stderr and log go to files in a private run folder. A server that starts later adopts the unfinished jobs whose server is gone: it waits for agy to exit, then reads the result from those files. Ownership is an exclusive lock file per job, so two sessions never finish the same job. Another session can follow a job through its file, cancel it through a request file, and take it over if its owner dies.Resume:
agy --conversation <id>silently falls back to the default model unless--modelis passed again. The server stores cwd, model, effort and extra dirs for eachconversation_idand passes them again.Changed files:
git statusruns before and after each run, with the repo's fsmonitor hook disabled and git taken fromPATH, never from the workspace. Files that were already dirty are fingerprinted, so editing them again still shows up.Paths:
cwdandadd_dirsare resolved to their real path, checked against the allowed folders, passed to agy in that resolved form, and checked again when a queued job starts. Network (UNC) and drive-relative paths are refused unless a UNC root is allowed.Backend check: each run writes an agy log (
--log-file). The server reads the backend label from that log and flagsmisroutedwhen it differs from the requested model.MCP Tasks: the server declares
tasks.requests.tools.call, and the long tools declareexecution.taskSupport: "optional". A task-augmentedtools/callreturns aCreateTaskResultright away.tasks/resultblocks until the run ends, andtasks/cancelkills agy.Timeouts: the server passes
--print-timeoutto agy and kills the process tree 90 s after that if agy has not stopped.
FAQ
How do I use Google Antigravity from Claude Code?
Install the agy CLI, sign in once, then install the plugin or run node src/cli.mjs install (see Quick start). Claude can then call antigravity_task or antigravity_council.
Can Claude Code or Codex use Gemini 4 through Antigravity?
Yes. Pass any model that agy models lists, for example gemini-4-neon-high, as model. antigravity_models shows the live list.
Can I get several models to answer and compare them?
Yes. antigravity_council runs Gemini and Claude (or any 2-5 models) on the same question, then a judge model reconciles their answers against the code.
What happens when my Gemini (or Claude) quota runs out?
With model: "auto", new runs go to the pool with the most quota left. If a pool runs out mid-run, the task is re-run once on the other pool, and the result says so in fallback_from. With an explicit model, pass fallback: true for the same behaviour.
Can several agents edit the same repo at once?
Yes, with isolation: "worktree": each run gets its own git worktree and agy/<id> branch. Commit or discard each one when you have reviewed it.
Does it need an API key? What does it cost?
No API key. It uses the account you signed in to with agy, and each run counts against that account's Antigravity quota. Gemini models and Claude/GPT models draw on separate pools.
Can Antigravity break my repo?
Not by default. The default access level is read-only (agy plan mode), agy only runs inside the allowed folders, and you can forbid full with max_access.
What happens to a long job if Claude Code crashes?
agy keeps running. The next session's server picks the job up, and antigravity_job returns the result.
Does it work on Windows?
Yes. Windows is the main target: no cmd.exe, a process-tree kill with taskkill /T, long prompts passed through a file, junctions resolved before the folder check, and tolerance for the UTF-8 BOM that PowerShell 5.1 adds.
Is this the Gemini CLI?
No. This wraps the Antigravity CLI (agy), not gemini. It can still register itself in Gemini CLI as an MCP server.
Test
node test/smoke.mjs # 94 offline end-to-end tests against test/fake-agy.mjs (what CI runs)
node test/smoke.mjs --real # protocol and models against your real agy, spends no quota
node test/smoke.mjs --task claude-sonnet-5-5-low # adds real runs: edit, resume, MCP task, jobsBenchmarks
node bench/bench.mjs measures what the server itself adds, against the instant fake agy, so the numbers are reproducible and spend no quota. CI runs it on every push for each OS and Node version, and writes the table to the job summary. The raw numbers are uploaded as artifacts. Result on a Windows 11 laptop (Node 26, 20 CPUs):
Measure | Result |
Cold start (spawn → initialize) | 44 ms median, 61 ms p95 |
Idle memory (RSS) | 51 MB |
Tool surface sent to the model | 6 tools, ~1,500 tokens |
Server overhead per call | 64 ms median, on top of agy's own runtime |
Parallel reliability | 40/40 runs completed, 8 at once |
Misroutes flagged | 10/10, with 0/10 false alarms |
Quota exhaustion | 5/5 tasks completed on the other pool |
Crash recovery | result recovered by the next server, about 0.6 s after the run ended |
To compare another MCP server on the same machine, --server measures its cold start, memory, tool surface and capabilities the same way:
node bench/bench.mjs --server "node /path/to/other-server/index.js" --json other.json--real <model> adds real agy runs, timed direct and through the server (this spends quota).
Wake-up hook without the plugin
The plugin installs this hook automatically. If you registered the server by hand, add it to ~/.claude/settings.json so Claude is woken when a background run ends:
{
"hooks": {
"PostToolUse": [
{
"matcher": "^mcp__antigravity__antigravity_(task|council)$",
"hooks": [
{
"type": "command",
"command": "node \"/absolute/path/to/antigravity-mcp/src/cli.mjs\" await-job",
"asyncRewake": true,
"timeout": 3600
}
]
}
]
}
}Similar projects
Other agy MCP servers, each with different trade-offs: tphakala/agy-mcp (Go, HTTP transport), Daniiislo/antigravity-mcp-bridge (persistent workers), adeelali4/antigravity-mcp (shared task board for several agent CLIs), Boulea7/agy-mcp (Python), PyModel/antigravity-mcp (TypeScript), bangya96/agycli-mcp, x51xxx/antigravity-mcp-server, Sh3rm/agy-mcp.
Credits
The stdio MCP layer is adapted from claude-codex-mcp (MIT). Backend verification comes from Sh3rm/agy-mcp, and quota-aware errors from agent-intern.
This is an unofficial community project, not affiliated with Google or Anthropic. If it saves you time, a ⭐ helps other people find it.
License
MIT
Available Tools
6 toolsantigravity_councilA
Ask several models the same question through Antigravity, in parallel and read-only (e.g. Gemini 4 and Claude, which come from different providers and quota pools), then have a judge model compare the answers, check them against the files and write one consolidated answer. Use it for reviews, architecture or debugging questions where independent opinions are worth the extra quota. Omit models to get one strong model from each pool that still has quota.
Inputs: cwd (required), prompt (required), effort, models, +4 more.
antigravity_dashboardA
Start the local read-only dashboard (jobs from every session, live agy logs, quota) and return its URL. Give the URL to the user; do not open it yourself.
Inputs: no named parameters.
antigravity_jobA
Check on (and optionally wait for, or cancel) a job started by antigravity_task or antigravity_council. Jobs are saved on disk, so this works after a server restart and from another session.
Inputs: job_id (required), cancel, worktree, wait_seconds.
antigravity_jobsA
List recent jobs, including those started by earlier or parallel sessions.
Inputs: limit.
antigravity_modelsA
List the models available to the user's Antigravity account, with the remaining quota per model pool.
Inputs: no named parameters.
antigravity_taskA
Delegate a task to Google Antigravity, running the official Antigravity CLI (agy --print) on this computer with the user's own Antigravity account. Good for a second opinion or review, a well-scoped implementation, or parallel work. Write a self-contained prompt: goal, relevant files, constraints, what to report back. Returns the agent's final response, the files it changed, and a conversation_id that continues the same conversation. Runs longer than wait_seconds return a job_id: poll it with antigravity_job.
Inputs: prompt (required), cwd, model, access, +9 more.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 6 tools
Each tool targets a distinct action: delegating (task), polling/cancelling (job), listing (jobs), multi-model consensus (council), model/quota discovery (models), and a local UI (dashboard). The only real overlap is antigravity_job vs antigravity_jobs, which differ solely by plurality, though the descriptions make the single-versus-list distinction clear.
All six tools use the same antigravity_ prefix with snake_case noun-based names, so the convention is predictable throughout. Minor deviation: there is no verb_noun pattern, and job/jobs differ only by an 's', which is the one naming pair that could be misread.
Six tools is well within the ideal range and each one earns its place: the core delegation/council flow plus three supporting tools (job, jobs, models) and an optional dashboard. Nothing looks padded or redundant.
The lifecycle is largely covered: start a task or council, continue via conversation_id, poll/wait/cancel jobs, list jobs across sessions, discover models/quota, and open a dashboard. Minor gap: no way to prune or delete old job records or arbitrary stale conversations.
Maintenance
Related MCP Connectors
Connect ChatGPT and Claude to your Mac, Windows or Linux with secure MCP remote access.
Hosted BigQuery MCP server for Claude, ChatGPT and Cursor, with each action switched per account.
Use your own Windows, Mac or Linux computer from ChatGPT, Claude, Cursor or Gemini CLI: run commands, read, write and search files, run long processes. Your computer only makes an outgoing connection (no open ports or VPN). Read-only mode, allowed folders, blocked commands and an action log keep you in control. Free plan available.
Talk to your public-facing AI from any MCP client — Claude, ChatGPT, Cursor, Cline, Windsurf.
Related MCP Servers
- AlicenseBqualityBmaintenanceEnables calling Google's Antigravity CLI (agy) headlessly through MCP, providing tools like agy_ask and agy_research for agents like Claude Code.223MIT
- AlicenseNot gradedqualityCmaintenanceEnables Claude Desktop to execute tasks via the Google Antigravity CLI (agy), exposing its models, skills, plugins, and background workers as native tools.13MIT
- AlicenseAqualityCmaintenanceLets MCP clients such as Claude Code, Claude Desktop, Cursor, or Codex hand tasks to the Antigravity CLI (agy) so the work runs on the user's Antigravity plan instead of the client's. Exposes tools for delegated coding tasks and reviews, web search with sources, image/PDF analysis, shell command generation or execution, brainstorming, and model/quota checks.7MIT
- AlicenseBqualityBmaintenanceBridges any MCP client to the official Antigravity agy CLI, letting users delegate tasks, analyze files, search code, look up docs, and request adversarial reviews from their own Antigravity subscription models. Supports dynamic model discovery, multi-turn session follow-up, and async long-running tasks without replacing the client's main model.101MIT