agy-subagent
Runs Google Antigravity (agy) Gemini 4 and Orchestrator models as warm, multi-turn subagents, authenticated via Google OAuth, with model routing and thought-level control.
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.
agy-subagent
agy-subagent is a Claude Code plugin that runs Google Antigravity (agy)
Gemini 4 and Orchestrator models as warm, multi-turn subagents behind one MCP
tool (agy_run).
Claude Code's native subagents run Anthropic models only. When you want a
Gemini code review, a large-context read, or a web-grounded search_web
lookup, agy-subagent bridges MCP stdio to a single lazily spawned
agy acp --sandbox process. Reusing session_id keeps prompt caches warm
across turns and recovers transparently after a child crash.
Prerequisites
Node.js >= 20
agyCLI onPATH, authenticated via Google OAuth (agy)
Related MCP server: @h0wzy/mcp
Installation
Add the marketplace and install the plugin:
claude plugin marketplace add davdittrich/agy-subagent
claude plugin install agy-subagent@agy-subagentThe repository ships a committed CommonJS bundle (dist/server.cjs), so
installation needs no npm install or local build.
Architecture
Three TypeScript modules separate pure routing logic, subprocess lifecycle, and MCP stdio framing:
flowchart LR
CC[Claude Code] <-->|MCP stdio| S["src/server.ts (dist/server.cjs)"]
S -->|run / shutdown| A["AcpRunner (src/acp.ts)"]
A <-->|pure rules| R["src/routing.ts"]
A <-->|ACP NDJSON| AGY["agy acp --sandbox / tests/fake-acp.mjs"]Request Flow
Lazy spawn & handshake: On the first
agy_runcall,AcpRunnerspawns oneagy acp --sandboxchild and sendsinitialize. Subsequent turns and concurrent sessions share that child until MCPstdincloses.Warm follow-ups & crash recovery: Passing
session_idreuses the cached session directly. If the child exited earlier,AcpRunnerspawns a fresh child, runssession/load, drops replayed history notifications, and re-appliesmodelandthought_level.Sibling-safe cancellation: When a caller aborts or
timeout_msexpires whilesession/promptruns,AcpRunnersendssession/canceland waits forAGY_SUBAGENT_CANCEL_GRACE_MS. If the child stalls while sibling turns are still running,AcpRunnerretires that child so healthy siblings finish and new calls spawn a fresh process.
Code References
Component | File | Key Symbols |
Pure routing & error rules |
|
|
Deep ACP runner |
|
|
MCP stdio adapter |
|
|
Committed bundle |
| Bundled CommonJS entry point |
Routing skill |
| Model routing & capability notice |
Model Routing
agy_run accepts a 3-way task_type (search, review, code, defaulting to
code on turn 1), an optional model ID or alias, and an optional
thought_level (low, medium, high, xhigh). Only live ^gemini- models
are allowed.
| Model Fallback Ladder | Default |
|
|
|
|
|
|
|
|
|
Model aliases: hydrogen (gemini-4-hydrogen), neon (gemini-4-neon),
carbon (gemini-4-carbon), and orchestrator (gemini-pro-orchestrator-neon
with fallback gemini-pro-orchestrator).
Capabilities & Permissions
By default, agy_run answers allow_once to session/request_permission
callbacks (allow_always is never selected). The subagent can:
Read and edit files in the workspace
Run sandboxed shell commands
Call external MCP tools configured in
agy
To reject execute permissions (reject_once, failing closed to cancelled):
Set
AGY_SUBAGENT_DENY_READONLY_EXEC=1to denyexecuteonsearch,review, and uncached cold-resume calls (codestays allowed unlessdeny_exec: true).Pass
deny_exec: trueper call to denyexecuteon anytask_type, ordeny_exec: falseto override the environment variable.
Configuration
Environment Variable | Default | Description |
|
| JSON string array overriding the ACP subprocess command. |
| unset | Set to |
|
| Grace window in ms after |
| unset | Optional path to append JSONL lifecycle events (never logs prompts). |
Development
npm install
npm run ciThe test suite drives dist/server.cjs across the real MCP stdio boundary
against tests/fake-acp.mjs via AGY_SUBAGENT_ACP_CMD. After editing src/,
run npm run build (or npm test) to keep dist/server.cjs current.
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
Shared long-term memory & Stop-hook task handoff across Claude Code, Codex, Cursor, and mobile.
One MCP endpoint for Claude, GPT & Gemini: 100+ tools + no-code connectors + agent workers.
Persistent memory and cross-session learning for AI coding assistants (hosted remote MCP).
People and AI agents build software together in persistent cloud sessions for Claude Code.
Related MCP Servers
- AlicenseNot gradedqualityDmaintenanceEnables Claude Code to delegate tasks to Google Antigravity (Gemini) as an autonomous subagent, including codebase exploration, architecture analysis, multi-file code generation, and technical Q&A, without requiring external API keys.MIT
- AlicenseNot gradedqualityBmaintenanceEnables multi-agent AI collaboration by connecting Claude Code, OpenAI Codex, and Google Antigravity, providing cross-model code reviews, independent second opinions, and autonomous validation through MCP tools.1MIT
- FlicenseNot gradedqualityAmaintenanceEnables Claude Code to route complex software analysis tasks to Gemini for long-context execution tracing, cross-system impact analysis, performance bottleneck detection, and hypothesis testing, including multi-turn AI-to-AI conversations.-
- FlicenseNot gradedqualityAmaintenanceEnables Claude Code to escalate complex code analysis to Google's Gemini AI for multi-model workflows, including AI-to-AI conversational debugging, execution tracing, cross-system impact analysis, performance bottleneck detection, and hypothesis testing over large codebases and traces.-