null-g-mcp — MCP Server for Google Antigravity IDE
Full programmatic access to Google's Antigravity AI IDE through the Model Context Protocol. Connect Claude Code, Cursor, VS Code Copilot, or any MCP-compatible agent to Antigravity's local language server — 85 tools across 12 modules.
What is this?
Google Antigravity is Google's AI-powered IDE (a VS Code fork) that runs a local language server exposing a rich set of AI and development capabilities via ConnectRPC over localhost.
null-g-mcp is a Model Context Protocol (MCP) server that bridges that local language server API to any MCP-compatible AI client. It auto-discovers running Antigravity instances — no manual port configuration required.
┌──────────────────┐ stdio / MCP ┌──────────────┐ HTTP/ConnectRPC ┌────────────────────────┐
│ AI IDE / Agent │◄───────────────►│ null-g-mcp │◄───────────────────►│ Antigravity Language │
│ (Claude Code, │ JSON-RPC 2.0 │ (this repo) │ localhost only │ Server (Go binary) │
│ Cursor, etc.) │ │ │ │ │
└──────────────────┘ └──────────────┘ └────────────────────────┘
Key characteristics:
- All traffic stays on
127.0.0.1— no external network access - CSRF tokens are extracted automatically from the running process
- Works alongside Claude Code, Cursor, VS Code Copilot, Codex CLI, OpenCode, and custom agents
- Editor-dependent tools (Terminal, Browser, Code) gracefully degrade in standalone mode
Requirements
- Node.js ≥ 22
- Google Antigravity IDE installed and running with at least one workspace open
- macOS (auto-discovery uses
ps auxto find the running language server process)
Installation
# Clone and install dependencies
git clone https://github.com/cristianoaredes/null-g-mcp.git
cd null-g-mcp
npm install
# Build the TypeScript source
npm run build
# Optional: install globally for cleaner MCP configs
npm install -g .
Configuration
Claude Code CLI
Add to ~/.claude.json:
{
"mcpServers": {
"antigravity": {
"command": "antigravity-mcp",
"args": []
}
}
}
One-liner to inject automatically:
jq '.mcpServers.antigravity = {"command":"antigravity-mcp","args":[]}' \
~/.claude.json > tmp.json && mv tmp.json ~/.claude.json
Claude Desktop
Add to ~/Library/Application Support/Claude/claude_desktop_config.json:
{
"mcpServers": {
"antigravity": {
"command": "antigravity-mcp",
"args": []
}
}
}
VS Code Copilot
Add to VS Code settings.json:
{
"mcp": {
"servers": {
"antigravity": {
"command": "antigravity-mcp",
"args": []
}
}
}
}
If you did not install globally, replace
"antigravity-mcp"with"node"and add the path todist/index.jsin theargsarray.
Environment Variables
Override auto-discovery when needed (e.g., multiple Antigravity instances running):
Manual override example:
ANTIGRAVITY_PORT=49915 ANTIGRAVITY_CSRF_TOKEN=your_token antigravity-mcp
Usage Examples
Simple one-shot chat
Tool: cascade_chat
Args: { "message": "Explain async/await in TypeScript" }
Multi-turn conversation
1. cascade_start → returns cascadeId
2. cascade_send(cascadeId, "Build a REST API in Go")
3. cascade_get_response(cascadeId) → first response
4. cascade_send(cascadeId, "Add JWT authentication")
5. cascade_get_response(cascadeId) → follow-up response
Choose a specific model
Tool: cascade_chat
Args: {
"message": "Review this code for security issues",
"model": "MODEL_PLACEHOLDER_M35"
}
→ Uses Claude Sonnet 4.6 Thinking instead of the default Gemini model
Agentic mode (file edits + terminal + browser)
Tool: cascade_chat
Args: {
"message": "Create a React todo app with TypeScript",
"agentic_mode": true
}
→ The model can edit files, run terminal commands, and use the browser
Generate an AI-powered commit message
Tool: workspace_commit_message
→ Reads staged git changes and returns a suggested commit message
Available Tools (85)
Tools are organized across 12 modules. Editor-dependent tools (marked with *) return a graceful error message when the Antigravity VS Code extension is not active.
Supported Models
The enum values like
MODEL_PLACEHOLDER_M37are the stable RPC identifiers required by the Antigravity backend — they are not placeholders.
How It Works
Auto-Discovery
On startup, null-g-mcp:
- Runs
ps auxand findslanguage_serverprocesses belonging to Antigravity - Extracts the CSRF token and extension server port from process arguments
- Port-scans
extensionPort+1throughextensionPort+20in parallel to find the active language server - Verifies the connection with a
GetUserStatuscall
Communication Protocol
Project Structure
null-g-mcp/
├── src/
│ ├── index.ts # Entry point: discovery → client → MCP server
│ ├── server.ts # MCP server setup and tool registration
│ ├── client/
│ │ ├── antigravity-client.ts # HTTP client for the language server
│ │ ├── discovery.ts # Auto-discover running instances via ps aux
│ │ └── types.ts # TypeScript interfaces for the API
│ ├── tools/ # 12 modules, 85 tools
│ └── utils/
│ ├── polling.ts # Response polling with exponential backoff
│ ├── errors.ts # Shared error handling
│ └── cert.ts # TLS certificate resolution
├── package.json
├── tsconfig.json
├── tsup.config.ts
└── cert.pem # Bundled TLS certificate
Development
npm install # Install dependencies
npm run dev # Watch mode (tsx --watch)
npm run build # Production build (tsup)
npm run typecheck # Type check without emitting
Adding a Tool
// src/tools/my-tools.ts
import { McpServer } from "@modelcontextprotocol/sdk/server/mcp.js";
import { z } from "zod";
import type { AntigravityClient } from "../client/antigravity-client.js";
import { handleToolError } from "../utils/errors.js";
export function registerMyTools(server: McpServer, client: AntigravityClient): void {
server.tool(
"my_tool",
"What this tool does",
{ param: z.string().describe("Parameter description") },
async ({ param }) => {
try {
const data = await client.call("RpcMethodName", { param });
return { content: [{ type: "text", text: JSON.stringify(data, null, 2) }] };
} catch (error) {
return handleToolError(error);
}
},
);
}
Register the new function in src/server.ts.
Troubleshooting
Security
- All communication is localhost only (
127.0.0.1) — no data leaves the machine - CSRF tokens are per-session and read from the running process, never stored on disk
- No external network access is required or performed
- A self-signed TLS certificate is bundled for convenience
License
MIT — see LICENSE for details.