Browserless MCP in Antigravity
Google Antigravity connects to the hosted Browserless MCP server through mcp_config.json, using its serverUrl key and your API token in an Authorization header. Once it's connected, Antigravity can scrape, search, crawl, and drive a cloud browser with the Browserless MCP tools.
- A Browserless API token from your account dashboard
- The Antigravity IDE or CLI
Connect to the hosted server
The hosted server runs at https://mcp.browserless.io/mcp, so there's nothing to install.
Add to ~/.gemini/config/mcp_config.json for all workspaces, or .agents/mcp_config.json in a workspace. The file holds your API token, so prefer the global file for repositories you share, and add .agents/mcp_config.json to .gitignore if you use the workspace one. To open the config from the IDE, click … at the top of the agent panel, then MCP Servers → Manage MCP Servers → View raw config.
{
"mcpServers": {
"browserless": {
"serverUrl": "https://mcp.browserless.io/mcp",
"headers": {
"Authorization": "Bearer YOUR_API_TOKEN_HERE"
}
}
}
}
Use serverUrl for the endpoint. Antigravity doesn't support the httpUrl field that Gemini CLI uses, so copying a Gemini CLI config as-is won't connect.
To use a region other than US West, add an x-browserless-api-url header, or a browserlessUrl query parameter on the server URL for clients that only take a URL. See regional endpoints.
Run the server locally
To run the MCP server process on your machine instead, use the @browserless.io/mcp npm package over stdio. You need Node.js 24 or newer. Browser work still runs on Browserless, so this is mainly for pinning a server version (add it to the package name, for example @browserless.io/mcp@1.41.0) or pointing at a self-hosted instance with BROWSERLESS_API_URL. Both setups use the server name browserless, so replace the hosted entry with this one rather than adding both.
Add to ~/.gemini/config/mcp_config.json:
{
"mcpServers": {
"browserless": {
"command": "npx",
"args": ["-y", "@browserless.io/mcp"],
"env": {
"BROWSERLESS_TOKEN": "YOUR_API_TOKEN_HERE"
}
}
}
}
Check the connection
In the Antigravity CLI, run /mcp to open the MCP manager. browserless should show an active status, and the overlay can reload the config and show connection logs. In the IDE, click … at the top of the agent panel, then MCP Servers → Manage MCP Servers, and check that browserless is listed.
FAQ & Troubleshooting
Antigravity won't connect even though the URL is right
Check the endpoint key is serverUrl. Antigravity rejects httpUrl, so a config copied from Gemini CLI fails even when the URL itself is correct.
Can I sign in with OAuth instead of an API token?
Use the API token header. Antigravity runs OAuth through dynamic client registration with its own callback URL, and that callback isn't on the hosted server's default list of allowed redirect URIs, so sign-in can fail.
The server connects but every tool call returns 401 Unauthorized
The token is missing or wrong. Copy it again from your account dashboard and check the header reads Bearer followed by the token, with no quotes or trailing whitespace inside the value.
A tool call fails with timed out after 3m0s
Antigravity stops waiting for a tool call after 3 minutes by default. Long crawls or browser agent sessions can take longer, so set timeoutSeconds on the browserless entry to raise the limit, or -1 to turn it off.