antigravity-bridge
Routes delegated model calls through a locally logged-in agy CLI, so the models available in your Google Antigravity subscription (Gemini families plus other model families exposed by the subscription) can be used from any MCP client. Provides tools to list the live model catalog, delegate tasks, analyze files, search code, look up web docs, request adversarial reviews, and continue or asynchronously run long sessions.
Click on "Deploy 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., "@antigravity-bridge ask opus to review my auth changes for security issues"
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.
Antigravity Bridge
让 WorkBuddy(以及任何 MCP 客户端)直接调用你 Antigravity 订阅里的模型额度 —— 走官方 agy CLI,不碰 Cookie、不逆向接口。
English · 中文
它解决什么问题
你在 Antigravity 里有一份能用的订阅(Gemini Ultra / Pro),手上有 Claude Opus 5.5、Gemini 4 Argon 这些模型。 但你日常写代码的助手是 WorkBuddy / Claude Code / Cursor —— 它们用不上那份额度。
这个桥接把 WorkBuddy 的 MCP 工具 直接对接到 本机已登录的 agy:
WorkBuddy ──MCP(stdio)──▶ antigravity-bridge ──spawn──▶ agy.exe ──▶ Google
你的对话 协议翻译 + 会话管理 官方 CLI 订阅额度主对话模型不会被替换。 桥接是「外援」:你点名让 Opus 审方案、让 Argon 读大文件,结果回到你的对话里,主模型继续干活。
Related MCP server: agy-bridge
和其他方案的区别(这是重点)
本项目 | Cookie / 逆向类客户端 | 官方 API Key | |
认证方式 | 官方 | 搬运 | 单独申请 API Key |
调用路径 |
| 复刻私有接口、模拟浏览器 | 官方 REST API |
封号风险 | 零风险(不新增检测面)※ | 高:等于给账号加了一个可被识别的客户端 | 无 |
用得上订阅额度 | ✅ 是 | 部分是 | ❌ 另计费 |
模型改名后 | ✅ 自动跟随 | ❌ 硬编码,一改就废 | 稳定 |
多轮会话 | ✅ | 自己拼上下文 | 自己管理 |
MCP 工具 | ✅ 10 个专用工具 | 多为裸 completion | 需自己封装 |
※ 「零风险」的准确含义:本项目不模拟浏览器、不搬运 Cookie、不逆向私有接口、不复刻 OAuth —— 它只是启动官方 agy,
Google 侧看到的流量与你自己敲命令完全一样,因此不新增任何检测面。这不是对 Google 服务条款的法律保证,也不改变你账号原有的配额与风控规则。
一句话:别人在模仿 Antigravity 的客户端,这个项目直接用 Antigravity 的客户端。
功能
能力 | 说明 |
🎯 10 个专用工具 | 不是裸问答:读文件、搜代码、查文档、对抗式评审各有专用入口 |
🔄 模型目录动态发现 | 每 5 分钟问一次 |
🧠 默认最高推理档 | 说「用 claude sonnet」自动落到 |
🔗 会话续接 |
|
⏱️ 异步任务三件套 |
|
🌐 代理自动探测 | 启动时读环境变量或 Windows 系统代理并注入子进程,直接治「User location is not supported」 |
🛡️ 安全默认值 | 默认不跳过权限、可选 sandbox、限制可访问目录;失败时严格报错,不让主模型偷偷自己接管 |
🧯 兼容 agy 的退出码怪癖 |
|
🪟 Windows 进程树清理 | 取消任务时 |
🧩 客户端无关 | WorkBuddy、Claude Code、Cursor、Codex CLI 等任何 MCP 客户端都能接 |
工具一览
工具 | 什么时候用 |
| 通用委派:把一整段任务丢过去 |
| 单文件 >200 行、或一次要看好几个文件 |
| 跨仓库 git log / blame / 大范围 grep |
| 查文档、查版本、外部知识 |
| 要一个不同模型家族的第二意见(交叉验证最有价值) |
| 接着上一次委派继续问,传回 |
| 看当前账号真实可用的模型目录 |
| 长任务:提交后立即返回 |
| 查长任务进度与最终结果 |
| 取消运行中的任务 |
每次调用末尾都会附一行元信息,方便追溯:
[antigravity-bridge] model: Claude Opus 5.5 (High) | session: 92faef66-… | usage: {"input_tokens":12339,"output_tokens":60}快速开始(让 AI 帮你装)
把这句话发给 WorkBuddy(或任何能读写文件的 AI 助手):
读 https://raw.githubusercontent.com/Stemmaker/antigravity-bridge-workbuddy/main/AGENTS.md 按里面的步骤帮我安装 antigravity-bridge,装完用 list_models 验证。
AGENTS.md 是写给 agent 的可执行安装说明:它会检查 agy 是否已登录、构建项目、生成 mcp.json 片段(不会写死任何人的路径)、
然后告诉你去哪里点「信任」,最后自检。你不需要手改 JSON。
手动安装
前置条件:agy 已安装并登录。
agy --version # 能出版本号
agy models # 能列出模型 = 登录态有效Windows 实测默认位置:
%LOCALAPPDATA%\agy\bin\agy.exe。其他平台用which agy找到路径,再设AGY_PATH。
1. 构建
git clone https://github.com/Stemmaker/antigravity-bridge-workbuddy.git
cd antigravity-bridge-workbuddy
npm ci
npm run build2. 写 MCP 配置(WorkBuddy:~/.workbuddy/mcp.json,与已有内容合并,别整体覆盖)
{
"mcpServers": {
"antigravity-bridge": {
"type": "stdio",
"command": "node",
"args": ["C:/path/to/antigravity-bridge-workbuddy/dist/index.js"],
"env": {
"AGY_PATH": "C:/Users/<you>/AppData/Local/agy/bin/agy.exe",
"AGY_ALLOWED_ROOTS": "C:/Users/<you>/work",
"AGY_SANDBOX": "true",
"AGY_SKIP_PERMISSIONS": "false",
"AGY_ON_FAILURE": "strict",
"AGY_QUOTA_FAILOVER": "false"
},
"timeout": 1200000
}
}
}3. 重启客户端并信任
WorkBuddy:完全退出进程(关窗口不算)→ 重新打开 → 设置 → 安全中心 → 工具管控 → 找到 antigravity-bridge → 信任 / 连接。
其他客户端:Claude Code 用 claude mcp add;Cursor 写 ~/.cursor/mcp.json;格式同上。
模型怎么选
你说 | 实际调用 |
|
|
|
|
|
|
|
|
| 就低档,尊重你的明确选择 |
什么都不说 | 目录里第一个家族的 High 档 |
规则只有两条:默认最高推理;说家族名自动补 High。模型名带歧义(例如只说 claude)时它拒绝猜,直接把可用列表甩给你。
真实目录永远以 list_models 为准 —— 官方随时会改。
配置项
环境变量 | 默认值 | 作用 |
|
|
|
| 进程 cwd | 允许访问的目录,多值用路径分隔符 |
|
| 传 |
|
| 传 |
|
|
|
|
| 配额耗尽时自动换模型(会重放任务,默认关) |
| 无 | 固定默认模型,缺档位会自动升到 High |
|
|
|
|
| 全局超时(秒); |
|
| 单次输出截断上限 |
|
| 拉模型目录的超时 |
|
| 已完成任务的保留时长 |
故障排查
现象 | 原因 / 处理 |
|
|
| 这是 |
|
|
| 模型名过期了,看报错附带的真实列表 |
WorkBuddy 里看不到这个连接器 | 配置改了必须完全重启客户端;然后去 设置 → 安全中心 → 工具管控 信任 |
任务卡住不返回 | 用 |
安全边界
默认不加
--dangerously-skip-permissions,权限仍受agy自己的规则约束。AGY_ALLOWED_ROOTS之外的工作目录会被直接拒绝。默认关闭配额耗尽的自动换模型:写文件、跑命令的任务中途换模型重放,可能造成重复副作用。
AGY_ON_FAILURE=strict时,委派失败会明确报错,不会让主模型悄悄自己把活干了。桥接不存储、不缓存任何凭据;登录态完全由官方
agy管理。
已知限制
不替换主对话模型,只是外援。
额度、可用模型、地区策略由 Antigravity 官方决定,本项目不绕过。
agy的 JSON 输出结构可能随版本变化,升级后建议先跑一次list_models+ 一句短问答。某些模型(尤其 Gemini 系列)对出口 IP / ASN 敏感,Claude 通常更稳。
致谢与来源
本项目基于 sshahzaiib/agy-bridge(MIT)重写与扩展:
动态模型目录、最高推理默认、代理自动探测、异步任务、Windows 进程树清理、0xC0000409 兼容、安全默认值等。
原始版权声明保留在 LICENSE 中。
Roadmap
doctor自检命令(登录态 / 代理 / 模型目录一键体检)按模型家族统计用量
任务结果落盘,支持跨进程续查
如果这个项目帮你省下了一个下午,给个 ⭐ 能让更多人搜到它。
Available Tools
10 toolsadversarial_reviewA
Get an adversarial second opinion from a different model family (Gemini Pro). ALWAYS use this for plan critiques, design reviews, and pre-merge code review: it hunts for flaws, edge cases, security issues, and unstated assumptions you may have missed.
Inputs: cwd, files, focus, model, +2 more.
analyze_filesA
Delegate file analysis to the Antigravity CLI (Gemini) instead of reading files yourself. USE THIS whenever a file is large (>200 lines) or the task spans more than 3 files: logs, database dumps, generated code, cross-file reviews, comparisons. The files never enter your context — only the answer does.
Inputs: files (required), question (required), cwd, model, +1 more.
cancel_taskC
Cancel a running Antigravity task.
Inputs: task_id (required).
deep_searchA
Delegate codebase archaeology to the Antigravity CLI: git log/diff/blame spelunking, wide greps across a repo, 'when/why did X change', 'where is Y used'. USE THIS instead of running many search commands yourself — it saves your context.
Inputs: query (required), cwd, model, effort.
delegateB
Raw delegation to the Antigravity CLI for heavy tasks that don't fit the other tools. agy has full tool access (shell, file reads, web) in the given cwd.
Inputs: prompt (required), cwd, model, effort.
follow_upA
Continue a previous Antigravity session by session_id (returned by every other tool). USE THIS for follow-up questions about a prior delegation — the full prior context is already on agy's side, so you don't resend anything.
Inputs: question (required), session_id (required), cwd, model, +1 more.
list_modelsC
List the live model directory returned by the authenticated Antigravity CLI.
Inputs: refresh.
start_taskC
Start a long-running task. Use task_status to poll and cancel_task to stop it.
Inputs: prompt (required), cwd, model, effort.
task_statusC
Read task state and final result.
Inputs: task_id (required).
web_lookupA
Delegate a web/documentation lookup to the Antigravity CLI (Gemini with web access): library docs, API references, error messages, current versions, external knowledge. USE THIS when you need information you don't have or that may be newer than your training data.
Inputs: query (required), cwd, model, effort.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 10 tools
The four domain-specific delegations (analyze_files, deep_search, web_lookup, adversarial_review) are well differentiated by target domain, but the raw `delegate` tool explicitly claims 'heavy tasks that don't fit the other tools,' which is a superset of all four and invites misselection. Similarly, `start_task` vs `delegate` and `follow_up` vs `delegate` have blurry boundaries (sync vs async vs continuation) that descriptions only partially resolve.
The task lifecycle group (start_task, task_status, cancel_task) is a clean verb_noun pattern, and analyze_files/deep_search/web_lookup follow suit. However, the set mixes in bare verbs and non-verb forms — `delegate`, `follow_up`, `list_models`, and the adjective-noun `adversarial_review` — so no single predictable convention runs through the whole surface.
Ten tools is well within a comfortable range for a delegation bridge, and each maps to a recognizable capability (domain delegation, raw delegation, session continuation, task lifecycle, model listing). The only redundancy is the catch-all `delegate` sitting alongside four specialized delegators, which is slightly more surface than strictly needed.
The async task lifecycle is covered end to end (start_task, task_status, cancel_task) and follow_up closes the multi-turn session loop, so there are no dead ends in the core delegation flow. Minor gaps remain: no way to enumerate active tasks or list prior sessions/session_ids, forcing the agent to track IDs manually.
Maintenance
Related MCP Connectors
Talk to your public-facing AI from any MCP client — Claude, ChatGPT, Cursor, Cline, Windsurf.
Official MCP bridge to Exogram—the Personal AI Agent for your work, people, and life.
Connect ChatGPT and Claude to your Mac, Windows or Linux with secure MCP remote access.
Your org's AI agents, tasks, runs, search, and brain files as MCP tools and resources.
Related MCP Servers
- AlicenseBqualityBmaintenanceEnables calling Google's Antigravity CLI (agy) headlessly through MCP, providing tools like agy_ask and agy_research for agents like Claude Code.265 PyPI21MIT
- AlicenseAqualityBmaintenanceMCP bridge that lets Claude Code delegate heavy tasks to the Antigravity CLI (agy) — purpose-built tools, model routing with fallback, session continuity, and output truncation to save Claude's context and tokens.6143 npm68MIT
- FlicenseNot gradedqualityDmaintenanceWraps the Antigravity CLI (agy) as an MCP server, enabling Claude Code and other MCP clients to execute AI tasks and manage conversations via the agy command.-
- AlicenseAqualityBmaintenanceMCP server that lets Claude Code delegate heavy tasks (file analysis, deep search, web lookups, adversarial review, and general delegation) to the Antigravity CLI (agy), with model routing, session continuity, timeout controls, and quota-aware failover.9157 npm8MIT