Featured

Deploy OpenClaw in 60 seconds β€” 20% off logoDeploy OpenClaw in 60 seconds β€” 20% off

Launch OpenClaw on Hostinger in about 60 seconds and keep your agent live 24/7. Our referral link gives you 20% off, no coupon code needed.

Launch on Hostinger β†’
Run your Hermes agent on Hostinger, fully managed logoRun your Hermes agent on Hostinger, fully managed

Launch Hermes on Hostinger in one click, fully managed, no VPS knowledge needed. Use code ZACAARON10 for 10% off.

Launch on Hostinger β†’
Crawl and scrape any site into clean data, 10% off logoCrawl and scrape any site into clean data, 10% off

Firecrawl crawls and scrapes any site into clean markdown for your agent. Get 1,000 free credits, and new users get 10% off their first purchase.

Try Firecrawl free β†’
Your own AI agent, running 24/7 with QwikClaw logoYour own AI agent, running 24/7 with QwikClaw

QwikClaw sets up and runs an always-on OpenClaw agent for you. One click, no config files, no server setup.

Deploy now β†’
One API to scrape, enrich, and extract the internet. logoOne API to scrape, enrich, and extract the internet.

Context.dev gives your agents a single API to scrape, enrich, and extract live web data β€” no proxies, no parsers, no maintenance.

Start building free β†’
SetupClaw: done-for-you OpenClaw for founders & exec teams logoSetupClaw: done-for-you OpenClaw for founders & exec teams

White-glove OpenClaw for founders and exec teams (4–50+ employees): we install, harden, integrate your tools, and maintain it β€” secured from day one.

Get it set up for you β†’
SEO data APIs for your agent, $1 free credit logoSEO data APIs for your agent, $1 free credit

DataForSEO gives your agent live access to SERP results, keyword data, backlinks, and on-page SEO data through one API. New accounts get a $1 credit, good for up to 20,000 keyword or backlink lookups.

Try DataForSEO free β†’
Reach 47,000+ AI builders

A flat monthly placement in front of developers actively installing AI tools. No lock-in, cancel anytime.

Advertise here β†’

Works with

Claude CodeClaude DesktopCursorVS CodeClineCodex CLIOpenClaw+ any MCP client

Install to Claude Code

This server doesn't publish a one-line install command. Follow the setup in the source repository.

Summary

sshahzaiib/agy-bridge MCP server](https://glama.ai/mcp/servers/sshahzaiib/agy-bridge/badges/score.svg)](https://glama.ai/mcp/servers/sshahzaiib/agy-bridge) πŸ“‡ 🏠 🍎 πŸͺŸ 🐧 - Delegate heavy tasks from Claude Code (or any MCP client) to the Antigravity CLI...

README.md

<div align="center">

<img src="https://raw.githubusercontent.com/sshahzaiib/agy-bridge/main/assets/banner.svg" alt="agy-bridge β€” Claude Code delegates heavy tasks to the Antigravity CLI" width="100%">

agy-bridge

![CI](https://github.com/sshahzaiib/agy-bridge/actions/workflows/ci.yml) ![npm version](https://www.npmjs.com/package/agy-bridge) ![npm downloads](https://www.npmjs.com/package/agy-bridge) ![node](https://nodejs.org) ![license](LICENSE)

![Glama score](https://glama.ai/mcp/servers/sshahzaiib/agy-bridge)

![MseeP.ai Security Assessment Badge](https://mseep.ai/app/sshahzaiib-agy-bridge)

An MCP bridge that lets Claude Code delegate heavy tasks to the Antigravity CLI (agy) β€” saving Claude's context window and tokens for what matters.

Claude sends a task β†’ the bridge routes it to the best available model via agy β†’ only the answer comes back. Large files, deep git searches, and web lookups never touch Claude's context.

Listed on

![Glama](https://glama.ai/mcp/servers/sshahzaiib/agy-bridge) ![MCP Market](https://mcpmarket.com/server/agy-bridge) ![PulseMCP](https://www.pulsemcp.com/servers/sshahzaiib-agy-bridge) ![mcp.so](https://mcp.so/server/agy-bridge/sshahzaiib) ![MCP Servers](https://mcpservers.org/servers/sshahzaiib/agy-bridge) ![Verified on MseeP](https://mseep.ai/app/2f439062-d211-4a6c-b41b-3a603f490a32)

</div>

User β†’ Claude Code β†’ agy-bridge (MCP) β†’ agy CLI β†’ Gemini / Claude / GPT-OSS
                   ←                  ←          ←

Why this over claude-to-agy?

| | claude-to-agy | agy-bridge | | --------------- | --------------------------- | ------------------------------------------------------------------------------------ | | Tool surface | 1 generic delegate_to_agy | 6 purpose-built tools β€” Claude self-routes reliably | | Model selection | none (agy default only) | per-tool routing across all agy models, with availability detection and fallback | | Multi-turn | stateless | session continuity β€” follow_up resumes agy conversations without resending context | | Output safety | unbounded | configurable truncation cap protects Claude's context | | Sandbox | no | optional --sandbox mode | | Install | uvx (Python) | npx (Node) β€” zero install |

Requirements

Install

# 1. Register the MCP server (user scope = all projects).
#    add-json bakes in a generous client-side timeout so long analyze_files /
#    delegate calls don't trip Claude Code's tool-call deadline (see Timeouts).
claude mcp add-json -s user agy-bridge \
  '{"command":"npx","args":["-y","agy-bridge"],"timeout":600000}'

# 2. Add delegation rules to your project (or ~/.claude/CLAUDE.md for global)
curl -o CLAUDE.md https://raw.githubusercontent.com/sshahzaiib/agy-bridge/main/CLAUDE.md

The "timeout": 600000 (10 min, milliseconds) is the client-side tool-call deadline β€” without it, a cold-start analyze_files (~40–50s) or a long delegate can hit Claude Code's default and return `timed out waiting for

response while the agy run is still going. If your client doesn't honor a > per-server timeout, set the global env var MCP_TOOL_TIMEOUT=600000` instead. > Details and the agy-side budgets are in Timeouts and cancellation.

Tools

| Tool | Use for | Model routing (first available) | | -------------------- | --------------------------------------------------------------- | ----------------------------------------------------------------- | | analyze_files | Files >200 lines, >3 files at once, logs, dumps, generated code | Gemini 3.5 Flash (High) β†’ Gemini 3.1 Pro (Low) | | deep_search | git log/diff/blame archaeology, repo-wide greps | Gemini 3.5 Flash (Medium) β†’ (High) | | web_lookup | Docs, API references, external/current knowledge | Gemini 3.5 Flash (Medium) β†’ (High) | | adversarial_review | Plan critiques, design and code reviews | Gemini 3.1 Pro (High) β†’ Claude Opus 4.6 (Thinking) β†’ Flash (High) | | follow_up | Continue a prior session by session_id β€” no context resend | inherits the session | | delegate | Anything else heavy | Gemini 3.5 Flash (High) |

All tools accept optional cwd (project root) and model (exact name from agy models; validated, with available models listed on mismatch).

Every response ends with a footer:

---
[agy-bridge] model: Gemini 3.5 Flash (High) | session: 1f0c…-d4 (use follow_up to continue)

Model routing

On first use the bridge runs agy models (cached for the process lifetime) and picks the first available model in the tool's preference chain. If none is available it falls back to AGY_DEFAULT_MODEL, and finally to agy's own default. agy silently ignores unknown --model values, so the bridge validates names up front instead of letting requests land on the wrong model.

Quota-aware failover

agy never surfaces quota exhaustion in print mode β€” it silently retries the 429 until its print-timeout, then exits 0 with empty output, which used to look like an indefinite hang. The bridge now watches each run's log file (via --log-file) and on RESOURCE_EXHAUSTED (code 429):

  1. kills the agy process group immediately (no waiting out the timeout),
  2. parses the reset time ("Resets in 4h24m") into an in-process cooldown registry,
  3. retries the same prompt on the next model in the tool's chain,
  4. skips cooled-down models on all subsequent calls until their quota resets.

Failovers are annotated in the response footer (failover: <model>: quota exhausted (resets in 4h24m)). Only when every candidate is exhausted does the call fail β€” in seconds, with reset times listed β€” instead of hanging.

Timeouts and cancellation

Each tool has its own default timeout sized to its job: web_lookup 120s, deep_search 180s, analyze_files / adversarial_review / follow_up 300s, delegate 600s. Setting AGY_TIMEOUT explicitly overrides all of them at once. To change a single tool, set AGY_TIMEOUT_<TOOL_NAME> instead (e.g. AGY_TIMEOUT_DEEP_SEARCH=300); a per-tool override takes precedence over the global AGY_TIMEOUT and the tool's default. The full set of per-tool variables is AGY_TIMEOUT_ANALYZE_FILES, AGY_TIMEOUT_DEEP_SEARCH, AGY_TIMEOUT_WEB_LOOKUP, AGY_TIMEOUT_ADVERSARIAL_REVIEW, AGY_TIMEOUT_FOLLOW_UP, and AGY_TIMEOUT_DELEGATE. The kill path escalates SIGTERM β†’ SIGKILL across the whole process group, and the deadline fires even if agy's helper processes hold the output pipes open. Cancelling the tool call from the MCP client (e.g. pressing Esc in Claude Code) also kills the agy run instead of orphaning it.

Two timeout layers β€” align them. The timeouts above are the _agy-side_ budget. Your MCP client (Claude Code) has its own, separate _tool-call_ timeout, and if it is shorter than the agy budget the client gives up first β€” you'll see Error: timed out waiting for response (note: agy-bridge's own timeout reads agy timed out after Ns instead). The work is not lost: the agy session persists, so follow_up with the returned session_id retrieves the result. But the real fix is to make the client wait at least as long as agy: the Install command already sets a per-server timeout of 600000ms (scoped to the agy-bridge entry only). If you registered the server without it, re-run the add-json command from Install, or set the global env var MCP_TOOL_TIMEOUT=600000. Rule of thumb: client timeout β‰₯ agy budget.

Expected latency. Most of the perceived "slowness" is cold start: the first call in a session spawns the agy CLI and warms the model. A simple analyze_files over 3 files measures around 40–50s cold (β‰ˆ46s observed), dropping on subsequent same-session calls. A first call that also hits a quota 429 takes longer while the bridge fails over. So a client timeout below ~60s will intermittently trip on cold starts even for "simple" questions β€” size it generously.

Configuration

All optional, via environment variables:

| Variable | Default | Description | | ---------------------- | ---------- | ------------------------------------------------------------------------------------------------------------------------- | | AGY_PATH | agy | Path to the agy binary | | AGY_TIMEOUT | per-tool | Seconds; overrides all per-tool timeouts at once (see above), passed as --print-timeout, enforced with a 15s kill grace | | AGY_TIMEOUT_<TOOL> | per-tool | Seconds; overrides the timeout for a single tool only, e.g. AGY_TIMEOUT_DEEP_SEARCH=300. Wins over AGY_TIMEOUT | | AGY_MAX_OUTPUT_CHARS | 50000 | Truncation cap for tool output | | AGY_DEFAULT_MODEL | unset | Fallback model when no chain entry is available | | AGY_SKIP_PERMISSIONS | true | Pass --dangerously-skip-permissions to agy | | AGY_SANDBOX | false | Run agy with --sandbox | | AGY_ON_FAILURE | fallback | strict appends an instruction to failed-tool errors telling the calling agent not to absorb the work itself |

Failure behavior

The bridge always fails loudly: agy errors surface as MCP tool errors with agy's actual stderr, and degraded model routing is annotated in the response footer. By default the calling agent (Claude) will typically do the work itself after a failure β€” visible in the transcript, but easy to stop noticing in a long session. Set AGY_ON_FAILURE=strict to append an explicit "do NOT perform this work yourself β€” report the failure to the user" instruction to every delegation error, so you keep control over when token savings are silently lost.

Development

npm install
npm test           # vitest unit tests (exec mocked β€” no agy needed)
npm run typecheck
npm run build      # tsup β†’ dist/index.js

Contributors

Contributions are welcome β€” open an issue or PR.

<a href="https://github.com/sshahzaiib/agy-bridge/graphs/contributors"> <img src="https://contrib.rocks/image?repo=sshahzaiib/agy-bridge" alt="Contributors" /> </a>

Star History

![Star History Chart](https://www.star-history.com/#sshahzaiib/agy-bridge&Date)

License

MIT

See related servers & alternatives β†’

Related MCP servers

Browse all β†’

Related guides

Hand-picked reading to help you choose and use Developer Tools servers.