Skip to content

Antigravity ​

@ask-llm/antigravity-mcpexperimental default gemini-3.1-pro → fallback gemini-3.8-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 --live, 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. For default doctor, see Quota diagnostics. It reads the headless -p response from agy's --output-format json stdout (supported across the whole ≥ 1.1.5 range). Single-turn only (no multi-turn); defaults to the gemini-3.1-pro model at high reasoning effort, falling back to gemini-3.8-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 v24.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. Token usage — including cached and thinking tokens when agy reports them — comes from the JSON envelope's usage object (cache_read_tokens requires agy ≥ 1.1.7).

Quota diagnostics ​

ask-llm doctor --live also reports Antigravity's remaining quota and reset times via the sandboxed /quota built-in on agy 1.2.13 or newer. The detected agy version appears next to the quota result. Older or unparseable versions skip the quota check with a plain minimum-version line; failures and a five-second timeout are warnings and leave other diagnostics running. The quota probe needs no unisolated-execution opt-in and always uses --sandbox. The flag still permits minimal model calls to ready, permitted providers, including Antigravity when opted in, which may spend quota. Without --live, doctor starts no agy process, including provider and host version probes; it locates the executable and reads local configuration, leaving the version unchecked.

Models ​

gemini-3.1-pro (high)quota / rate limitgemini-3.8-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.8-flash, retried once on a rate limit
  • Quota diagnostics: when a rate limit exhausts the available model attempts, agy ≥ 1.1.11 adds remaining quota percentages and reset times to the error when its /quota probe succeeds; a failed probe leaves the usual rate-limit error
  • 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. Ping includes the actual version when known, the required minimum, and an upgrade action; doctor behavior is described in Quota diagnostics. Execution is refused before the executor version probe unless ASK_ANTIGRAVITY_ALLOW_UNISOLATED=1. Under that explicit opt-in, the executor warns that read-only isolation is not guaranteed: agy may modify files, run shell commands, and access the network. The executor then repeats the support check and invokes agy -p … --output-format json and reads the answer from the terminal JSON object's response key on stdout (a source chain of structured JSON → plain stdout only when the output does not look like JSON → an actionable no-output error). --print-timeout is set 5s below ASK_ANTIGRAVITY_TIMEOUT_MS so agy expires first. On agy ≥ 1.1.28 that expiry is exit 0 with a truncated answer and a stderr warning; the executor fails closed and names the timeout env var instead of returning the partial as complete. On agy ≥ 1.1.9 it also passes --disable-slash-commands so prompt text can never expand as a slash command or skill (older versions reject the flag, so it is version-gated). If the JSON envelope includes denied_actions (agy ≥ 1.1.27), a complete answer gets a notice naming the refused actions. Concurrent calls need no serialization — each process's answer arrives on its own stdout. Opted-in runs retain the read-only prompt preamble and sandbox settings as best effort, without --dangerously-skip-permissions; machine runs also retain --mode plan, which was observed ineffective on agy 1.2.12. None of these settings guarantees isolation.

Claude Code's /brainstorm uses a separate raw agy call. Without the exact opt-in value 1, it skips Antigravity and discloses the reason in its synthesis. With opt-in, it warns that read-only isolation is not guaranteed and runs without --dangerously-skip-permissions. Its raw path fixes the model, effort, and --sandbox flag; it does not inherit the executor's version check, timeout handling, model fallback, or the model, effort, and sandbox overrides below.

Config ​

Env varDefaultPurpose
ASK_ANTIGRAVITY_TIMEOUT_MS300000Process timeout (5 minutes). agy --print-timeout is set 5s below this so agy expires first. On agy ≥ 1.1.28 a mid-turn expiry is a truncated-answer error, not a complete response.
ASK_ANTIGRAVITY_ALLOW_UNISOLATEDunsetOnly the exact value 1 permits unisolated review/tool, read-only machine, and /brainstorm raw agy execution
ASK_ANTIGRAVITY_SANDBOXonSet 0 to drop --sandbox from review calls if it blocks --add-dir context reads; the /quota diagnostic probe always uses --sandbox
ASK_ANTIGRAVITY_MODELgemini-3.1-proagy model passed via --model; on a rate limit the executor retries once on gemini-3.8-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 structured-output contract tracks agy's JSON envelope; JSON-looking output that is corrupt or lacks an answer fails with an actionable error instead of surfacing raw JSON fragments.
  • Minimum version: agy 1.1.5; older or unverifiable installations are reported but excluded from dispatch.
  • Single-turn: no multi-turn sessions yet; the executor accepts and ignores sessionId (headless resume via agy's JSON conversation_id is tracked as follow-up work). Model selection is supported via --model (defaults to gemini-3.1-pro at high effort, with a gemini-3.8-flash rate-limit fallback; see Config); only the short -m flag hangs under -p.
  • Timeouts: on agy ≥ 1.1.28, --print-timeout expiry exits 0 with a partial JSON answer; Ask LLM fails closed and asks you to raise ASK_ANTIGRAVITY_TIMEOUT_MS or shorten the prompt. Older agy still reports that expiry as a non-zero error.

npm ​

Released under the MIT License.