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?
MCP server for controlling Google Antigravity IDE — 87 tools via ConnectRPC to the local language server
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 aux to 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 .
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.
Tool
Description
cascade_chat
Send a message and get a complete response (start + send + poll in one call)
cascade_start
Start a new conversation session, returns cascadeId
cascade_send
Send a message to an existing session
cascade_get_response
Poll for the AI response with backoff
cascade_cancel
Cancel a running generation
Tool
Description
models_list
List all available AI models with capabilities and tier requirements
models_status
Real-time model availability and degradation status
model_set_default
Set the persistent default model (lastSelectedCascadeModel)
user_status
Account info: name, email, plan tier, available credits
server_status
Language server health check (Heartbeat)
Tool
Description
trajectory_list
List past conversations
trajectory_get
Get a full conversation by ID
trajectory_steps
Get execution steps: inputs, responses, tool calls
trajectory_delete
Delete a conversation
trajectory_to_markdown
Export a conversation as Markdown
trajectory_share
Create a shareable link
trajectory_metadata
Model info and token counts for a conversation
Tool
Description
memory_list
List all persistent memories stored in the IDE
Tool
Description
workspace_info
Current workspace path, name, and settings
workspace_directories
Get working directories
workspace_set_directories
Set working directories
workspace_repos
Git repository information
workspace_edit_state
Modified files and pending changes
workspace_commit_message
AI-generated commit message from staged changes
workspace_create_worktree
Create a git worktree for parallel development
workspace_stat_uri
File or directory status by URI
Tool
Description
terminal_execute
Execute a shell command
terminal_open
Open a new terminal panel
terminal_show
Focus the terminal panel
terminal_read
Read the terminal buffer
terminal_send_input
Send text input to a running terminal
terminal_kill
Terminate a running command
Tool
Description
browser_launch
Launch the built-in browser
browser_smart_open
Open a URL with AI context
browser_screenshot
Capture a page screenshot
browser_console_logs
Capture browser console output
browser_list_pages
List open pages
browser_whitelist_add
Add a URL to the agent whitelist
browser_whitelist_list
List whitelisted URLs
browser_screen_recording_start
Start a screen recording
browser_screen_recording_save
Save a screen recording
Tool
Description
code_validation_states
Lint and type error states for the workspace
code_lint_errors
Lint errors for specific files
code_get_definition
Go-to-definition for a symbol
code_insert_at_cursor
Insert code at the current cursor position
code_open_file
Open a file in the editor
code_save_document
Save the active document
code_run_extension
Execute JavaScript in the IDE extension context
code_search
Hybrid semantic + keyword code search
code_keyword_search
Keyword-only code search
code_graph_search
Graph-based code search
Tool
Description
mcp_server_states
List MCP servers configured in Antigravity
mcp_server_templates
Browse installable MCP server templates
mcp_refresh
Restart all MCP servers
mcp_list_resources
List MCP resources
mcp_list_prompts
List MCP prompts
Tool
Description
user_settings_get
Get all user settings
user_settings_set
Update user settings
user_profile
Detailed profile data
user_analytics
Usage statistics
user_changelog
Release notes (requires IDE version)
user_debug_diagnostics
Diagnostic information
Tool
Description
rules_list
List AI rules
workflows_list
List custom workflows
skills_list
List custom skills
agents_list
List custom agent configurations
agent_scripts_list
List agent scripts
customization_create_file
Create a rule, workflow, or skill file
customization_paths
List customization file paths
workflow_copy_builtin
Copy a built-in workflow to customize it
rules_file_open
Open the rules file in the editor
Tool
Description
plugins_list
List available cascade plugins
plugin_get
Get details of a specific plugin
plugin_install
Install a cascade plugin
index_list
List code indexes for the workspace *
index_stats
Code index database statistics *
index_enable
Enable code indexing *
knowledge_search
Search knowledge base (GitHub, Jira, Slack, Drive connectors) *
experiments_get
Unleash feature flag data
experiments_status
Static experiment status
open_url
Open a URL in the system default browser
supported_languages
List well-supported programming languages
image_generate
Generate an image from a prompt
transcribe_audio
Transcribe audio to text
web_docs_options
Web documentation search options
Supported Models
Model
Enum ID
Capabilities
Gemini 3.1 Pro (High) — Default
MODEL_PLACEHOLDER_M37
Images, Video, Audio, PDF
Gemini 3.1 Pro (Low)
MODEL_PLACEHOLDER_M36
Images, Video, Audio
Gemini 3 Flash
MODEL_PLACEHOLDER_M18
Images, Video, Audio
Claude Sonnet 4.6 (Thinking)
MODEL_PLACEHOLDER_M35
Images
Claude Opus 4.6 (Thinking)
MODEL_PLACEHOLDER_M26
Images
Claude Sonnet 4.5
MODEL_CLAUDE_4_5_SONNET
Images, Video
Claude Sonnet 4.5 (Thinking)
MODEL_CLAUDE_4_5_SONNET_THINKING
Images
GPT-OSS 120B
MODEL_OPENAI_GPT_OSS_120B_MEDIUM
Text
The enum values like MODEL_PLACEHOLDER_M37 are 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 aux and finds language_server processes belonging to Antigravity
Extracts the CSRF token and extension server port from process arguments
Port-scans extensionPort+1 through extensionPort+20 in parallel to find the active language server
Verifies the connection with a GetUserStatus call
Communication Protocol
Layer
Details
Transport
HTTP on 127.0.0.1 (dynamic port)
RPC
ConnectRPC with JSON encoding
Service
exa.language_server_pb.LanguageServerService
Auth
x-codeium-csrf-token header
MCP transport
stdio (stdin/stdout JSON-RPC 2.0)
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
Problem
Solution
"No running Antigravity language server found"
Open Antigravity IDE with at least one workspace
Connection refused
Antigravity may have restarted — restart the MCP server
401 / CSRF error
Token changed — restart the MCP server to re-discover
Polling timeout
Increase timeout_ms or switch to a faster model (MODEL_PLACEHOLDER_M18)
Port not found
Set ANTIGRAVITY_PORT + ANTIGRAVITY_CSRF_TOKEN environment variables manually
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