Agy Mcp
agy-mcp: Model Context Protocol (MCP) server for Google Antigravity CLI (agy) with async supervision and completion wakes.
An MCP (Model Context Protocol) server that wraps the Antigravity CLI (agy), so any MCP client (Claude Code, Cursor, Cline, and others) can run agy prompts, peer reviews, and follow-up turns as native tools.
Status: feature complete (stdio and HTTP transports, async and sync job lifecycle, model and session discovery, per-run controls and structured output, cross-platform builds) and verified against a live agy, with 1.1.15 the minimum supported version.
Why
Driving agy from a shell for automation has two recurring problems:
agy -p(print mode) reads stdin even when the prompt is passed with-p. If stdin is an open pipe that never closes, it blocks indefinitely. The fix is to always close stdin (</dev/null), which is easy to forget.- A review can run for many minutes. A single blocking call ties up the caller and can exceed a client's tool-call timeout with nothing recoverable.
agy-mcp solves both by running agy as managed, asynchronous jobs behind a small, typed tool surface, and by capturing output to disk, with a completed run's result and metadata fsync'd, so the result survives a client disconnect, a server restart, or a crash.
Every job runs agy --output-format stream-json, and the supervisor decodes that event stream as it arrives. That is where the conversation id, the response text, the failure message, and the token accounting all come from, so agy-mcp never has to infer any of them.
What it provides
agy_run/agy_status/agy_cancel: start anagyprompt, poll for completion, cancel if needed.agy_run_sync: start a prompt and wait for it inline (bounded, with MCP progress notifications); returns thejob_idto wait on or poll if it outlives the wait cap.agy_wait: block until an already-started job finishes (bounded, with MCP progress notifications); one call replaces anagy_statuspoll loop.list_models: enumerate availableagymodels, as the ids themodelparameter accepts plus their display labels.list_agents: enumerate availableagyagents, as the names theagentparameter accepts. Unlikelist_modelsthere is no id/label split, becauseagytakes an agent name verbatim; an empty list just means no agents are configured. Passcwd(the directory you giveagy_run) to include that repository's project agents from.agents/agents/; agy lists them only for a workspace directory, so withoutcwdthey are absent. On agy 1.3.4 and later a name that is not in the list fails the run before any model call, asfailedwithfailure_reason: agy_errorand an error that lists the available agents (MEASURED against agy 1.4.6); an older agy runs its default agent instead (agy changelog 1.3.4), so check the name withlist_agentsfirst.agy_usage: report the remainingagyquota per quota group (for example the Gemini pool) with a level ofok,low,criticalorexhausted. It spends no model quota. See Quota.list_sessions: list known conversations so review threads can be continued. An unfiltered call omits the ephemeral per-call workspaces the agy-openai-shim helper creates; pass adirto fetch a specific one.
agy_run and agy_run_sync also take optional per-run controls: pick the model, reasoning effort (low/medium/high/xhigh), execution mode (accept-edits; plan is refused, see the constraints below), a named agent, sandbox terminal restrictions, and a json_schema to constrain the result to structured output. Those run-shaping values are forwarded to agy; idempotency_key is handled only by agy-mcp and is never forwarded.
From the project's README.