agy-mcp
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., "@agy-mcp add retry logic with backoff to the fetch helper in src/api.js"
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
MCP server that lets Claude Code hand coding tasks to the Antigravity CLI (agy), then review what it did before anything lands. Each task runs in its own git worktree, inside a bubblewrap sandbox, without the permission bypass ("turbo mode").
Claude Code ──agy_task──▶ agy-mcp ──▶ git worktree add -b agy/<id>
└──▶ bwrap … agy -p … --mode accept-edits (no --dangerously-skip-permissions)
◀── response, denied actions, diff ──┘
Claude reviews the diff, runs the checks, asks for fixes (agy_follow_up), commits and merges agy/<id>, then agy_cleanup.agy-mcp is an independent project. It is not affiliated with or endorsed by Google, and Antigravity is a Google product. It runs only on Linux.
Tools
Tool | What it does |
| Creates a worktree on |
| Continues the same agy conversation in the same worktree and returns the cumulative diff. |
| Removes the worktree, the task's agy home and the task record. Keeps the branch unless |
agy_task and agy_follow_up accept an optional model (any id from agy models) and effort (low, medium, high, xhigh, max).
Related MCP server: agent-delegation-mcp
What agy can and cannot do
agy runs with --mode accept-edits and without --dangerously-skip-permissions. In headless mode agy cannot ask for approval, so it denies anything that needs it:
Allowed: reading and editing files inside the task worktree.
Denied by agy: terminal commands (tests, builds, installs, git) and writes outside the workspace. They are reported as
denied_actions. A denial ends agy's turn, often with an empty response, so the server always returns the diff.Not committed: agy never commits. The reviewer commits after checking the diff.
The bubblewrap sandbox is a second layer that holds even if agy's own permission check fails:
Path | Inside the sandbox |
| read-only |
| a new |
| empty tmpfs, nothing from your home is visible except the entries below |
task worktree | read-write, except its |
| a fresh directory per task ( |
| read-only seeds kept outside that directory, so no run can enable auto-approval, hooks, plugins or MCP servers for a later run. The seeded |
agy binary | read-only (agy's self-update cannot replace it from inside) |
your real | not mounted |
session D-Bus | only through |
network | shared with the host |
agy reads its sign-in from the Secret Service keyring, which is why the filtered D-Bus proxy exists. If bwrap or the proxy cannot start, the call fails; there is no unsandboxed fallback.
Remaining risks
Network is shared. agy can reach the internet, services listening on
localhost, and the host's abstract unix sockets (for example X11 or remote-desktop agents). With commands denied it has no tool to use them beyond its own API calls.Keyring. The proxy lets the agy process call any Secret Service method, so it can read, create, change and delete secrets in every unlocked keyring collection. That is the agy binary itself, not something the model can drive while commands are denied.
xdg-dbus-proxy version. The D-Bus filter is only as strong as the proxy. Before 0.1.9, upstream lists filter bypasses (CVE-2026-93676 in 0.1.8, CVE-2026-94422 in 0.1.9) that would let code running inside the sandbox reach services other than
org.freedesktop.secrets. agy's terminal commands are denied, so this needs another way to run code inside the sandbox first, but keep the proxy patched. agy-mcp still runs with an older proxy, and every result starts with a warning naming its version; setAGY_MCP_DBUS_PROXY_PATCHED=1if your distribution backported both fixes without raising the version.Session bus address. Because the network namespace is shared, a session bus on an abstract socket (
unix:abstract=…) or on TCP would be reachable without the proxy, so agy-mcp only runs when every entry of the address isunix:path=…, the usual systemd setup.Other agy files. Files agy may read as global instructions, such as
~/.gemini/GEMINI.mdor skills and workflows under~/.gemini/config, stay writable inside a task and persist into its follow-ups. Writing them needs code execution inside the sandbox, and they never leave the task's own home.Code in the worktree is untrusted. Read the diff before running tests or builds from the worktree: they run with your permissions, outside the sandbox. Embedded git repositories that agy creates are excluded from the diff and listed separately; git is never run inside them.
Per-task agy state. A task's conversations stay writable for its follow-ups and are removed with
agy_cleanup. Your interactive agy and the Antigravity IDE never see them.
Requirements
Linux with unprivileged user namespaces for
bwrap(/usr/bin/bwrap). On Ubuntu 23.10 and later, AppArmor blocks them unless an AppArmor profile allowsbwrap(recent Ubuntu releases shipbwrap-userns-restrict) orkernel.apparmor_restrict_unprivileged_usernsis set to 0.xdg-dbus-proxy(/usr/bin/xdg-dbus-proxy) and a session D-Bus on aunix:pathsocket with the Secret Service keyring. Use xdg-dbus-proxy 0.1.9 or a distribution build that includes the fixes for CVE-2026-93676 and CVE-2026-94422 (see "Remaining risks")agyinstalled and signed in (runagyonce interactively)git 2.40 or newer, Node.js 22.13 or newer, pnpm
Install
git clone https://github.com/jestays/agy-mcp.gitcd agy-mcppnpm installpnpm buildRegister it in Claude Code for your user. AGY_MCP_ALLOWED_ROOTS is required; tasks are refused for repositories outside it.
claude mcp add agy -s user -e AGY_MCP_ALLOWED_ROOTS=/home/you/workspace:/home/you/personal -- node /path/to/agy-mcp/dist/index.jsLong tasks can take several minutes. If your MCP client cuts tool calls short, raise its tool timeout (for Claude Code, the MCP_TOOL_TIMEOUT environment variable, in milliseconds).
Configuration
Variable | Default | Meaning |
| none (required) | Directories, separated by |
|
| agy binary (symlinks are resolved). |
|
| Worktrees, per-task agy homes and task records. |
|
| agy |
|
| Diff size returned before it is truncated. |
| agy default | Default model for new tasks. |
| agy default | Default effort. |
|
| bubblewrap binary. |
|
| D-Bus proxy binary. |
|
| Set to |
|
| Session bus the proxy connects to. |
Review workflow
agy_taskwith a self-contained brief: goal, files, constraints, acceptance criteria.Read the returned diff. If agy stopped early (empty response,
denied_actions), say what to do next withagy_follow_up.Run the checks yourself in the worktree once the diff looks safe.
agy_follow_upwith failing output or review findings until it is right.Commit in the worktree, merge or cherry-pick
agy/<task_id>into your branch, thenagy_cleanup.
Development
pnpm testpnpm typecheckpnpm test runs unit and integration tests, including real bwrap and xdg-dbus-proxy runs with a fake agy. Those sandbox tests are skipped on machines without bwrap, xdg-dbus-proxy or a unix:path session bus; set AGY_MCP_REQUIRE_SANDBOX=1 to make that a failure instead, as CI does. pnpm test:live builds the server and runs one end-to-end task with the real agy through MCP over stdio. It uses your Antigravity quota (AGY_MCP_LIVE_MODEL, default gemini-4-hydrogen-low).
Security
agy-mcp is a sandbox, so escapes and ways to run code outside it are security bugs. Please report them privately as described in SECURITY.md, not in public issues.
License
Available Tools
3 toolsagy_cleanupA
Remove a task's worktree and its record. The agy/<task_id> branch is kept unless delete_branch is true, so merge or cherry-pick it first if you want to keep the work.
Inputs: task_id (required), delete_branch.
agy_follow_upA
Continue an existing agy task in the same worktree and conversation, e.g. to fix review findings or failing tests. Returns the new response and the cumulative diff against the task's base commit.
Inputs: message (required), task_id (required), model, effort.
agy_taskA
Delegate a coding task to Antigravity (agy). Creates a new git worktree on branch agy/<task_id> from base, runs agy there inside a bubblewrap sandbox with file edits allowed and terminal commands denied, and returns agy's response, denied actions and the diff (truncated beyond AGY_MCP_MAX_DIFF_CHARS; embedded repositories are listed, not diffed). agy never commits; review the diff, run checks yourself, then commit and merge the branch or discard it with agy_cleanup.
Inputs: repo (required), task (required), base, model, +1 more.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 3 tools
Each tool maps to a distinct phase of the task lifecycle: agy_task starts a task, agy_follow_up continues an existing one, and agy_cleanup tears it down. The descriptions make the boundaries explicit (new worktree vs. same worktree/conversation vs. removal), so misselection is unlikely.
All three tools use the same agy_ prefix with snake_case verb/noun semantics (agy_task, agy_follow_up, agy_cleanup). The convention is uniform and predictable for a small surface.
Three tools cover the create/continue/destroy lifecycle with no redundancy, which fits a focused delegation server. It sits at the low end of the scale and feels slightly minimal, but no tool is superfluous.
The core workflow (delegate, iterate, clean up) is fully covered, and the description explains the manual review/commit step. The main gap is the absence of a list/status tool to rediscover existing tasks and their worktrees after a context loss.
Maintenance
Related MCP Connectors
Source-checked CLI guides and model-aware planning for Claude Code, Codex, and Grok Build.
Shared work memory for Claude Code, Codex, Cursor and chat, scoped to each repository.
People and AI agents build software together in persistent cloud sessions for Claude Code.
Persistent cloud workspaces for AI agents: run commands, edit files, use git and a browser.
Related MCP Servers
- AlicenseAqualityDmaintenanceEnables Claude to create, manage, and clean up git worktrees automatically, including dependency installation and GitHub PR creation.5MIT
- AlicenseNot gradedqualityBmaintenanceEnables Claude Code to delegate implementation tasks to Antigravity CLI and OpenCode, run them fully autonomously, and then review and gate the results.1MIT
- AlicenseAqualityCmaintenanceEnables Claude Code to run cursor-agent tasks in isolated git worktrees, manage asynchronous and parallel jobs, review diffs, and safely apply changes back to the repository.16MIT
- AlicenseBqualityBmaintenanceEnables Claude Code to hand individual plan tasks to Gemini 3.8 Flash through the Antigravity CLI, running each in an isolated git worktree with contract tests, tool-call gating, and protected paths. Verifies the returned work server-side and merges only branches that pass the configured test suite, tracking jobs, progress, and lessons learned.424 npm8MIT