antigravity-gemini-mcp
Provides tools to inspect local Git repository status and diffs for review workflows.
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.
antigravity-gemini-mcp
日本語版 README はこちら (Japanese Guide)
Disclaimer: Unofficial community tool. Not affiliated with, endorsed by, or sponsored by Google.
A zero-dependency local Model Context Protocol (MCP) server (Streamable HTTP + OAuth 2.1) that connects Gemini (Web / Mobile / Antigravity.app built-in browser) to your local workspace so you can offload planning, code review, and test verification to Gemini (separate quota) while keeping implementation in Antigravity.app.
Workflow at a Glance
Plan in Gemini — Gemini reads your local repo (and even your current Antigravity conversation context via
read_antigravity_session) and writes.gemini-collab/PLAN.md.Implement in Antigravity.app — Antigravity implements directly from
PLAN.mdwithout burning tokens on broad exploration.Review & Test in Gemini — Gemini inspects
git_diff, runsrun_tests, and writes.gemini-collab/REVIEW.md.
Related MCP server: agy-nexus-mcp
Features
Zero npm dependencies, zero build step (Node.js 20+ standard modules only; works on macOS / Linux / Windows)
Gemini Custom MCP ready:
Streamable HTTP (
/mcp)OAuth 2.1 with PKCE (
S256), Discovery (/.well-known/oauth-protected-resource,/.well-known/oauth-authorization-server), Dynamic Client Registration (/oauth/register)Preserves long OAuth
stateparameters (>2,000 chars)Also supports static Bearer token (
Authorization: Bearer <AUTH_SECRET>)
10 safe planning, context & QA tools (source code files are never edited by Gemini):
Exploration & planning:
list_projects,list_files,read_file,search_code,write_plan_file(.md/.txtonly)Review & testing:
git_status,git_diff,run_testsAntigravity context sharing:
list_antigravity_sessions,read_antigravity_session(sanitized user/assistant turns only)
Step-by-Step Setup
Option 0 — Zero-Effort Setup (Let Antigravity Do Everything)
Paste this prompt into Antigravity (or your coding agent):
Clone https://github.com/tamekuniz/antigravity-gemini-mcp into my projects folder, configure .env with ALLOWED_ROOTS set to my projects parent directory, install the skills (/gemini, /relay, gemini-collab) into ~/.agents/skills/, start the daemon (`npm run daemon:install` on macOS or `npm run tunnel`), and open https://gemini.google.com/customize/connectors in my regular browser while showing me the Public MCP URL and AUTH_SECRET to paste.Prerequisites
Node.js 20+
cloudflared (for HTTPS tunnel):
brew install cloudflaredon macOS (or install from Cloudflare)
1. Clone & Configure
git clone https://github.com/tamekuniz/antigravity-gemini-mcp.git
cd antigravity-gemini-mcp
cp .env.example .envEdit .env and set ALLOWED_ROOTS to the parent directory of your projects (comma-separated).
2. Start the Server + HTTPS Tunnel
Option A — Auto-start on login (macOS LaunchAgent, recommended):
npm run daemon:install # starts background server + Cloudflare Quick Tunnel
npm run status # prints Public MCP URL and AUTH_SECRETOption B — Foreground run (macOS / Linux):
npm run tunnelOption C — Server only (any OS, including Windows):
npm start
# Then expose http://127.0.0.1:8787 over HTTPS with your preferred tunnelNote the two values shown by npm run status (or startup logs):
Public MCP URL:
https://<random-host>.trycloudflare.com/mcpAUTH_SECRET: auto-generated and saved in
.state/auth_secret
3. Register in Gemini (Important: Use a Regular Browser First!)
Important: Do the first-time registration in a regular browser (Chrome / Safari / Edge) rather than Antigravity.app's built-in browser. Inside an embedded WebView, Google's account-linking iframe can fail with a
401due to third-party cookie restrictions. Once registered in Chrome, it syncs automatically to your Google account and immediately works inside Antigravity.app's built-in browser!
Open
https://gemini.google.com/customize/connectorsin your regular browser.Make sure you are signed in with the same Google account you use in Antigravity.app's built-in browser.
Click
+ Custom(Japanese UI:+ カスタム).Enter your Public MCP URL (
https://.../mcp).Leave Client ID and Client Secret blank (handled automatically via Dynamic Client Registration).
Click Next and accept Gemini's custom connector confirmation.
On the
antigravity-gemini-mcpauthorization page, paste yourAUTH_SECRETand approve.Confirm
Antigravity Gemini Mcpappears under Custom apps.
4. Verify in Gemini (Built-in Browser or Web)
Reload Gemini (if already open in Antigravity.app's built-in browser), open a new chat, and run:
@Antigravity Gemini Mcp list_projectsIf Gemini lists your local project folders, you are connected!
5. Install Antigravity Skills (/relay, /gemini, gemini-collab)
mkdir -p ~/.agents/skills/gemini-collab ~/.agents/skills/relay ~/.agents/skills/gemini
cp skill/gemini-collab/SKILL.md ~/.agents/skills/gemini-collab/SKILL.md
cp skill/relay/SKILL.md ~/.agents/skills/relay/SKILL.md
cp skill/gemini/SKILL.md ~/.agents/skills/gemini/SKILL.mdNow in Antigravity.app chat you can use:
/gemini <task>or/relay <task>— Full plan → implement → test relayCopy any error log / spec and run
/geminior/relay— Relays clipboard content to Gemini/gemini reviewor/relay review— Asks Gemini to inspectgit_diffand runrun_tests/gemini applyor/relay apply— Implements the latestPLAN.md/REVIEW.mdin Antigravity.app
Troubleshooting
Google shows
401during account linking in Antigravity's built-in browser: Complete the initial connector registration in Chrome/Safari instead, then reload the built-in browser.Registered in Chrome, but not visible in Antigravity's built-in browser: Verify both browsers are signed into the exact same Google account (bottom-left profile icon in Gemini).
Quick Tunnel URL changes after reboot: Run
npm run statusto check the new URL, or set up a free Cloudflare Named Tunnel and putCLOUDFLARED_TUNNEL_TOKEN+PUBLIC_BASE_URLin.envfor a permanent URL.
Security Notes
Directory Sandboxing: All file and git operations resolve symlinks and reject any path outside
ALLOWED_ROOTS.Plan File Guard:
write_plan_fileonly allows.mdand.txtfiles.Command Execution (
run_tests): Runs shell commands insideALLOWED_ROOTS. KeepAUTH_SECRETprivate, avoid untrusted repositories (prompt injection risk), and optionally restrict commands withALLOWED_TEST_PREFIXESin.env.Antigravity Transcripts:
read_antigravity_sessionextracts only sanitized user/assistant messages (omitting raw tool outputs and thinking). SetALLOW_ANTIGRAVITY_SESSIONS=falsein.envto disable it.Local Secrets:
.env,.state/auth_secret, and.state/oauth_store.jsonare gitignored. Never commit them.
Self-Test
npm testLicense
MIT
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
Related MCP Connectors
Read, search, edit, commit and run approved commands in projects on your own Mac or Linux computers.
Query, browse, and automate OmegaAI workspaces from any MCP client. Streamable HTTP with OAuth 2.0.
Connect AI assistants to your Mac and Linux computers with scoped access to local files and tools.
Securely control computers you explicitly pair through files, terminals, processes, screenshots, desktop UI/input, clipboard, browser automation, diagnostics, and document tools.
Related MCP Servers
- AlicenseNot gradedqualityCmaintenanceExposes a secure OAuth2 + SSE Model Context Protocol endpoint that lets Gemini Web read a local project's files, directory trees, search results, git status/diffs, and workspace info on a read-only basis. It also pairs the browser-side automation with a local bridge daemon so prompts and answers flow both ways between Gemini Web and Google Antigravity.2MIT
- AlicenseNot gradedqualityBmaintenanceEnables Google Gemini on web or mobile to connect to a local Antigravity IDE/CLI workstation, letting users browse and manage coding sessions, inspect paused approvals, search and read repository files, audit git changes, send handoffs that resume the right project chat, and view ASCII usage telemetry or a live web dashboard.12AGPL 3.0
- AlicenseNot gradedqualityCmaintenanceEnables Gemini App to securely browse, search, read, edit, and run commands in selected local Windows workspaces through GitHub OAuth-protected access.MIT
- AlicenseNot gradedqualityCmaintenanceEnables Gemini for Mac and Antigravity CLI to use Computer Use tools for controlling macOS apps and browsers through a loopback HTTP-to-stdio bridge with bearer-token authentication. It avoids requiring sandbox disabling or app patching.4MIT