clagy
Click on "Install 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., "@clagyFan out a review of the codebase for error handling gaps"
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.
clagy — a Claude Code → Antigravity (agy) bridge
An MCP server that exposes Google Antigravity's CLI as sub-agents you can invoke from Claude Code. Claude orchestrates; Gemini workers execute in parallel.
Claude Code
└─ agy_fanout({tasks:[…]})
├─ agy.exe -p --output-format stream-json → worker 1 ┐
├─ agy.exe -p --output-format stream-json → worker 2 ├─ in parallel
└─ agy.exe -p --output-format stream-json → worker 3 ┘Workers report every step while they run, so a delegation looks like this rather than like a two-minute spinner:
agy_fanout(tasks=4)
2/4 · store ▸ view_file src/db/session.tsThe workers also reach outside the repo — they search the web and read pages themselves — so
"why does this library do that" and "how does our code use it" come back as one answer,
without the reading landing in Claude's window. See
docs/native-agents.md, which also explains why there is no
agy-* entry in /agents: a subagent's loop is always Claude, so that route spends the very
thing this bridge exists to save.
When it's worth using
The benefit here is not speed — a worker takes 20–130 s to return something Claude would write in half the time. The benefit is context that never enters Claude's window, which means a longer session. Hence the only rule that matters:
Delegate when the ratio between what the worker consumes and what it hands back is high.
case | consumes : returns | |
Research fan-out across a repo | ~300 : 1 | ★★★ |
Adversarial tests against existing code | ~100 : 1 | ★★★ |
Cross-file static audit | ~60 : 1 | ★★★ |
Mechanical edit across ≥4 files | 1 : N | ★★ |
Spec → code for a new file | ~1 : 1 | neutral |
One-line fix · debug loop · anything that depends on the conversation | negative | ✗ |
The measured numbers, the reasoning behind each row, and the second axis of benefit — that workers fail differently than Claude, so they cover blind spots — are in docs/when-to-delegate.md.
Related MCP server: claude-mcp-bridge
Documentation
which cases show a net benefit, with measured ratios | |
live step reporting, and why delegation is a tool and not a subagent | |
background jobs + hook, and the permissionless mode | |
how to use this workflow in any other repository | |
7 general prompt templates + schemas, so you don't write them from scratch | |
the playbook Claude loads on its own; copy to |
Requirements
Node 18+
Google Antigravity's CLI (
agy) installed and already authenticated. The bridge reuses the OAuth credentials in~/.gemini/; it does not needGEMINI_API_KEY. Ifagyis not in%LOCALAPPDATA%\agy\bin\, setAGY_BINto the executable's path. Nothing else: internet research needs no extra skill, because the workers carrysearch_webandread_url_contentin every mode.
Installation
In the examples below, C:\path\to\clagy is wherever you cloned this repo — substitute your own.
1. The bridge.
git clone https://github.com/mateo-cuello/orchestrator-claude--agy.git C:\path\to\clagy
cd C:\path\to\clagy
npm install
node mcp/agy-bridge.mjs --selftest # must report 16/16 before you continue
claude mcp add --scope user agy -- node C:\path\to\clagy\mcp\agy-bridge.mjsScope user = available from every project, with nothing to install per repo.
2. The Stop hook, so async jobs report back on their own. In ~/.claude/settings.json:
"hooks": {
"Stop": [
{ "hooks": [
{ "type": "command", "command": "node C:\\path\\to\\clagy\\hooks\\agy-stop-hook.mjs" }
] }
]
}3. The skill, so Claude loads the orchestration playbook by itself: copy
skills/agy-orchestration/ into ~/.claude/skills/ and replace
the C:\path\to\clagy placeholders inside with your real path.
That's all three. There is deliberately no step for ~/.claude/agents/ — see
docs/native-agents.md. If you
installed the agy-* agents from an earlier version, delete them: they run a Claude loop per
delegation, which is the cost this bridge exists to avoid.
Remove-Item $HOME\.claude\agents\agy-*.mdMCP servers, hooks and agents are loaded at session startup: restart Claude Code after registering them. To use this from other repositories, see docs/other-repos.md.
Verification
node mcp/agy-bridge.mjs --selftestRuns 16 checks: round trip, structured output, silent-failure detection (and that the
denial names the tool and its arguments), that a deny is not diagnosed as exhausted quota,
tool-contract effectiveness, that verify executes a command that is allowlisted exactly,
that the allowlist matches the entire command line and not the binary, the cwd
regression (that writes land in your project and not in agy's scratch), the
autonomous-mode guard, the full lifecycle of an async job, that the hook delivers a
result and does not repeat it, that 21 consecutive registry writes lose none and leave no
.tmp behind (this was a real bug: see
async-and-autonomous.md), that a hung job gets detected,
that workers report their steps live and leave a trace, and that the stream parser
survives chunks split mid-JSON without duplicating steps or leaking tool output into the
trace. It must report 16/16 checks OK.
Tools
agy_dispatch — a single task
field | default | notes |
| — | required |
|
|
|
|
|
|
| the bridge's cwd | working root; added to the workspace automatically. Scope it anyway |
| — | JSON Schema; arrives parsed in |
|
| |
| — | a previous |
Returns {ok, response, structured, conversationId, usage, trace} — plus denials[] when it
failed, and warnings[] when it succeeded despite a tool being denied along the way (a case
that was simply invisible before the bridge started reading agy's step stream).
trace is what the worker actually did, taken from that stream rather than from its own
account of itself:
"trace": { "steps": 14, "toolCalls": 9,
"toolsUsed": ["list_dir", "grep_search", "view_file"],
"filesTouched": ["src/db/session.ts", "src/db/index.ts"] }Use filesTouched to check citations: a finding that names a file the worker never opened is
invented. Tool outputs are deliberately not kept — they are exactly the context the worker
exists to keep out of your window.
agy_fanout — N in parallel
tasks[] + maxConcurrency (default 4). Returns {summary, results[]}.
agy_start / agy_result / agy_jobs — in the background
agy_start takes the same fields as agy_dispatch (plus label) but does not wait: it
returns a jobId immediately while the worker keeps running. When it finishes, the Stop
hook injects the result at the end of the next turn — no polling required. agy_result
fetches it manually; agy_jobs lists everything.
Use it when you have something else to do meanwhile — the notification lands on a turn
boundary, so launching one and immediately going idle buys you nothing. If your next step
depends on the result, a blocking agy_dispatch is simpler. Details in
docs/async-and-autonomous.md.
Modes
read— read-only. This is the default and needs no extra permissions. Note that read-only includes the internet:search_webandread_url_contentare in the toolset of every mode, so a plainreadworker can already answer "what does the changelog say".write— also edits files.write_file(*)is already permitted in headless mode.verify— also runs allowlisted commands (npm test,pytest,ruff check,npx tsc --noEmit,make,git status|diff|log, …), with one sharp limitation:agymatches the entire command line, literally, with no wildcards. Measured 2026-08-09:git statusruns,git log --oneline -3is denied despitecommand(git log)being present;command(yt-dlp),command(yt-dlp *)andcommand(yt-dlp:*)all fail to authorizeyt-dlp --version. So an allowlist entry only covers a fixed invocation. Anything carrying a variable argument — a path, a URL, a test name — cannot be reached fromverifyat all; that'sautonomousor nothing. Note this also means alternation entries likenpm run build|lint|test|typecheckmatch nothing: they read as prose to the model, not as a permission. Two selftest checks pin both halves of this behaviour.autonomous— ⚠️ no permission system (--dangerously-skip-permissions): arbitrary commands, iterating on its own until tests pass. It exists so the write→test→fix cycle doesn't run through the orchestrator's context window. It requires an explicitcwd, rejects dangerous directories, and the contract forces the worker to paste raw test output. Run the tests yourself once anyway. Read docs/async-and-autonomous.md before using it.
The five agy traps this bridge solves
Silent failure on permissions. If a tool needs a permission it doesn't have,
agyexits with code 0 andstatus:"SUCCESS"but an emptyresponse, sending the notice to stderr. A naive orchestrator counts that as success. The bridge turns it intook:falsewithdenials[]— and since it reads the step stream, the denial names the tool and its arguments (run_command {"CommandLine":"whoami"}: User denied permission…) instead of the bare "a tool required the command permission" that stderr gives you. That's check #3.Silent failure on quota, which looks just like it.
agynever reports a 429 in print mode: it silently retries until--print-timeoutruns out and exits equally empty. The bridge passes--log-file, looks forRESOURCE_EXHAUSTEDand returnsquotaExhausted: truewith a different message — otherwise the diagnosis sends you off to fix permissions that were fine.agyignores the process cwd. Its default workspace is~/.gemini/antigravity-cli/scratch, so awrite_to_filewith a relative path lands there instead of in your project — with no error at all. Measured across 4 variants:cwdalone fails;--add-dir <cwd>works; an absolute path in the prompt works. The bridge does both: it putscwdin the workspace and forbids relative paths in the contract. That's check #5.Unpredictable tool selection. The model may wander into
run_commandand die auto-denied. Every prompt is prefixed with a contract pinning the mode's toolset.Shell escaping. An inline
--json-schemabreaks in PowerShell (the quotes get eaten). The bridge usesspawnwith an argv array and passes the schema via file.
Also: -p does not accept stdin, so prompts longer than 8000 chars are written to a temporary
BRIEF.md for the worker to read. And --agent is never used: a nonexistent name raises no
error, it silently falls back to the default agent.
agy's permission model in headless mode
Category | Default | Effect |
| allowed | reads with no configuration |
| allowed | can edit code |
|
| only what's in |
Config lives in ~/.gemini/antigravity-cli/settings.json (permissions.allow, which supports
alternation: command(npm run (build|lint|test))) and ~/.gemini/config/config.json
(userSettings.globalPermissionGrants, where the UI accumulates every "Always allow").
Sensitive paths (.env*, .git, .npmrc, .netrc, .git-credentials) are already in
ask/denied by default — except in mode:"autonomous", which turns all of that off.
Review
permissions.allowevery so often: it grows on its own.agy's UI accumulates there every "Always allow" you accepted in an interactive session. Each one is stored as an exact command line, so it never widensverifyinto a category — the risk is not thatverifyruns more than the contract enumerates (it runs less), but that one concrete dangerous line ends up authorized.command(git checkout),command(git add)andcommand(git commit)were removed from that list once — they let a non-autonomous worker discard uncommitted changes. Only read-onlygitremains.
Cost
A floor of ~18–26k input tokens per call (agy's system prompt), even for a "hello". A real
research task measured 328k input + 1.4M cache-read + 10.5k output in 75s. Aggressive fan-out
burns quota fast: use flash-high for broad sweeps and reserve gemini-3.1-pro-high for
depth.
Quality
gemini-3.6-flash-low gave an incorrect answer on a trivial file-reading task during
testing. Rule of thumb: schemas should always ask for files_read[] and confidence, and no
claim about the code is accepted without opening the file it cites.
License
MIT — see LICENSE.
This server cannot be installed
Maintenance
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Related MCP Servers
- AlicenseNot gradedqualityFmaintenanceAn MCP server that orchestrates AI coding assistants (Claude Code CLI and Gemini CLI) to perform complex programming tasks autonomously, allowing remote control of your local development environment from anywhere.13142MIT
- AlicenseAqualityAmaintenanceMCP server bridging Claude CLI to Gemini CLI, Codex, Cursor - queries, and search with hardened subprocess management53276MIT
- AlicenseAqualityBmaintenanceLocal MCP server that exposes delegation tools for Codex, Claude, and Antigravity CLI, enabling an orchestrator agent to assign tasks to these sub-agents via non-interactive CLI commands.3MIT
- FlicenseNot gradedqualityCmaintenanceAn MCP server that lets Claude Code call the Google Antigravity CLI (agy) headlessly for a second opinion from a different model family, or to have agy read project files on Claude's behalf so large files never enter Claude's context window.
Related MCP Connectors
Augments MCP Server - A comprehensive framework documentation provider for Claude Code
Hosted MCP server connecting claude.ai, ChatGPT and other AI apps to your own computer
Personal assistant MCP server with search, execute, packages, jobs, secrets, and integrations.
Latest Blog Posts
- Who's Calling? MCP Hosts Are an Identity Blind Spot (And the Spec Knows It)By Om-Shree-0709 on .mcpAgent IdentityOAuth 2.1
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
MCP directory API
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/mateo-cuello/orchestrator-claude--agy'
If you have feedback or need assistance with the MCP directory API, please join our Discord server