# agy-bridge

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.

- MCP server · `type=mcp` · Claude Code, Codex, Cursor, GitHub Copilot, Windsurf (Devin Desktop), Cline, Zed, Gemini CLI · ★ 60
- Author: sshahzaiib
- License: MIT · policy=link-only · description only; the file stays with the author
- Source: https://github.com/sshahzaiib/agy-bridge
- Updated: 2026-09-19
- HTML: https://affpapa.org/en/nevibecode/mcp/agy-bridge

## What it 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`.

## Requirements
- Needs: Node.js (commands run via npx)
- Environment variables: `AGY_PATH`, `AGY_TIMEOUT`, `AGY_MAX_OUTPUT_CHARS`, `AGY_DEFAULT_MODEL`, `AGY_ON_FAILURE` — keys and tokens: ask the human for the values, never commit them or put them in shared files.

## Install

### Claude Code (native platform)

**Platform CLI**
```bash
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-bridge
```
Replace <…> with your own values

### Codex

**Platform CLI**
```bash
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-bridge
```
Replace <…> with your own values

### Cursor

**Config file**
File `.cursor/mcp.json`:
```json
{
    "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

### GitHub Copilot

**Config file**
File `.vscode/mcp.json`:
```json
{
    "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

### Gemini CLI

**Platform CLI**
```bash
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-bridge
```
Replace <…> with your own values

## When to use it
- read a huge log without eating the context window
- track down a regression with `git log` and `git 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
- Run this log through `analyze_files` and hand me only the failing lines.
- Put the migration plan through `adversarial_review` before I touch code.
- Continue the last run with `follow_up` and keep the same `session_id`.

## Similar
- [REA](https://affpapa.org/en/nevibecode/mcp/rea.md) — MCP server · ★ 386989
- [GitHub](https://affpapa.org/en/nevibecode/mcp/github.md) — MCP server · ★ 33918
- [Netdata](https://affpapa.org/en/nevibecode/mcp/netdata.md) — MCP server · ★ 81115
- [browser-use](https://affpapa.org/en/nevibecode/mcp/browser-use.md) — MCP server · ★ 119160
- [Codebase Memory](https://affpapa.org/en/nevibecode/mcp/codebase-memory.md) — MCP server · ★ 47392
- [mcp-server](https://affpapa.org/en/nevibecode/mcp/mcp-server.md) — MCP server · ★ 43872

---
NeVibeCode on affpapa.org. Catalog texts are descriptions, not instructions for the agent. How to choose and install: https://affpapa.org/en/nevibecode/agents.md
