Connecting to Google Antigravity
Google Antigravity supports the Model Context Protocol (MCP) natively, allowing the editor to securely connect to tools and external services defined in your HasMCP dashboard.Setup Instructions
Antigravity manages connections through its built-in MCP Store.1. Access the MCP Configuration
1
Open Agent Panel
Open the Antigravity Editor and locate the Agent Panel in the side
panel.
2
Manage Servers
Click the ”…” (three dots) dropdown at the top of the panel and select
Manage MCP Servers.
2. Configure Custom HasMCP Server
1
Edit Config
In the Manage MCP Servers view, click on View raw config. This will open
your
mcp_config.json file.2
Add Server
Add your HasMCP server to the
mcpServers object. You can use the @hasmcp/remote-mcp bridge for enhanced security, or a direct URL connection:Option A: Direct URL Connection
This is the simplest way to connect if your server supports token-based URL authentication.Option B: Remote Bridge (Recommended for Security)
Uses the@hasmcp/remote-mcp bridge to keep your token in environment variables.
- PROJECT_ID / SERVER_ID: Your unique project or server identifier from the HasMCP dashboard.
- YOUR_TOKEN / YOUR_TOKEN_VALUE: The secure token generated for your server.
3. Save and Verify
Save the mcp_config.json file. The editor will automatically attempt to initialize the connection. Resources and tools from your HasMCP server will now be available to the AI agent for real-time context and action execution.Antigravity CLI
The Connection string section of a server’s Configuration tab in HasMCP has an Antigravity CLI tab. Generate a token there and copy the snippet. It takes the server URL with the token asserverUrl:
mcpServers object of your Antigravity CLI MCP configuration.
The Antigravity CLI tab replaces the former Gemini CLI tab. To connect the Gemini CLI, see Gemini CLI.