{
  "markdown": "```text\n   ____ _                 _\n  / ___| | __ _ _   _  __| | ___\n | |   | |/ _` | | | |/ _` |/ _ \\\n | |___| | (_| | |_| | (_| |  __/\n  \\____|_|\\__,_|\\__,_|\\__,_|\\___|\n\n               |\n          +----+----+\n          |   MCP   | (- you are here\n          +----+----+\n               |\n\n     _          _   _                       _ _\n    / \\   _ __ | |_(_) __ _ _ __ __ ___   _(_) |_ _   _\n   / _ \\ | '_ \\| __| |/ _` | '__/ _` \\ \\ / / | __| | | |\n  / ___ \\| | | | |_| | (_| | | | (_| |\\ V /| | |_| |_| |\n /_/   \\_\\_| |_|\\__|_|\\__, |_|  \\__,_| \\_/ |_|\\__|\\__, |\n                      |___/                       |___/\n```\n\n<div align=\"center\">\n\n**Let Claude (or any MCP client) hand its heavy work to Google Antigravity's `agy` agent.**\n\n![npm](https://img.shields.io/npm/v/mcp-server-google-antigravity?logo=npm&color=cb3837)\n![MCP](https://img.shields.io/badge/MCP-server-8A63D2)\n![Node](https://img.shields.io/badge/Node-%E2%89%A518-339933?logo=node.js&logoColor=white)\n![Platforms](https://img.shields.io/badge/Runs%20on-macOS%20·%20Windows%20·%20Linux-2b90d9)\n![Agent](https://img.shields.io/badge/agent-Gemini%20(agy)-4285F4?logo=google&logoColor=white)\n![License](https://img.shields.io/badge/License-MIT-3da639)\n\n</div>\n\n---\n\n## What is this?\n\n**mcp-server-google-antigravity** is a small [MCP](https://modelcontextprotocol.io) (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.\n\nThe 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.\n\n```\n   Claude / Codex          this MCP server            Antigravity\n  +---------------+  tool  +----------------+ spawns  +--------------+\n  |  \"analyze the | -----> | use_antigravity| ------> | agy  --print |\n  |   whole repo\" |        | -> jobId(async)|         | (Gemini)     |\n  +---------------+ <----- +----------------+ <------ +--------------+\n        keeps working        polls result / logs        does the work\n```\n\n---\n\n## Requirements\n\n| Need | Why |\n|------|-----|\n| **Node.js 18+** | Runs this server (ships with `npx`/`npm`). Check: `node --version` |\n| **Antigravity CLI (`agy`)** | The agent this server drives. Install below. |\n| An **MCP client** | Claude Desktop, Claude Code, or anything that speaks MCP |\n\n---\n\n## Step 1 — Install the Antigravity CLI (`agy`)\n\n> Never used `agy` before? Start here. It's one command. First launch signs you in with Google.\n\n**macOS / Linux**\n```bash\ncurl -fsSL https://antigravity.google/cli/install.sh | bash\n```\n\n**Windows (PowerShell)**\n```powershell\nirm https://antigravity.google/cli/install.ps1 | iex\n```\n\n**Windows (CMD)**\n```cmd\ncurl -fsSL https://antigravity.google/cli/install.cmd -o install.cmd && install.cmd && del install.cmd\n```\n\n**Where it lands** (remember this — you may need it for `AGY_PATH` below):\n\n| OS | Default `agy` location |\n|----|------------------------|\n| macOS / Linux | `~/.local/bin/agy` |\n| Windows | `C:\\Users\\<you>\\AppData\\Local\\agy\\bin\\agy.exe` |\n\n**Sign in and verify:**\n```bash\nagy            # first run opens a Google Sign-In in your browser (creds cached in your OS keyring)\nagy --version  # should print a version, e.g. 1.1.1\nagy models     # lists the models you can use (Gemini 3.5 Flash, Gemini 3.1 Pro, ...)\n```\n\nIf `agy` isn't found afterwards, open a new terminal (so `PATH` reloads) or run `agy install` to fix shell paths.\n\n---\n\n## Step 2 — Get this MCP server\n\n**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.\n\nAlternatively, you can install the package globally:\n```bash\nnpm install -g mcp-server-google-antigravity\n```\nThis exposes the `mcp-server-google-antigravity` command (which you can register directly in your MCP client's config instead of `npx`).\n\n**Option B — from source** (for hacking on it):\n```bash\ngit clone https://github.com/TurkerYakup/mcp-server-google-antigravity.git\ncd mcp-server-google-antigravity\nnpm install\nnpm run check   # quick syntax check\n```\n\n> `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.\n\n---\n\n## Step 3 — Register it with your MCP client\n\n<details open>\n<summary><b>Claude Desktop</b></summary>\n\nEdit your `claude_desktop_config.json`:\n\n| OS | Config file |\n|----|-------------|\n| macOS | `~/Library/Application Support/Claude/claude_desktop_config.json` |\n| Windows | `%APPDATA%\\Claude\\claude_desktop_config.json` |\n| Linux | `~/.config/Claude/claude_desktop_config.json` |\n\n**Using npx (Option A) — recommended:**\n```json\n{\n  \"mcpServers\": {\n    \"antigravity\": {\n      \"command\": \"npx\",\n      \"args\": [\"-y\", \"mcp-server-google-antigravity\"],\n      \"env\": {\n        \"AGY_MODEL\": \"Gemini 3.5 Flash (Medium)\",\n        \"AGY_AUTO_APPROVE\": \"true\"\n      },\n      \"timeout\": 900000\n    }\n  }\n}\n```\n\n> **Windows note:** Electron (Claude Desktop) often can't spawn `npx` directly — if the server fails to start, wrap it in `cmd`: set `\"command\": \"cmd\"` and `\"args\": [\"/c\", \"npx\", \"-y\", \"mcp-server-google-antigravity\"]` (keep the same `env`/`timeout`).\n\n**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\"`.\n\nRestart the app fully after editing (quit from the tray/menu bar, not just close the window).\n</details>\n\n<details>\n<summary><b>Claude Code (CLI)</b> — works on macOS, Windows, Linux</summary>\n\n```bash\n# npx (Option A)\nclaude mcp add antigravity -- npx -y mcp-server-google-antigravity\n\n# from source (Option B)\nclaude mcp add antigravity -- node /absolute/path/to/mcp-server-google-antigravity/index.js\n```\n</details>\n\nThat's it. Your client now has tools like `use_antigravity`, `antigravity_continue`, and the filesystem helpers.\n\n---\n\n## Quick example\n\nAsk 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:\n\n1. `use_antigravity({ prompt: \"...\", add_dirs: [\"C:/Dev/Repos/foo\"] })` → returns `{ \"jobId\": \"mrib1q20_wa5ma1\", \"status\": \"running\" }` **instantly**.\n2. `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 (including `durationMs` and `bytes` telemetry).\n\nFollow 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.\n\n---\n\n## Configuration (environment variables)\n\nEverything is optional — sane defaults out of the box.\n\n| Var | Default | What it does |\n|-----|---------|--------------|\n| `AGY_PATH` | auto-detected | Full path to the `agy` binary. Only needed if it's not on `PATH`. On Windows the path is auto-collapsed to an 8.3 short path, so a non-ASCII username no longer breaks anything. |\n| `AGY_MODEL` | agy's default | Default model when a call omits `model`. Use the exact name from `agy models`, e.g. `Gemini 3.5 Flash (Medium)`. |\n| `AGY_AUTO_APPROVE` | `true` | Pass `--dangerously-skip-permissions` so headless jobs don't hang on a prompt. Set `false` for read-only. |\n| `AGY_SANDBOX` | `false` | Run every job with `--sandbox` (terminal-restricted). Cheap; safer for untrusted prompts. Per-call `sandbox` overrides. |\n| `AGY_PRINT_TIMEOUT` | `10m` | agy's `--print-timeout`. |\n| `AGY_HEARTBEAT_MS` | `15000` | Interval for the \"job running\" progress notification. `0` disables. |\n| `AGY_MODEL_TTL_MS` | `300000` | How long the cached `agy models` list is trusted. |\n\n---\n\n## Tools\n\n| Tool | What it does |\n|------|--------------|\n| `use_antigravity` | Delegate a task (async). Returns a `jobId` immediately. Params: `prompt`, `thinking_depth` (low/high), `add_dirs` (folders agy may read/write), `auto_approve`, `new_project`, `model`, `mode` (plan/accept-edits), `agent`, `project`, `sandbox`, `write_to_file`, `extract` (optional `\"last_code_block\"` to extract the last code block to the `extracted` field on the record). |\n| `antigravity_continue` | Continue the previous conversation (or a specific `conversation_id`) with a new prompt. |\n| `antigravity_result` | Get a job's result by `jobId`. Supports long-polling via optional `wait_ms` and `poll_interval_ms`. While running, returns a lean payload (`{ status, jobId, chars, tail, startedAt }`). On done/error, returns full record (including `durationMs` and `bytes` telemetry). |\n| `antigravity_jobs` | List recent jobs and statuses. |\n| `antigravity_cancel` | Kill a running job by `jobId`. |\n| `antigravity_cleanup` | Delete old job files by age (`older_than_hours`). |\n| `antigravity_create_folder` | Create a folder (recursive), done directly by the server. |\n| `antigravity_create_file` | Create/write a text file (creates parent dirs); `overwrite:false` to protect existing. |\n| `antigravity_create_tree` | Build a whole folder/file tree from a JSON spec. |\n| `antigravity_read_file` | Read a UTF-8 text file (instant); optional `max_bytes` cap. |\n| `antigravity_list_dir` | List a folder's entries. |\n| `antigravity_models` | List available models (`agy models`). |\n| `antigravity_agents` | List available agent profiles (`agy agents`). |\n| `antigravity_health` | Check that `agy` is reachable + report effective defaults. **Run this first when something's off.** |\n\nThe server-side filesystem tools use Node's `fs` directly — instant, and never gated by a permission prompt.\n\n---\n\n## Live progress notifications\n\nBecause jobs return a `jobId` immediately, the server pushes MCP **logging notifications** (`notifications/message`, logger `antigravity`) so the client can see activity without polling:\n\n- `job started` — jobId, kind, prompt snippet\n- `job running` — heartbeat every `AGY_HEARTBEAT_MS` (default 15s) with a tail of the current partial output\n- `job done` / `job failed` — final status, byte count / error\n\nBest-effort: if the client didn't negotiate the `logging` capability they're silently dropped. Polling `antigravity_result` works either way.\n\n---\n\n## How it works (design notes)\n\nThe `agy` CLI runs a single prompt with `agy --print \"<prompt>\"` and returns when done. Three problems and their fixes:\n\n1. **MCP client request timeout (~60s).** Long tasks made the client give up even though `agy` kept running. → **Async job pattern:** `use_antigravity` spawns `agy` in the background, returns a `jobId` instantly, writes the result to a JSON file in the OS temp dir (`agy_jobs/`), and the client polls `antigravity_result`. Optional long-polling (`wait_ms`) lets clients wait inside the request when short runs are expected. No request ever blocks.\n2. **agy's own print timeout (default 5m).** Heavy prompts hit `timeout waiting for response`. → every job passes `--print-timeout 10m`.\n3. **Headless file-permission gate.** In `--print` mode agy's file-writes get denied by the \"ask\" policy and the job hangs. → `auto_approve` (default true) passes `--dangerously-skip-permissions`; `add_dirs` passes `--add-dir <path>` for the workspace it needs.\n\n---\n\n## Security note\n\n`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.\n\n---\n\n## Platform support\n\nFully 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).\n\n---\n\n## Troubleshooting\n\n| Symptom | Fix |\n|---------|-----|\n| `agy not found` / server won't start | Open a **new** terminal so `PATH` reloads, or run `agy install`. Still stuck? Set `AGY_PATH` to the full binary path (Step 1 table). The `antigravity_health` tool confirms whether the server sees `agy`. |\n| Job stays `running` forever | agy is probably waiting on a permission prompt. Keep `auto_approve` at its default `true` (headless mode hangs otherwise). Watch progress via `antigravity_jobs` or the job's `partial` field. |\n| `Model '...' was not found` warning | Advisory only — the job still runs. Use the **exact** name from `antigravity_models` (they contain spaces, e.g. `Gemini 3.5 Flash (Medium)`). |\n| Windows: path breaks on a non-ASCII username | Handled automatically — the server resolves `agy` to its 8.3 short path. No action needed. |\n| First run wants you to sign in | Run `agy` once in a terminal to finish the Google Sign-In; credentials are then cached in your OS keyring. |\n| Client reports \"tool timed out\" | Raise the client's own `timeout` (e.g. `900000` ms in Claude Desktop). Jobs are async so the call returns instantly, but some clients still enforce a ceiling. |\n\n---\n\n## License\n\nMIT © Türker Yakup Altınsoy.\n",
  "bytes": 13939,
  "sha": "e1c7be1fc94509c5c1599ae579d54abd6df6917a77e5dfdd69bcfce4458c5552",
  "repo_slug": "turkeryakup/mcp-server-google-antigravity",
  "fonte": "repo",
  "truncated": false,
  "api": "https://agentalog.com/api/listings/mcp_io_github_turkeryakup_mcp_server_google__db83c491/readme"
}