Skip to content

Antigravity

@ask-llm/antigravity-mcpexperimental default gemini-3.1-pro → fallback gemini-3.5-flash · effort high

Bridge Claude with Google's Antigravity CLI (agy), Google's successor to Gemini CLI. Get a subscription-backed second opinion or code review using your Google AI Pro/Ultra plan, without per-token API billing.

Best for: a subscription-backed second opinion if you have a Google AI Pro/Ultra plan, and larger-context reads. The Google-sanctioned successor to Gemini CLI. Not for: fine-grained per-edit automation; it's one-shot and experimental. For continuous review, use Codex via codex-pair.

Experimental

Requires agy ≥ 1.1.5. Unified discovery, doctor, and ping report older or unparseable installations as detected but unusable and exclude them from dispatch; the executor repeats the version check before every model invocation. It reads the headless -p response from stdout, with an edge-case fallback to agy's transcript files that is sensitive to agy's on-disk layout. Single-turn only (no multi-turn); defaults to the gemini-3.1-pro model at high reasoning effort, falling back to gemini-3.5-flash on a rate limit.

Installation

1. Provider CLI

# install agy >=1.1.5 from https://antigravity.google, then log in once

2. Register the MCP server (Claude Code shown; see Quick Start for other clients)

claude mcp add --scope user antigravity -- npx -y @ask-llm/antigravity-mcp

Or install globally: npm install -g @ask-llm/antigravity-mcp

Prerequisites

  1. Node.js v20.0.0 or higher
  2. Antigravity CLI (agy) version 1.1.5 or newer installed and logged in once: verify with agy --version, then run agy interactively to complete the Google Sign-In before using the MCP server

Tools

ToolPurpose
ask-antigravitySend a prompt to agy for a second opinion / code review. Optional includeDirs maps to agy --add-dir for monorepo context
get-usage-statsPer-session token totals (in-memory)
pingConnection test; reports whether agy is supported, unsupported, unusable, or missing

ask-antigravity returns both human-readable text and a structured AskResponse (provider, response, model, sessionId, usage) via MCP outputSchema.

Models

gemini-3.1-pro (high)quota / rate limitgemini-3.5-flash (high)
When the default model hits quota, the executor retries once on the fallback and reports the actual model used in the response.
  • Default: gemini-3.1-pro, passed to agy via --model, at high reasoning effort via --effort (agy ≥ 1.1.5 splits the effort tier out of the model name)
  • Rate-limit fallback: gemini-3.5-flash, retried once on a rate limit
  • Model-unavailable recovery: if agy rejects a model whose value equals one of the built-in base slugs (upstream drift), the executor retries once without a model and lets agy pick its default; any other rejected model fails with an actionable error pointing at agy models
  • Overrides: ASK_ANTIGRAVITY_MODEL and ASK_ANTIGRAVITY_EFFORT (run agy models for the full list of kebab-case slugs, e.g. claude-sonnet-4-6). Legacy effort-carrying display strings like Gemini 3.1 Pro (High) are compatibility-only pins that still resolve; the default effort is only sent when the model value equals one of the built-in base slugs, because agy rejects --effort next to an effort-carrying name

How it works

Provider discovery runs agy --version and only makes Antigravity available to default or multi-provider dispatch when version 1.1.5 or newer is confirmed. Older versions remain visible as detected but unsupported, while an unparseable output or failed version probe is reported as detected but unusable; doctor and ping include the actual version when known, the required minimum, and an upgrade action. The executor repeats the same support check before each request, then uses a stdout-first source chain: structured JSON → transcript file → plain stdout. The transcript fallback reads the complete transcript_full.jsonl under ~/.gemini/antigravity-cli/brain/<id>/.system_generated/logs/. Calls are serialized in-process (concurrent agy runs race on shared state files). It runs with a read-only prompt preamble plus --dangerously-skip-permissions + --sandbox so agy never hangs on approval prompts.

Config

Env varDefaultPurpose
ASK_ANTIGRAVITY_TIMEOUT_MS300000Process timeout (5 minutes)
ASK_ANTIGRAVITY_SANDBOXonSet 0 to drop agy's --sandbox flag if it blocks --add-dir context reads
ASK_ANTIGRAVITY_MODELgemini-3.1-proagy model passed via --model; on a rate limit the executor retries once on gemini-3.5-flash (run agy models for the list of kebab-case slugs, e.g. claude-sonnet-4-6; legacy display strings like Gemini 3.1 Pro (High) still resolve as compatibility-only pins)
ASK_ANTIGRAVITY_EFFORThighagy reasoning effort passed via --effort (low | medium | high). The default is paired with the built-in base slugs and with model-less recovery attempts; an explicit value is always passed — note agy limits tiers per model (e.g. gemini-3.1-pro has no medium). Invalid values warn and fall back to the default behavior

Limitations

  • Experimental: the transcript fallback is sensitive to changes in agy's on-disk format.
  • Minimum version: agy 1.1.5; older or unverifiable installations are reported but excluded from dispatch.
  • Single-turn: no multi-turn sessions (no capturable conversation id, antigravity-cli #7). Model selection is supported via --model (defaults to gemini-3.1-pro at high effort, with a gemini-3.5-flash rate-limit fallback; see Config); only the short -m flag hangs under -p.
  • Interactive auth: requires an agy login, so it isn't suited to headless CI.

npm

Released under the MIT License.