Gemini Antigravity MCP Server
Delegates tasks to Google Gemini via the Antigravity CLI, including general questions, large-input digestion, media understanding (images, PDFs, audio, video), Google Search-backed research, independent second opinions, image generation, follow-up conversations, and background jobs.
This server does not currently have a deployable release on Glama. Follow the repository's setup instructions to install and configure it for your MCP client, including any required credentials and local dependencies.
gemini-antigravity-for-claude-code
Let Claude Code hand work to Google Gemini using your Google AI Pro / Ultra subscription,
with no pay-per-token API key. It's an MCP server that wraps Google's
Antigravity CLI (agy), the successor to Gemini CLI.
Built by Desmond Zhou
Why Antigravity? As of 2026-06-18, Gemini CLI no longer serves free, Google One, or Google AI Pro/Ultra users (Gemini CLI README). Those accounts use the Antigravity CLI now (docs).
What Claude gets
Tool | Use it for | Default model |
| General questions. Digesting very large inputs (long logs, whole folders, long docs) and returning only the conclusion. | fast |
| Understanding images, PDFs, audio, and video (picture and soundtrack). | fast |
| Fresh facts through Google Search, with source URLs. | balanced |
| An independent review of a plan, diff, or conclusion by a different model family. Returns structured JSON with | strong |
| Text-to-image (Nano Banana). Saves to a path you choose. | fast |
| Continuing a previous Gemini conversation without resending the material. | fast |
| Long tasks in the background. | balanced |
| The agy version, model aliases, and local call counts. | — |
Model aliases:
fast=gemini-4-hydrogen-lowbalanced=gemini-4-hydrogen-mediumstrong=gemini-4-neon-highcode=gemini-4-carbon-highmax=gemini-4-neon-xhigh
You can also pass any slug from agy models.
Related MCP server: Gemini Bridge
Design
Read-only. Every call runs in an empty scratch workspace. Only the files you name are symlinked in. agy permission rules deny every tool that writes, edits, runs commands, drives a browser, calls other MCP servers, sends messages, or schedules work, and
permissions.allowis forced empty so no pre-approved rule leaks in. Tested: write and edit attempts are refused. Web access is enabled only forgemini_research, and image generation only forgemini_generate_image.Cached. Identical requests (same prompt, model, and file size/mtime) are answered from a local SQLite cache for 7 days. Web and image calls are never cached.
Fails fast on quota and auth. When agy hits a 429, it silently retries until its print timeout and then returns an empty answer. This server watches agy's log instead. On
RESOURCE_EXHAUSTED, 429, or "authentication required", it kills the run within seconds, parses "Resets in …", and short-circuits later calls until the reset time. Gemini models share one subscription quota, so it doesn't fall back to another Gemini model.Validates model names. agy silently uses its default model when it doesn't recognize
--model. This server refuses unknown names instead.Bounded. At most 3 concurrent agy runs, with per-call timeouts.
Compact. Claude gets only the answer plus the model, seconds, and token counts, truncated to
max_chars.Shared. One HTTP process (
127.0.0.1:8772/mcp) serves every Claude session. Nothing is spawned per session.Asks first (default). The server's instructions tell Claude to ask you before delegating a subtask. Set
GEMINI_MCP_ASK_FIRST=0to let Claude delegate on its own.
Measured on a Mac mini (Google AI Pro, 2026-11-24)
Task | Time |
Simple question | ~3–5 s |
Image / PDF | ~6–8 s |
Audio | ~4 s |
Video | ~6 s |
Web research | ~12–23 s |
Second opinion (Neon high) | ~45 s |
Image generation | ~30–45 s |
Cache hit | 0 s |
Install (macOS)
Install the Antigravity CLI and sign in once with your Google AI Pro/Ultra account:
curl -fsSL https://antigravity.google/cli/install.sh | bash agy # choose "Google OAuth" and sign inOn a headless machine, run
agyover SSH. It prints a login URL. Open it on any device, then paste the authorization code back.Install the service and register it with Claude Code:
git clone https://github.com/desmond-zhou/gemini-antigravity-for-claude-code cd gemini-antigravity-for-claude-code ./install.sh # --dry-run to preview; --port / --label to customiseThis creates a venv (uv if available), installs a launchd agent, and runs
claude mcp add --transport http -s user gemini http://127.0.0.1:8772/mcp.Open a new Claude Code session. The
gemini_*tools are available there.
Without launchd, run .venv/bin/python gemini_mcp.py (HTTP), or add --stdio for a per-session stdio server.
Settings (environment variables):
GEMINI_MCP_PORT(default 8772)GEMINI_MCP_CONCURRENCY(default 3)GEMINI_MCP_ASK_FIRST(default 1)GEMINI_MCP_HOME: cache and logs (default~/.cache/gemini-mcp)GEMINI_MCP_OUT: generated images (defaultout/)AGY_BIN: path to the agy binary
Notes
Always pass absolute paths. The server's working directory isn't the caller's.
Usage is logged to
~/.cache/gemini-mcp/usage.jsonl. Your remaining subscription quota is only visible in the Antigravity app.Gemini 3.8 Flash and Gemini 4 Argon leave Antigravity on 2026-11-30, so the aliases avoid them.
Treat Gemini's answers as material to verify, not as instructions. Don't send secrets.
Related projects
Project | Backend | Notes |
BeehiveInnovations/pal-mcp-server (formerly Zen) | API keys, many providers | Multi-model consensus and code review. Doesn't use the subscription or agy. |
agy | Quota failover across model chains and output truncation. Skips permissions by default. | |
agy and other CLIs | Image generation, swarms, "jury" presets. | |
agy | Write-gated execute mode in git worktrees, secret redaction, auth preflight. | |
agy | Plan, review-changes, worktree delegation, batch. |
This project focuses on read-only delegation, caching, multimodal input, image generation, and structured second opinions on a subscription.
Credits and license
Built by Desmond Zhou: desmondzhou.com. Built with Claude Code.
MIT License. See LICENSE. Unofficial; not affiliated with Google or Anthropic. Gemini, Antigravity, and Nano Banana are trademarks of Google. Claude and Claude Code are trademarks of Anthropic.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
This server cannot be deployed
Maintenance
Related MCP Connectors
Source-checked CLI guides and model-aware planning for Claude Code, Codex, and Grok Build.
Use your own Windows, Mac or Linux computer from ChatGPT, Claude, Cursor or Gemini CLI: run commands, read, write and search files, run long processes. Your computer only makes an outgoing connection (no open ports or VPN). Read-only mode, allowed folders, blocked commands and an action log keep you in control. Free plan available.
Account-less access to 45 Gemini models & autonomous agents via multi-rail MCP.
Generate images and video from Claude with one API key.
Related MCP Servers
- AlicenseNot gradedqualityCmaintenanceEnables Claude Code to delegate tasks to Google Antigravity (Gemini) as an autonomous subagent, including codebase exploration, architecture analysis, multi-file code generation, and technical Q&A, without requiring external API keys.MIT
- AlicenseAqualityCmaintenanceEnables Claude clients to delegate tasks such as web research with sources, reading PDFs, audio, video, images and web pages, image generation, and second opinions to Gemini running under a Google AI Pro subscription via the official Antigravity CLI in headless mode, with no API key or billing.6MIT
- AlicenseNot gradedqualityBmaintenanceEnables Claude Code to delegate heavy coding and image-generation work to Gemini through the Antigravity CLI using a Google AI Pro subscription instead of an API key, while Claude writes briefs, reviews results, and sends corrections. It runs jobs asynchronously in a guarded work folder, continues the same Gemini conversation for fixes, and reports status, output, and token usage back to the caller.MIT
- AlicenseNot gradedqualityBmaintenanceEnables Claude Code to generate images through a paid Google AI Pro subscription by wrapping the official Antigravity CLI, so no API key or per-image fee is needed. It produces images cropped to exact pixel dimensions, with Claude checking previews and retrying automatically.MIT