Skip to content
Remote Control
MCP2-0Antigravity AppFeaturesMCP Antigravity App FeaturesAntigravity AppAntigravity CLIAntigravity IDE
Available on:
Antigravity AppAntigravity 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 the Antigravity App, you can manage your MCP servers in the MCP Servers section of the Customizations page.

To view and update your MCP servers:

  1. Click Customizations in the sidebar.
  2. Click Installed and scroll to the MCP Servers section.

To install an MCP server from the MCP Servers section:

  1. Click Add MCP Server (+). This opens a searchable list of available MCP servers.
  2. Search or scroll to an MCP server you’d like to install.
  3. Click Add.

To manage an MCP server, click More actions (⋮) next to it, and then choose Restart, Disable, or Delete. To find your configuration file, click Copy Config File Path in the section header.

Whether configuring custom servers for the Antigravity App, Antigravity IDE, Antigravity CLI, or a plugin (<plugin-root>/mcp_config.json), mcp_config.json follows a standardized JSON schema. The root object contains an mcpServers map where each key is a unique server identifier:

{
  "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 must specify one transport property (command for a local stdio server, or serverUrl for a remote Streamable HTTP server) and can include any of the optional properties below:

PropertyTypeDefaultDescription
commandstringRequired for stdioExecutable path or command name used to launch a local stdio MCP server process.
serverUrlstringRequired for remoteEndpoint URL of a remote MCP server that uses the Streamable HTTP transport. You can also use url.
argsstring[][]Command-line arguments passed to the command executable (stdio transport only).
envobject{}Key-value map of environment variables injected into the local stdio server process.
cwdstring—Working directory used when spawning a local stdio server process.
headersobject{}Custom HTTP request headers sent with remote serverUrl connections (for example, Authorization or API key headers).
authProviderTypestring—Built-in authentication provider. Set to "google_credentials" to attach Google Application Default Credentials (ADC).
oauthobject—Manual OAuth 2.0 client credentials (clientId and optional clientSecret) for remote servers that do not support Dynamic Client Registration (DCR).
disabledbooleanfalseWhen true, suspends the server connection without removing its configuration from mcp_config.json.
enabledToolsstring[]—Allowlist of tool names exposed to the agent from this server. When set, all other tools on the server are hidden.
disabledToolsstring[][]Denylist of tool names withheld from the agent.
timeoutSecondsinteger180 per tool call, 300 to connectTimeout, in seconds, for connecting to the server and listing its tools, and for each tool call. A negative value, such as -1, turns both off. See MCP server timeouts.

By default, Antigravity waits up to 5 minutes for an MCP server to connect and list its tools, and up to 3 minutes for each tool call. A tool call that runs longer fails with an error that names the server and the limit, for example:

MCP tool call to server "sqlite-explorer" timed out after 3m0s

If a server’s tools need more time, set timeoutSeconds in that server’s entry:

  • A positive value, in seconds, replaces both limits. For example, 600 lets each tool call run for up to 10 minutes.
  • A negative value, such as -1, turns off both limits.
  • 0, or leaving timeoutSeconds unset, keeps the defaults.

Because the same value limits how long the server has to connect, a small value can stop a slow-starting server from connecting.

The following example lets each tool call on the sqlite-explorer server run for up to 10 minutes:

{
  "mcpServers": {
    "sqlite-explorer": {
      "command": "node",
      "args": ["/usr/local/bin/sqlite-mcp-server.js"],
      "timeoutSeconds": 600
    }
  }
}

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. In the Antigravity App, click Customizations in the sidebar, and then click Installed.

  2. Under MCP Servers, click Authenticate next to the server.

    The MCP Servers section of the Customizations page with the bookmarks-docs server, a red status dot, an Authenticate button, and an Unauthorized error

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

    Copy authorization code

  4. Paste the code into the Enter authorization code field and click Submit.

    The bookmarks-docs server in the MCP Servers section with an Enter authorization code field and Submit and Cancel buttons

Once authenticated, the server reconnects automatically.

The bookmarks-docs server in the MCP Servers section with a green status dot, a Sign out button, and 2 tools enabled

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 (33 servers)

The Google Developer Knowledge MCP server lets Antigravity search and read official, up-to-date Google developer documentation, including Android, Firebase, Google Cloud, Google Maps Platform, and the Antigravity docs on this site, so the agent can check the current API before it writes code rather than relying only on its training data. It exposes three tools: search_documents, get_documents, and answer_query.

Install Google Developer Knowledge from the MCP Store as described in Getting started by surface. It connects with your Google credentials, so no API key is needed. For other setups, such as Antigravity CLI or a shared workspace config, follow the Antigravity steps in the Developer Knowledge documentation.

Once connected, you can ask the agent to ground its work in the docs. For example:

Look up the current Antigravity hooks documentation and add a PreToolUse hook that blocks shell commands which modify files outside this workspace.