agy-bridge — Claude Code MCP server: what it does, how to install
Hands heavy Claude Code work to the Antigravity CLI and brings back just the answer. Useful when a log or a git history won't fit in context.
claude mcp add --env AGY_PATH=<AGY_PATH> --env AGY_TIMEOUT=<AGY_TIMEOUT> --env AGY_MAX_OUTPUT_CHARS=<AGY_MAX_OUTPUT_CHARS> --env AGY_DEFAULT_MODEL=<AGY_DEFAULT_MODEL> --env AGY_ON_FAILURE=<AGY_ON_FAILURE> --transport stdio agy-bridge -- npx -y agy-bridgeWhat agy-bridge does
agy-bridge sits between Claude Code and the Antigravity CLI (agy). Claude hands off a task, the server runs it through agy against Gemini, Claude or GPT-OSS, and returns the result alone. Files too big for the window, git archaeology and doc lookups stay out of Claude's token budget. Six tools split the jobs: analyze_files, deep_search, web_lookup, adversarial_review, follow_up and delegate.
Each tool carries its own model preference chain. On the first call the bridge runs agy models, keeps that list for the life of the process, and takes whichever name answers first. Next comes AGY_DEFAULT_MODEL, then agy's own pick. Model names get validated up front: agy drops a --model it does not recognise without complaining, so a typo would quietly run somewhere else.
Quotas are the sharp edge. Print mode never reports a 429; agy retries until its timeout and exits empty. The bridge tails the run's log file, kills the process group on RESOURCE_EXHAUSTED, and parses the reset time out of the message. You need Node.js 18+ plus an agy that is installed and signed in, since without it the server has nothing to call. Give the client a longer timeout too, or a cold analyze_files dies with timed out waiting for response.
What it helps with
- read a huge log without eating the context window
- track down a regression with
git logandgit blame - check code against outside API docs
- get a plan torn apart before any edits
- resume an earlier agent session without resending context
Example prompts for the agent
- Run this log through
analyze_filesand hand me only the failing lines. - Put the migration plan through
adversarial_reviewbefore I touch code. - Continue the last run with
follow_upand keep the samesession_id.
How to install agy-bridge
Platform CLI
claude mcp add --env AGY_PATH=<AGY_PATH> --env AGY_TIMEOUT=<AGY_TIMEOUT> --env AGY_MAX_OUTPUT_CHARS=<AGY_MAX_OUTPUT_CHARS> --env AGY_DEFAULT_MODEL=<AGY_DEFAULT_MODEL> --env AGY_ON_FAILURE=<AGY_ON_FAILURE> --transport stdio agy-bridge -- npx -y agy-bridgeReplace <…> with your own values
Platform CLI
codex mcp add agy-bridge --env AGY_PATH=<AGY_PATH> --env AGY_TIMEOUT=<AGY_TIMEOUT> --env AGY_MAX_OUTPUT_CHARS=<AGY_MAX_OUTPUT_CHARS> --env AGY_DEFAULT_MODEL=<AGY_DEFAULT_MODEL> --env AGY_ON_FAILURE=<AGY_ON_FAILURE> -- npx -y agy-bridgeReplace <…> with your own values
Config file
{
"mcpServers": {
"agy-bridge": {
"command": "npx",
"args": [
"-y",
"agy-bridge"
],
"env": {
"AGY_PATH": "<AGY_PATH>",
"AGY_TIMEOUT": "<AGY_TIMEOUT>",
"AGY_MAX_OUTPUT_CHARS": "<AGY_MAX_OUTPUT_CHARS>",
"AGY_DEFAULT_MODEL": "<AGY_DEFAULT_MODEL>",
"AGY_ON_FAILURE": "<AGY_ON_FAILURE>"
}
}
}
}Replace <…> with your own values
Config file
{
"servers": {
"agy-bridge": {
"type": "stdio",
"command": "npx",
"args": [
"-y",
"agy-bridge"
],
"env": {
"AGY_PATH": "<AGY_PATH>",
"AGY_TIMEOUT": "<AGY_TIMEOUT>",
"AGY_MAX_OUTPUT_CHARS": "<AGY_MAX_OUTPUT_CHARS>",
"AGY_DEFAULT_MODEL": "<AGY_DEFAULT_MODEL>",
"AGY_ON_FAILURE": "<AGY_ON_FAILURE>"
}
}
}
}Replace <…> with your own values
Platform CLI
gemini mcp add -e AGY_PATH=<AGY_PATH> -e AGY_TIMEOUT=<AGY_TIMEOUT> -e AGY_MAX_OUTPUT_CHARS=<AGY_MAX_OUTPUT_CHARS> -e AGY_DEFAULT_MODEL=<AGY_DEFAULT_MODEL> -e AGY_ON_FAILURE=<AGY_ON_FAILURE> agy-bridge npx -y agy-bridgeReplace <…> with your own values
Step by step, with commands for each platform: How to add an MCP server to Claude Code, Codex, Cursor, VS Code, Gemini CLI and more
Questions about agy-bridge
How do I install agy-bridge in Claude Code?
Run claude mcp add agy-bridge -- npx -y agy-bridge. That registers the MCP server, and its tools show up in Claude Code.
What does agy-bridge do?
It moves heavy work out of Claude Code into the Antigravity CLI and sends back only the answer, picking a model that suits each tool.
What do I need before it runs?
Node.js 18+ and an agy binary that is installed and authenticated. Point AGY_PATH at the binary and set AGY_DEFAULT_MODEL for the fallback model.