Skip to main content
Glama

Antigravity MCP Server

License: MIT Python 3.10+ MCP

Bridge a local Google Antigravity subscription to MCP coding agents — Cursor, Claude Code, Codex, and any other MCP client. No extra API bill. The call stays on your machine, on the session Antigravity already authenticated.

Antigravity must be installed, signed in, and running before the server starts. This project is not affiliated with Google.

What you get

  • Existing subscription. The server talks to the local Antigravity language server. It does not mint a separate API key.

  • Multi-turn memory. Each reply ends with a session id. Pass it back as conversation_id.

  • Full replies. Long answers are read from transcript_full.jsonl, not the truncated compact log.

  • Remote hosts. An SSH RemoteForward lets a Linux dev machine reach the Mac server. Nothing extra is installed on the remote side.

Related MCP server: supergravity-mcp

How a request moves

Every call takes the same last two steps. Only the first step changes, depending on where the agent is running.

  1. The agent sends your prompt to server.py.

  2. server.py hands it to the Antigravity app already open on your Mac.

  3. Antigravity uses that signed-in session to reach Gemini, and the answer comes back.

Agent on the same Mac. Cursor, Claude Code, or Codex starts server.py itself. Nothing listens on a port.

Agent on a remote machine. Start server.py --sse on the Mac first. It listens at http://127.0.0.1:8999/sse. An SSH RemoteForward makes that same address work on the remote machine. The remote agent never talks to Gemini directly.

flowchart TB
  mac["Cursor, Claude Code, or Codex on the Mac"] --> server["server.py"]
  remote["Agent on a remote machine"] --> tunnel["SSH forwards port 8999"]
  tunnel --> server
  server --> app["Antigravity app on the Mac"]
  app --> gemini["Gemini"]

Install

Requires macOS, Python 3.10+, and the Antigravity app open.

git clone https://github.com/qiansexingqiu/antigravity-mcp.git
cd antigravity-mcp

python3 -m venv .venv
source .venv/bin/activate
pip install -r requirements.txt

Print the two absolute paths the configs below expect. ~ is not expanded in most MCP command fields, so paste these values as-is.

echo "python  $(pwd)/.venv/bin/python"
echo "server  $(pwd)/server.py"

Connect a client

Replace both /ABS/PATH values with the paths printed above. Start Antigravity first, then reload the client.

Cursor

~/.cursor/mcp.json

{
  "mcpServers": {
    "antigravity": {
      "command": "/ABS/PATH/.venv/bin/python",
      "args": ["/ABS/PATH/server.py"]
    }
  }
}

Reload the window: Command Palette → Developer: Reload Window. The tool name is ask_antigravity.

Claude Code

User scope, available in every project:

claude mcp add --scope user --transport stdio antigravity -- \
  /ABS/PATH/.venv/bin/python \
  /ABS/PATH/server.py

The same entry, if you edit .mcp.json (this project) or ~/.claude.json (all projects) by hand:

{
  "mcpServers": {
    "antigravity": {
      "type": "stdio",
      "command": "/ABS/PATH/.venv/bin/python",
      "args": ["/ABS/PATH/server.py"]
    }
  }
}

Codex

codex mcp add antigravity -- \
  /ABS/PATH/.venv/bin/python \
  /ABS/PATH/server.py

Or add this to ~/.codex/config.toml:

[mcp_servers.antigravity]
command = "/ABS/PATH/.venv/bin/python"
args = ["/ABS/PATH/server.py"]

Remote SSH

Use this when the agent runs on another machine and Antigravity stays on the Mac. Codex's HTTP MCP setting is streamable HTTP, not this server's SSE endpoint, so the remote example below is for Cursor and Claude Code.

1. On the Mac, leave Antigravity open and start the SSE server. It listens only on loopback: http://127.0.0.1:8999/sse.

cd /ABS/PATH
.venv/bin/python server.py --sse --port=8999

2. On the Mac, add a reverse forward to ~/.ssh/config, then reconnect:

Host dev-server
  HostName 203.0.113.10
  User ubuntu
  RemoteForward 8999 127.0.0.1:8999

3. On the remote machine, point the client at the forwarded port.

Cursor, ~/.cursor/mcp.json:

{
  "mcpServers": {
    "antigravity": {
      "url": "http://127.0.0.1:8999/sse"
    }
  }
}

Claude Code, .mcp.json or ~/.claude.json:

{
  "mcpServers": {
    "antigravity": {
      "type": "sse",
      "url": "http://127.0.0.1:8999/sse"
    }
  }
}

Tool: ask_antigravity

Parameter

Type

Default

Meaning

prompt

string

required

The question or code to send.

model

flash | pro | flash_lite

flash

flash is the fast default. pro is for longer reasoning.

conversation_id

string

omitted

Session id from an earlier reply. Omit it to start a new conversation.

Ask for it by name. A first turn:

Use ask_antigravity with model flash.

Design a high-throughput micro-batching buffer in Python asyncio
with graceful shutdown.

The reply ends with a session id. A follow-up in the same conversation:

Use ask_antigravity.
conversation_id: 13278f76-619d-48dd-bf7a-14114c41146c

How should this buffer apply backpressure if the downstream flush fails?
Keep the answer to a few lines of code.

License

MIT

Related MCP Connectors

Related MCP Servers

  • A
    license
    Not graded
    quality
    B
    maintenance
    Antigravity Link is an MCP server and mobile companion for Google's Antigravity IDE. It captures live snapshots of the Antigravity chat UI via Chrome DevTools Protocol and serves them to a mobile web client. From your phone you can send messages, upload files, stop AI generation, switch instances, and read task/walkthrough/plan documents. Exposes 9 MCP tools and a full OpenAPI 3.1 spec.
    25 npm
    213
    MIT
  • F
    license
    Not graded
    quality
    C
    maintenance
    Enables local AI agents to generate code and interact with Google Antigravity (Gemini Pro) via MCP, consuming zero API tokens.
    -
  • A
    license
    Not graded
    quality
    C
    maintenance
    This MCP server bridges Codex to Antigravity CLI, allowing Codex to delegate coding tasks (e.g., code modification, testing, and fixing) to Antigravity within specified project directories.
    MIT