Skip to content
Available on:
Antigravity 2.0Antigravity CLIAntigravity IDE

Antigravity supports the Model Context Protocol (MCP), an open standard that lets AI agents and editors securely connect to local developer tools, databases, file parsers, and external remote APIs. This integration provides the AI model with real-time context and execution capabilities beyond your immediate workspace.

In this guide, you’ll learn how to connect and configure MCP servers across Antigravity products.

MCP acts as a universal bridge between Antigravity and your broader development environment. Instead of manually copying and pasting database schemas, logs, or API specifications into prompts or chat panels, MCP lets Antigravity fetch structured context directly or execute safe actions on your behalf when needed.

With MCP, Antigravity can use live data from connected MCP servers to inform its reasoning and suggestions:

  • When writing a SQL query, Antigravity can inspect your live Neon, Supabase, or AlloyDB schema to suggest correct table and column names.
  • When debugging deployment failures, Antigravity can pull recent build logs directly from Netlify or Heroku.

With MCP, Antigravity can execute specific, safe actions defined by your connected servers:

  • Create a Linear issue for a TODO item.
  • Search Notion or GitHub for authentication patterns.

In Antigravity 2.0, you can manage your MCP servers through the Installed MCP Servers section of your Settings.

To view and update your MCP servers:

  1. Click the Settings button on the bottom left of your screen.
  2. Select Customizations and review the Installed MCP Servers section.

To install an MCP server from the Installed MCP Servers section:

  1. Click Add MCP. This connects you to the MCP Store, a searchable list of available MCP servers.
  2. Search or scroll down to an MCP server you’d like to install.
  3. Click Add.

To manage your MCP servers from this screen:

  • Uninstall: Click the trash can icon next to the MCP server in the list.
  • Disable or enable: Click the toggle switch next to the MCP server in the list.
  • Refresh: Click the refresh button.

Whether configuring custom servers for Antigravity 2.0, Antigravity IDE, or Antigravity CLI, the configuration file follows a standardized format. The file contains a single mcpServers object where you define each server you want to connect to:

{
  "mcpServers": {
    "sqlite-explorer": {
      "command": "node",
      "args": ["/usr/local/bin/sqlite-mcp-server.js"],
      "env": {
        "SQLITE_DB_PATH": "/var/data/app.db"
      }
    },
    "my-remote-server": {
      "serverUrl": "https://api.example.com/mcp/",
      "headers": {
        "Authorization": "Bearer YOUR_API_TOKEN"
      }
    }
  }
}

Each server entry under mcpServers supports the following properties.

Require one of the following transport properties:

  • command (string): Path to the executable for stdio transport.
  • serverUrl (string): URL for remote Streamable HTTP or SSE servers.

Configure any of the following optional properties:

  • args (array of strings): Command-line arguments for stdio transport.
  • env (object): Environment variables for the stdio server process.
  • cwd (string): Working directory for stdio servers.
  • headers (object): Custom HTTP headers for remote servers.
  • authProviderType (string): Authentication provider. Supports "google_credentials" for Google Application Default Credentials (ADC).
  • oauth (object): OAuth client credentials (clientId, clientSecret).
  • disabled (boolean): Temporarily disable a server without removing its configuration.
  • disabledTools (array of strings): Tool names to withhold from the model.

Connected MCP servers can securely authenticate against external services using built-in Google credentials, automatic OAuth flows, or custom HTTP headers.

Set authProviderType to "google_credentials" to use Google Application Default Credentials (ADC):

{
  "mcpServers": {
    "my-gcp-service": {
      "serverUrl": "https://example.googleapis.com/mcp/",
      "authProviderType": "google_credentials"
    }
  }
}

This requires Application Default Credentials to be configured locally. To set them up, run:

gcloud auth application-default login

If you previously logged in, ensure your quota project is set by running:

gcloud auth application-default set-quota-project {QUOTA_PROJECT}

Antigravity automatically handles OAuth for servers that support dynamic client registration (DCR). For these servers, no additional configuration is needed:

{
  "mcpServers": {
    "oauth-server": {
      "serverUrl": "https://api.example.com/mcp/"
    }
  }
}

If the server doesn’t support dynamic client registration, you can provide your client credentials manually:

{
  "mcpServers": {
    "oauth-server": {
      "serverUrl": "https://api.example.com/mcp/",
      "oauth": {
        "clientId": "your-client-id",
        "clientSecret": "your-client-secret"
      }
    }
  }
}

If you provide client credentials manually, ensure the following URL is registered as a redirect URI in your OAuth provider:

https://antigravity.google/oauth-callback

To connect to an OAuth-enabled server:

  1. Open Agent settings with Cmd + , (macOS) or Ctrl + , (Windows and Linux).

  2. Navigate to the Customizations tab and click Authenticate next to the server.

    Click Authenticate

  3. Complete authentication in your browser and copy the authorization code.

    Copy authorization code

  4. Paste the code back into the settings panel and click Submit.

    Paste auth code

Once authenticated, the server reconnects automatically.

Authenticated server

Access tokens are stored in ~/.gemini/antigravity/mcp_oauth_tokens.json. Expired tokens are refreshed automatically, and invalid tokens are removed.

For remote servers that require custom HTTP headers (such as API keys or bearer tokens), add them to the headers object. For example:

{
  "mcpServers": {
    "my-remote-server": {
      "serverUrl": "https://api.example.com/mcp/",
      "headers": {
        "Authorization": "Bearer YOUR_API_TOKEN"
      }
    }
  }
}

Access to Model Context Protocol tools and resources is governed by Antigravity’s permissions system. By default, unconfigured MCP tools run in Ask mode, requiring your approval before execution. You can allow specific tools or entire servers in your policy configuration:

  • mcp(server/tool): Matches a specific tool on a specific server.
  • mcp(server/*): Matches all tools on a specified server.
  • mcp(*): Global wildcard matching any MCP tool across all connected servers.

The MCP Store features direct integrations for a wide variety of developer platforms, databases, and productivity services:

Databases and storage (15 servers)
Developer tools and CI/CD (17 servers)
Frontend and design (8 servers)
Security (4 servers)
Analytics, AI, and cloud (32 servers)