Labsco
MCP SERVER

Agy Bridge

by sshahzaiib

Hand the heavy reading to another model — big files, git archaeology, web lookups, adversarial review — and get back only the answer, not the material.

Model Routing, Multi-Model Consultation & Cost ControlVerified
Summary
The context window you save is the point; the second opinion is the bonus.

Reading a whole log to answer one question costs your session the whole log — delegating it costs a paragraph, and follow_up means the follow-up question does not resend anything either. The failure handling is unusually considered: quota exhaustion normally shows up as a silent hang, and here it is detected from the run log, failed over to the next model in the chain, and reported with the reset time. Set the client-side timeout generously when you register it, or long delegations will look like failures they are not.

What it is

A delegation bridge from your assistant to the Antigravity CLI. Six purpose-shaped tools each route to a preferred model, run the work outside your session, and return only the result — so large files and wide searches never enter your context window.

What you get
  • analyze_files sends a set of files and a question elsewhere — meant for anything over 200 lines or spanning more than three files: logs, dumps, generated code
  • deep_search delegates repository archaeology — git log, diff and blame, wide greps, "when did this change", "where is this used"
  • web_lookup delegates documentation and API lookups to a model with web access
  • adversarial_review asks a different model family for a critique that hunts for flaws, edge cases, security issues and unstated assumptions — deliberately not the model that wrote the thing
  • follow_up continues a prior session by its session_id, with the earlier context still on the other side, so nothing is resent
  • delegate is the raw path for heavy work that fits none of the above, with full tool access in the working directory you name
  • Every response ends with a footer naming the model used and the session id to continue from
  • Model routing per tool with availability detection: the bridge reads the available model list, validates names up front, and falls back down a preference chain
  • Quota-aware failover — on a 429 it stops the run immediately, parses the reset time, retries on the next model in the chain, and skips cooled-down models until their quota returns, annotating the footer with what happened
  • AGY_MAX_OUTPUT_CHARS caps returned output (default 50000), AGY_TIMEOUT sets per-tool timeouts, AGY_DEFAULT_MODEL is the last-resort model, and AGY_ON_FAILURE=strict tells the calling agent not to absorb a failed delegation itself
Requirements

Node.js 18+, and the Antigravity CLI (agy) installed and authenticated — that is where the work actually runs, and AGY_PATH points at the binary if it is not on PATH. It runs as npx -y agy-bridge. One setup detail matters: register it with a generous client-side tool timeout, since a cold-start analysis or a long delegation will otherwise hit the client's default deadline while the run is still going.

Setup effort

One command — claude mcp add-json -s user agy-bridge '{"command":"npx","args":["-y","agy-bridge"],"timeout":600000}'