antigravity-mcp
An MCP server that lets Claude Code call the Google Antigravity CLI (agy) headlessly for a second opinion from a different model family, or to have agy read project files on Claude's behalf so large files never enter Claude's context window.
README
antigravity-mcp
An MCP server that lets Claude Code call the Google Antigravity CLI (agy) headlessly —
for a second opinion from a different model family, or to have agy read project files on Claude's
behalf so large files never enter Claude's context window.
ภาษาไทย: ดู README.th.md
Verified against agy version 1.1.5 (Mach-O arm64 Go binary, ~/.local/bin/agy).
No other version has been tested — if agy update breaks it, see "When an agy update breaks it" below.
Tool
ask_antigravity(prompt: string, workspace?: string, thinking_depth?: "low" | "high")
| param | meaning | default |
|---|---|---|
prompt * |
the question or task; file paths can be named directly — do not paste file contents | — |
workspace |
directory agy may see (may be relative to the project root); if given a file path, its parent directory is used |
project root |
thinking_depth |
high → gemini-3.6-flash-high, low → gemini-3.6-flash-low |
high |
Read-only. agy cannot modify files through this server, and each call is one-shot with no memory
of previous calls.
Scope: agy only sees the project Claude Code is open in
Claude Code spawns this server as a child process, so the server inherits cwd = the project the
user ran claude in. That path is passed to agy as --add-dir <project root> on every call.
The scope therefore follows the project automatically — no change to agy's own config is
required. Open a different project and agy sees only that project.
Escape is blocked at two layers:
- MCP layer (this server) —
workspaceis resolved withrealpath(so symlinks cannot escape) and rejected if it falls outside the project root. - agy layer —
--add-dirmakesagyitself refuse reads outside that directory (verified).
These directories are always rejected, even if listed in AGY_EXTRA_ROOTS:
~/.ssh ~/.aws ~/.gnupg ~/.kube ~/.docker ~/.config/gcloud ~/.claude ~/.gemini
~/.antigravity_cockpit ~/Library/Keychains
Security limits you should know
Every file agy reads is sent to Google's servers.
Within the project root, agy can read any file — including .env. This cannot be prevented
at a hard level:
permissions.denyin~/.gemini/antigravity-cli/settings.jsondoes not work here — testing confirmed--add-diroverrides deny in every form tried (literal path, glob, and denying the whole directory).promptis free text, so an explicit instruction to read.envwill be followed.
What the server does provide is a soft guard: every prompt is appended with instructions not to read secret material and not to modify files. That prevents accidents, not intent.
If a project holds secrets that must not leak, do not call this tool in that project.
Environment variables
| variable | default | note |
|---|---|---|
AGY_BIN |
~/.local/bin/agy |
path to the agy binary |
AGY_PROJECT_ROOT |
process.cwd() |
override the project root (normally unnecessary) |
AGY_TIMEOUT_MS |
120000 |
server-side timeout |
AGY_MODEL_HIGH |
gemini-3.6-flash-high |
model for thinking_depth: "high" |
AGY_MODEL_LOW |
gemini-3.6-flash-low |
model for thinking_depth: "low" |
AGY_EXTRA_ROOTS |
— | extra readable roots outside the project, :-separated (opt-in) |
Install
cd /Users/palm/Desktop/projects/custom-mcp/antigravity-mcp
npm install
claude mcp add antigravity --scope user \
--env AGY_BIN=/Users/palm/.local/bin/agy \
-- node /Users/palm/Desktop/projects/custom-mcp/antigravity-mcp/server.mjs
Check with /mcp in Claude Code. A restart is required before the tool appears.
Design notes
--dangerously-skip-permissionsis deliberately never passed. Whenagyneeds a tool it has not been granted, it soft-denies and the server turns its stderr into a readable error instead of hanging silently.--effortis not used.agyrejects it alongside a model whose name already encodes effort (observed error:--model gemini-3.1-pro-high conflicts with --effort=low), sothinking_depthmaps to the model name instead.stdio: ["ignore", "pipe", "pipe"]—agy1.1.5 does not block on an open stdin pipe (verified), but the server does not rely on that.--print-timeoutis set 10s below the server timeout soagyexits cleanly rather than being killed.- The Electron/Chromium warning filter is a safety net.
agy1.1.5 emits none of them (stderr was empty, 0 bytes); the filter exists in case a future version does. agyinternal state is never read (e.g..gemini/antigravity/transcript.jsonl) — those break on every update. Only the stdout of--printis used.
When an agy update breaks it
Check in this order:
agy --version # 1.1.5 is the verified version
agy -p "reply with exactly: PONG" # does headless still return stdout?
agy --add-dir /tmp -p "read /tmp/x.txt" # does --add-dir still grant read access?
agy help # have any flags been renamed?
agy models # are the model names still valid?
agy help reveals more than agy --help — it additionally lists --output-format and
--json-schema.
推荐服务器
Baidu Map
百度地图核心API现已全面兼容MCP协议,是国内首家兼容MCP协议的地图服务商。
Playwright MCP Server
一个模型上下文协议服务器,它使大型语言模型能够通过结构化的可访问性快照与网页进行交互,而无需视觉模型或屏幕截图。
Magic Component Platform (MCP)
一个由人工智能驱动的工具,可以从自然语言描述生成现代化的用户界面组件,并与流行的集成开发环境(IDE)集成,从而简化用户界面开发流程。
Audiense Insights MCP Server
通过模型上下文协议启用与 Audiense Insights 账户的交互,从而促进营销洞察和受众数据的提取和分析,包括人口统计信息、行为和影响者互动。
VeyraX
一个单一的 MCP 工具,连接你所有喜爱的工具:Gmail、日历以及其他 40 多个工具。
graphlit-mcp-server
模型上下文协议 (MCP) 服务器实现了 MCP 客户端与 Graphlit 服务之间的集成。 除了网络爬取之外,还可以将任何内容(从 Slack 到 Gmail 再到播客订阅源)导入到 Graphlit 项目中,然后从 MCP 客户端检索相关内容。
Kagi MCP Server
一个 MCP 服务器,集成了 Kagi 搜索功能和 Claude AI,使 Claude 能够在回答需要最新信息的问题时执行实时网络搜索。
e2b-mcp-server
使用 MCP 通过 e2b 运行代码。
Neon MCP Server
用于与 Neon 管理 API 和数据库交互的 MCP 服务器
Exa MCP Server
模型上下文协议(MCP)服务器允许像 Claude 这样的 AI 助手使用 Exa AI 搜索 API 进行网络搜索。这种设置允许 AI 模型以安全和受控的方式获取实时的网络信息。