
Mcp Server Google Antigravity
io.github.TurkerYakup由 GitHub 帳號 TurkerYakup 發布v1.0.2更新於 Oct 24, 2026
MCP server exposing Google Antigravity (agy CLI / Gemini): jobs, codebase analysis, file tools.
概覽
讓助理把繁重的編碼工作非同步交給 Google Antigravity 的 agy CLI 代理,並提供本機檔案與資料夾工具。
- 可以做什麼
- 把 Google Antigravity(由 agy CLI 驅動、底層為 Gemini 的終端機編碼代理)包裝成 MCP 工具。use_antigravity 送出工作並立刻回傳 jobId;antigravity_result 以輪詢或長輪詢取得結果,antigravity_continue 可在同一段對話中接續追問。也能列出、取消與清理工作,並提供直接建立、讀取與列出檔案及目錄樹的檔案系統工具。
- 適用情境
- 適合讓主要助理保持精簡,把耗時或整份儲存庫層級的工作(例如全儲存庫分析、網頁搜尋、建立檔案骨架、長時間編輯)交給背景的第二個代理。也適合在委派工作的同時快速建立或讀取本機檔案與資料夾。
- 執行需求
- 以 npm 套件形式透過 stdio 在本機執行(npx mcp-server-google-antigravity 或全域安裝)。需要 Node.js 18+、已安裝並以 Google 帳號登入的 Antigravity CLI(agy),以及 Claude Desktop 或 Claude Code 等 MCP 用戶端。所有環境變數皆為選用;若 agy 不在 PATH 中,可能需要設定 AGY_PATH。
安裝
在 SourceWeft 中
- 開啟 儀表板中的 Mcp Server Google Antigravity,將其新增到工作區。
- 為需要使用其工具的對話啟用該服務。
Desktop only,透過 STDIO。 STDIO 服務會啟動本機處理程序,因此需要 SourceWeft 桌面主機。
其他 MCP 客戶端
參照 儲存庫 中的啟動說明。
README
Let Claude (or any MCP client) hand its heavy work to Google Antigravity's agy agent.
What is this?
mcp-server-google-antigravity is a small MCP (Model Context Protocol) server. It exposes Google Antigravity — Google's terminal coding agent, driven by the agy CLI (Gemini under the hood) — as a set of tools any MCP client can call.
The idea: your primary model (Claude Desktop, Claude Code, Codex, …) stays lean and delegates the grunt work — web search, whole-repo analysis, scaffolding files, long-running edits — to a second agent running in the background. Jobs are async and unlimited: you fire a task, get a jobId instantly, and poll for the result while the caller keeps working.
Requirements
Step 1 — Install the Antigravity CLI (agy)
Never used
agybefore? Start here. It's one command. First launch signs you in with Google.
macOS / Linux
Windows (PowerShell)
Windows (CMD)
Where it lands (remember this — you may need it for AGY_PATH below):
Sign in and verify:
If agy isn't found afterwards, open a new terminal (so PATH reloads) or run agy install to fix shell paths.
Step 2 — Get this MCP server
Option A — npx (recommended): Skip straight to Step 3 and use the npx config. The npx path works seamlessly from the public npm registry with no authentication required.
Alternatively, you can install the package globally:
This exposes the mcp-server-google-antigravity command (which you can register directly in your MCP client's config instead of npx).
Option B — from source (for hacking on it):
node-pty(used only for clean output on Windows) is an optional dependency — if it can't build on macOS/Linux the install still succeeds and the server falls back automatically. No compiler needed.
Step 3 — Register it with your MCP client
Claude Desktop
Edit your claude_desktop_config.json:
Using npx (Option A) — recommended:
Windows note: Electron (Claude Desktop) often can't spawn
npxdirectly — if the server fails to start, wrap it incmd: set"command": "cmd"and"args": ["/c", "npx", "-y", "mcp-server-google-antigravity"](keep the sameenv/timeout).
From source (Option B): set "command": "node" and "args": ["/absolute/path/to/mcp-server-google-antigravity/index.js"] instead. On Windows use forward slashes, e.g. "C:/path/to/mcp-server-google-antigravity/index.js".
Restart the app fully after editing (quit from the tray/menu bar, not just close the window).
Claude Code (CLI) — works on macOS, Windows, Linux
That's it. Your client now has tools like use_antigravity, antigravity_continue, and the filesystem helpers.
Quick example
Ask your MCP client something like "use antigravity to analyze the repo at C:/Dev/Repos/foo and summarize its architecture". Under the hood the client calls:
use_antigravity({ prompt: "...", add_dirs: ["C:/Dev/Repos/foo"] })→ returns{ "jobId": "mrib1q20_wa5ma1", "status": "running" }instantly.antigravity_result({ jobId, wait_ms: 10000 })→ blocks/long-polls until the job is done or the 10-second wait elapses. While still running, it returns a lean payload containing status, character count, and the last 200 characters of output ({ status, jobId, chars, tail, startedAt }). Once complete, it returns the full record (includingdurationMsandbytestelemetry).
Follow up in the same session with antigravity_continue({ prompt: "now list the top 3 risks" }). Need agy to write files? Pass add_dirs so it has a workspace; auto_approve (default) lets it create/edit without prompts.
Configuration (environment variables)
Everything is optional — sane defaults out of the box.
Tools
The server-side filesystem tools use Node's fs directly — instant, and never gated by a permission prompt.
Live progress notifications
Because jobs return a jobId immediately, the server pushes MCP logging notifications (notifications/message, logger antigravity) so the client can see activity without polling:
job started— jobId, kind, prompt snippetjob running— heartbeat everyAGY_HEARTBEAT_MS(default 15s) with a tail of the current partial outputjob done/job failed— final status, byte count / error
Best-effort: if the client didn't negotiate the logging capability they're silently dropped. Polling antigravity_result works either way.
How it works (design notes)
The agy CLI runs a single prompt with agy --print "<prompt>" and returns when done. Three problems and their fixes:
- MCP client request timeout (~60s). Long tasks made the client give up even though
agykept running. → Async job pattern:use_antigravityspawnsagyin the background, returns ajobIdinstantly, writes the result to a JSON file in the OS temp dir (agy_jobs/), and the client pollsantigravity_result. Optional long-polling (wait_ms) lets clients wait inside the request when short runs are expected. No request ever blocks. - agy's own print timeout (default 5m). Heavy prompts hit
timeout waiting for response. → every job passes--print-timeout 10m. - Headless file-permission gate. In
--printmode agy's file-writes get denied by the "ask" policy and the job hangs. →auto_approve(default true) passes--dangerously-skip-permissions;add_dirspasses--add-dir <path>for the workspace it needs.
Security note
auto_approve defaults to true (--dangerously-skip-permissions) — agy will create/edit files and run terminal commands without prompting. This is intentional: in headless --print mode agy otherwise blocks on a permission prompt and the job hangs. For untrusted prompts, prefer sandbox: true (terminal-restricted, cheap — a permission layer, not a VM) over turning auto-approve off. Use auto_approve: false only for genuinely read-only asks.
Platform support
Fully cross-platform — macOS, Windows, and Linux. Windows gets a node-pty path for clean streaming (with an automatic fallback if it's unavailable) and auto 8.3 short-path resolution for non-ASCII usernames; macOS/Linux use plain child_process. The only per-OS difference is where agy lives and where your client's config file is (both covered above).
Troubleshooting
License
MIT © Türker Yakup Altınsoy.
來源:README.md,提交 f22b60f
工具
0版本歷史
1- v1.0.2最新Sep 16, 2026
評分
已滿足適用檢查項的 50%
該評分衡量此收錄條目的完整程度,依據註冊中心條目、端點與公開來源計算得出。它不是對伺服器本身的評價,也不表示伺服器安全或目前可用:可連通性是帶日期的檢查結果,評分也不包含安裝量或使用者評價。
- 近 30 天內可連通25 分
請保持端點能夠回應 MCP 握手;SourceWeft 每 30 天探測一次。
- 已宣告認證方式10 分
請在註冊中心條目中宣告憑證請求標頭,或保持端點能夠回應探測,以便判定其認證方式。
- 已列出工具15 分
請讓伺服器在無憑證時回應 tools/list,或發布可在沙箱中無憑證啟動的軟體包。
- 描述必需15 分
- 圖示10 分
- 文件15 分
- 授權條款10 分