Agy Mcp

agy-mcp: Model Context Protocol (MCP) server for Google Antigravity CLI (agy) with async supervision and completion wakes.

LLM Mart 0 views 1 listing impressions

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 an agy prompt, poll for completion, cancel if needed.
  • agy_run_sync: start a prompt and wait for it inline (bounded, with MCP progress notifications); returns the job_id to 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 an agy_status poll loop.
  • list_models: enumerate available agy models, as the ids the model parameter accepts plus their display labels.
  • list_agents: enumerate available agy agents, as the names the agent parameter accepts. Unlike list_models there is no id/label split, because agy takes an agent name verbatim; an empty list just means no agents are configured. Pass cwd (the directory you give agy_run) to include that repository's project agents from .agents/agents/; agy lists them only for a workspace directory, so without cwd they are absent. On agy 1.3.4 and later a name that is not in the list fails the run before any model call, as failed with failure_reason: agy_error and 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 with list_agents first.
  • agy_usage: report the remaining agy quota per quota group (for example the Gemini pool) with a level of ok, low, critical or exhausted. 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 a dir to 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.

Related servers

Universal MCP Server with advanced AI memory capabilities and semantic search.

30 views

MCP server for MikroTik routers: firewall, NAT, routing, DHCP, DNS, WireGuard and more via SSH.

30 views

Control plane MCP for scoped recon, triage, and bounded proofs.

29 views

Let Codex orchestrate external coding agents through their native harnesses.

28 views