antigravity-mcp-swarm
Wraps Google's Antigravity CLI (agy) so multiple agents can be run concurrently in true parallel fan-out, with live NDJSON streaming status (tool calls, cumulative token usage, tool errors, CLI warnings), structured output via JSON schemas, model/effort/mode/sandbox and permission settings, conversation resume, and per-task git worktree isolation. Exposed through synchronous, async + batch-wait, reply, status, and cancel tools, with native MCP Tasks support.
This server does not currently have a deployable release on Glama. Follow the repository's setup instructions to install and configure it for your MCP client, including any required credentials and local dependencies.
antigravity-mcp-swarm
An MCP server that wraps Google's Antigravity CLI (agy) with true parallel execution, live task monitoring, git worktree isolation, and MCP Tasks support. Powered by stdlib-only mcp-swarm-core (zero third-party runtime dependencies).
Why?
Run multiple Antigravity (agy) agents concurrently from Claude Code or any MCP client without serial queueing, with live visibility into tool calls, cumulative token usage, structured output, tool errors / CLI warnings, and isolated HEAD-based git worktrees.
Key features:
True parallel fan-out -- each task runs as an independent
agy --input-format stream-json --output-format stream-jsonsubprocessWorktree isolation --
worktree: truecreates an isolatedHEAD-based git worktree (antigravity-swarm/<id>) per task so parallel runs never edit past each otherBatch wait & MCP Tasks -- supports both explicit fan-out (
antigravity_async+antigravity_wait) and the official MCP 2026-07-28 Tasks extension (io.modelcontextprotocol/tasks)Live JSONL streaming status -- parses
init,step_update, andresultNDJSON events incrementally for live tool counts, last tool call, cumulative token usage, tool errors, and CLI warningsNon-interactive
agyflag support ----model,--effort,--mode,--dangerously-skip-permissions,--sandbox,--agent,--add-dir,--json-schema,--settings,--disable-slash-commands,--print-timeout,--project,--remote-agent, and--conversationresume (interactive-only flags like--continue,--remote-control,--new-project, and--log-fileare omitted)Safe NDJSON stdin transport -- prompts are sent as pure-ASCII single-line NDJSON
{"event":"user","message":{"content":...}}over stdin, avoiding OS argv length limits, leading--option injection, and Windows shell quoting issues
Related MCP server: Antigravity MCP Bridge
MCP Protocol Support
Stateless MCP
2026-07-28-- supportsserver/discover, per-request_meta["io.modelcontextprotocol/protocolVersion"]and_meta["io.modelcontextprotocol/clientCapabilities"],resultTypediscriminators, and unsupported-version rejection (-32022).Official Tasks extension (
io.modelcontextprotocol/tasks) -- when a client advertisesio.modelcontextprotocol/tasks,antigravityandantigravity_replyimmediately return aCreateTaskResult(resultType: "task") with a 128-bittaskId. Clients polltasks/getand cancel viatasks/cancelper SEP-2663.Backward-compatible stateful MCP (
2024-11-05--2025-11-25) -- supportsinitializenegotiation, top-level serverinstructions,ping, toolannotations,outputSchema+structuredContent, accurateisErrorflags, enrichednotifications/progress, and JSON-RPC 2.0 §4.1 silent handling of unknown notifications.
Tools
Tool | Description |
| Synchronous execution (or native MCP Task when client supports |
| Launch a task, get a |
| Continue a previous conversation via |
| Live read-only peek: tools called, last tool call, permission mode, tool errors, cumulative token usage, warnings, and failure cause |
| Block until multiple tasks complete and return results or structured failure details |
| Kill a running async task and its child process tree (preserves worktree for inspection); if already completed or failed, preserves and reports that outcome |
Installation
Claude Code
claude mcp add antigravity-swarm -- uvx --upgrade antigravity-mcp-swarm \
--model gemini-4-neon-highNote: Requires uv (
curl -LsSf https://astral.sh/uv/install.sh | sh) andagyCLI installed and authenticated.
Manual (~/.claude.json)
{
"mcpServers": {
"antigravity-swarm": {
"type": "stdio",
"command": "uvx",
"args": [
"--upgrade",
"antigravity-mcp-swarm",
"--model", "gemini-4-neon-high"
]
}
}
}Unattended permissions
If you want agy to auto-approve all tool permission prompts without confirmation in unattended runs, add --dangerously-skip-permissions to the server args (or pass dangerously_skip_permissions: true per call). Only enable this in trusted repositories or sandboxed environments (--sandbox), as it bypasses tool approval checks.
Usage
Parallel execution
1. Call antigravity_async(prompt="Audit module A", worktree=true) --> task_id: "a1b2c3d4"
2. Call antigravity_async(prompt="Audit module B", worktree=true) --> task_id: "e5f60718"
3. Call antigravity_wait(task_ids=["a1b2c3d4", "e5f60718"])
--> blocks until all finish, returns all resultsantigravity_async and antigravity_wait belong in the same turn: task_id is internal to this server and not tracked by legacy MCP clients. Short timeout values on antigravity_wait are raised to a floor (default 150s, configurable via ANTIGRAVITY_SWARM_MIN_WAIT) so long waits cross the client's 2-minute auto-backgrounding threshold; already-finished tasks return immediately.
Session continuity & worktree cwd preservation
antigravity_replyvalidates thatconversation_idis a valid UUID (never atask_id). Ifagycannot find the requested conversation and falls back to creating a new one,antigravity-mcp-swarmdetects the mismatch and returnsstatus: "failed"(category: "conversation_not_found",isError: true) instead of silently reporting success without prior context. Note thatagystill ran the prompt in that fresh conversation before returning, so inspect the workspace if the prompt requested edits.When
cwdis omitted onantigravity_reply(orantigravity_async(conversation_id=...)), the server automatically reuses the original conversation's working directory (including its worktree path if it still exists; persisted on disk for async and worktree runs, and tracked in-process for non-worktree sync runs).On resumed conversations,
usage,num_turns, andduration_secondsreturned byagyare cumulative across the entire conversation.
Structured output (json_schema)
Pass json_schema (JSON object or file path) to enforce structured output on the final result. When agy returns result.structured_output, it is exposed directly on structuredContent.structured_output.
Slash commands, tool errors, and diagnostics
Prompts starting with a built-in CLI slash command (such as
/help) are rejected byagyunder--input-format stream-jsonunlessdisable_slash_commands: trueis set. Conversely,--mode planrelies on slash-command expansion and has no effect whiledisable_slash_commands: trueis active.Tool step errors (
step_updatewithstate: "ERROR") are surfaced instructuredContent.tool_errorsand response notes without conflating OS errors with policy denials. CLIwarning:lines written to stderr (such as unavailable modes) are surfaced instructuredContent.warnings.When
--print-timeoutterminates an in-progress turn (finished_reason: "print_timeout",AGY_ERRORon stderr), the server classifies it cleanly as aprint_timeoutfailure (preserving any partial output) rather than silently reporting an empty success.
Worktree isolation
Caveats:
Because worktrees branch from
HEAD(git worktree add -b antigravity-swarm/<id> ... HEAD), uncommitted and untracked changes in your working tree are not included in the worktree. Commit prerequisite edits first if the task needs them.Expired worktrees (older than
ANTIGRAVITY_SWARM_TASK_MAX_AGE, default 24 hours) are lazily removed on a subsequent task launch viagit worktree remove --forceandgit branch -D. Any uncommitted edits or unmerged commits remaining in an expired worktree are discarded -- merge or cherry-pick before expiry.
Server flags
Flag | Description |
| Show version and exit |
| Default model (e.g. |
| Default reasoning effort ( |
| Default execution mode ( |
| Auto-approve all tool permission requests by default |
| Run in sandbox mode with terminal restrictions enabled by default |
| Default Antigravity agent name |
| Add workspace directory by default (repeatable) |
| Default session-only settings JSON object or file path |
| Disable slash command/skill expansion in print mode by default |
| Default print-mode time limit (e.g. |
| Default project ID or name |
| Run conversations using remote agents by default |
Boolean server flags can be explicitly overridden to false on any individual tool call.
MCP Resources
URI | Description |
| Version, capabilities, directories, CLI protocol contract |
| Current server-level CLI defaults |
| All known tasks and their state, usage, tool errors, and failure details |
Environment variables
Variable | Default | Description |
|
| Log file path |
|
| Log level ( |
|
| Task output storage directory (owner-only |
|
| Worktree storage directory (owner-only |
|
| Seconds after completion / last reply activity before task artifacts and worktrees are cleaned up |
|
| Floor in seconds for |
| (auto) | Explicit path or command name for |
<user-runtime> defaults to $XDG_RUNTIME_DIR when available, else /tmp/antigravity-swarm-<uid> on POSIX or %TEMP%\antigravity-swarm on Windows. <user-cache> defaults to ${XDG_CACHE_HOME:-~/.cache} on POSIX (so full worktree checkouts do not sit on a RAM-capped runtime tmpfs wiped at logout) or %TEMP% on Windows.
Requirements
Python 3.8+
Antigravity CLI (
agyv1.5+) installed and authenticatedOnly depends on stdlib-only
mcp-swarm-core(no third-party packages)Designed for Linux, macOS, and Windows (verified on Linux)
License
MIT
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
This server cannot be deployed
Maintenance
Related MCP Connectors
Task management your AI agents can actually run. One line becomes a context-ready task over MCP.
Task manager for AI agents. Orchestrate agents to achieve large goals in unified control plane.
Project management MCP for AI agents with safe task reads and writes.
Project management shared by people and AI agents, with persistent project state through MCP.
Related MCP Servers
- AlicenseAqualityBmaintenanceWraps Google Antigravity CLI into 11 typed MCP tools, enabling any MCP client to invoke agy for code review, prototyping, execution, and long-running tasks.1161 PyPI25MIT
- AlicenseBqualityBmaintenanceEnables delegating coding tasks to the official Antigravity CLI from any MCP client, with task listing, model selection, streamed event tracking, cancellation, and resumable sessions. Runs each task against an isolated copy of the repository so results can be previewed, tested, and only integrated into the original after explicit user confirmation.23MIT
- AlicenseNot gradedqualityBmaintenanceEnables MCP clients to delegate work to nested subagents running on Codex and Claude Code, keeping each task's session, turn history and results durable in SQLite while the main chat continues. Supports async or blocking waits, mid-session context updates, git worktree isolation, read-only-by-default permission inheritance, and cancelling whole subagent trees.MIT
- AlicenseNot gradedqualityBmaintenanceEnables MCP clients to launch, supervise, inspect, cancel, and clean up autonomous coding jobs executed by the Google Antigravity CLI in isolated git worktrees and branches, with optional verification, review, and security auditing.Apache 2.0