antigravity-mcp
Allows MCP clients to delegate tasks to Google's Antigravity agent (agy) for web search, repo analysis, file operations, and long-running tasks.
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-mcpanalyze the whole repo 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.
____ _ _
/ ___| | __ _ _ _ __| | ___
| | | |/ _` | | | |/ _` |/ _ \
| |___| | (_| | |_| | (_| | __/
\____|_|\__,_|\__,_|\__,_|\___|
|
+----+----+
| MCP | (- you are here
+----+----+
|
_ _ _ _ _
/ \ _ __ | |_(_) __ _ _ __ __ ___ _(_) |_ _ _
/ _ \ | '_ \| __| |/ _` | '__/ _` \ \ / / | __| | | |
/ ___ \| | | | |_| | (_| | | | (_| |\ V /| | |_| |_| |
/_/ \_\_| |_|\__|_|\__, |_| \__,_| \_/ |_|\__|\__, |
|___/ |___/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.
Claude / Codex this MCP server Antigravity
+---------------+ tool +----------------+ spawns +--------------+
| "analyze the | -----> | use_antigravity| ------> | agy --print |
| whole repo" | | -> jobId(async)| | (Gemini) |
+---------------+ <----- +----------------+ <------ +--------------+
keeps working polls result / logs does the workRelated MCP server: codex-agy-bridge
Requirements
Need | Why |
Node.js 18+ | Runs this server (ships with |
Antigravity CLI ( | The agent this server drives. Install below. |
An MCP client | Claude Desktop, Claude Code, or anything that speaks MCP |
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
curl -fsSL https://antigravity.google/cli/install.sh | bashWindows (PowerShell)
irm https://antigravity.google/cli/install.ps1 | iexWindows (CMD)
curl -fsSL https://antigravity.google/cli/install.cmd -o install.cmd && install.cmd && del install.cmdWhere it lands (remember this — you may need it for AGY_PATH below):
OS | Default |
macOS / Linux |
|
Windows |
|
Sign in and verify:
agy # first run opens a Google Sign-In in your browser (creds cached in your OS keyring)
agy --version # should print a version, e.g. 1.1.1
agy models # lists the models you can use (Gemini 3.5 Flash, Gemini 3.1 Pro, ...)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:
npm install -g mcp-server-google-antigravityThis 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):
git clone https://github.com/TurkerYakup/mcp-server-google-antigravity.git
cd mcp-server-google-antigravity
npm install
npm run check # quick syntax check
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
Edit your claude_desktop_config.json:
OS | Config file |
macOS |
|
Windows |
|
Linux |
|
Using npx (Option A) — recommended:
{
"mcpServers": {
"antigravity": {
"command": "npx",
"args": ["-y", "mcp-server-google-antigravity"],
"env": {
"AGY_MODEL": "Gemini 3.5 Flash (Medium)",
"AGY_AUTO_APPROVE": "true"
},
"timeout": 900000
}
}
}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).
# npx (Option A)
claude mcp add antigravity -- npx -y mcp-server-google-antigravity
# from source (Option B)
claude mcp add antigravity -- node /absolute/path/to/mcp-server-google-antigravity/index.jsThat'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.
Var | Default | What it does |
| auto-detected | Full path to the |
| agy's default | Default model when a call omits |
|
| Pass |
|
| Run every job with |
|
| agy's |
|
| Interval for the "job running" progress notification. |
|
| How long the cached |
Tools
Tool | What it does |
| Delegate a task (async). Returns a |
| Continue the previous conversation (or a specific |
| Get a job's result by |
| List recent jobs and statuses. |
| Kill a running job by |
| Delete old job files by age ( |
| Create a folder (recursive), done directly by the server. |
| Create/write a text file (creates parent dirs); |
| Build a whole folder/file tree from a JSON spec. |
| Read a UTF-8 text file (instant); optional |
| List a folder's entries. |
| List available models ( |
| List available agent profiles ( |
| Check that |
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
Symptom | Fix |
| Open a new terminal so |
Job stays | agy is probably waiting on a permission prompt. Keep |
| Advisory only — the job still runs. Use the exact name from |
Windows: path breaks on a non-ASCII username | Handled automatically — the server resolves |
First run wants you to sign in | Run |
Client reports "tool timed out" | Raise the client's own |
License
MIT © Türker Yakup Altınsoy.
This server cannot be deployed
Maintenance
Related MCP Connectors
OCR, transcription, file extraction, and image generation for AI agents via MCP.
- DazbenchOAuthapp.dazbench
Task management your AI agents can actually run. One line becomes a context-ready task over MCP.
Roadmap, tasks, releases and user feedback your coding agent reads and writes over MCP.
Nifty's MCP server — exposes tasks, projects, messages, and files as tools for AI agents.
Related MCP Servers
- AlicenseBqualityAmaintenanceEnables calling Google's Antigravity CLI (agy) headlessly through MCP, providing tools like agy_ask and agy_research for agents like Claude Code.218MIT
- AlicenseBqualityAmaintenanceAn MCP bridge that lets Codex delegate long-running agent work to the Antigravity CLI, providing observable and resumable tool-based execution with project scoping.138MIT
- FlicenseNot gradedqualityCmaintenanceEnables local AI agents to generate code and interact with Google Antigravity (Gemini Pro) via MCP, consuming zero API tokens.-
- AlicenseNot gradedqualityCmaintenanceAn 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.39 npmMIT