Key takeaways
- In the Antigravity IDE, click the … menu in the agent side panel, select MCP Servers, and install from the MCP Store or open the raw config.
- Custom servers go in ~/.gemini/config/mcp_config.json for all projects or .agents/mcp_config.json for one workspace, under an mcpServers key.
- Remote servers must use Streamable HTTP with serverUrl; Google's docs say the older HTTP+SSE transport and the httpUrl field are not supported.
To add an MCP server in Google Antigravity, install it from the built-in list (the MCP Store in the IDE, the Customizations page in the app), or write an entry for it in mcp_config.json. The file lives at ~/.gemini/config/mcp_config.json for every project, or at .agents/mcp_config.json inside one workspace. Google's MCP documentation shows how for the Antigravity IDE, the Antigravity App and the Antigravity CLI (agy), and all three read the same JSON format.
MCP, the Model Context Protocol, is an open standard for connecting an AI agent to outside tools: a database, an issue tracker, a design file. Everything below comes from Google's Antigravity docs as they stood on December 1, 2026. The commands were not run for this guide.
How to add an MCP server in the Antigravity IDE
The IDE has an MCP Store, and Google calls it the easiest route.
- Click
…at the top of the editor's agent side panel and select MCP Servers. - Hover over a server and click Install, or click the server to read its details first and then click Install.
- Follow any prompts on screen.
After that, the docs say, the server's tools and resources are available to the editor automatically.
For a server that isn't in the store:
- Click
…at the top of the agent side panel and select MCP Servers. - Click Manage MCP Servers.
- Click View raw config.
- Add your server to the
mcp_config.jsonfile that opens, in the format shown further down.
How to add an MCP server in the Antigravity App
The app keeps MCP servers on its Customizations page.
- Click Customizations in the sidebar.
- Click Installed and scroll to the MCP Servers section.
- Click Add MCP Server (+). A searchable list opens.
- Find the server you want and click Add.
To restart, disable or delete a server, click More actions (⋮) next to it. The section header also has a Copy Config File Path button, which is the quickest way to find the config file when you want to add a custom server by hand.
How to add an MCP server in the Antigravity CLI
The CLI reads two files:
| Scope | File | Applies to |
|---|---|---|
| Global | ~/.gemini/config/mcp_config.json |
All your projects |
| Workspace | <workspace>/.agents/mcp_config.json |
That workspace only |
Edit either one, then type /mcp at the prompt and press Enter. That opens the MCP manager, which shows a status ring for each server (active, disconnected or loading), reloads the configuration and shows connection logs.
Google's CLI reference also lists an agy mcp shell subcommand that can add, remove, list, enable and disable servers. The reference gives no syntax for it, so this guide sticks to the config file, which the docs describe in full.
A third route is a plugin. Plugins are bundles that can carry MCP servers along with skills and rules, and the plugins documentation gives the install command:
agy plugin install <plugin-name>
A bare name installs from Google's official marketplace, and you need to be signed in to agy. Google's own example is agy plugin install google-developer-knowledge, a server that lets the agent search current Google developer docs. One catch from the plugins page: a plugin that needs an API key or other variable stays disabled after a CLI install until you turn it on and fill in the setup dialog.
If you are moving from Gemini CLI, servers no longer live in ~/.gemini/settings.json. Google's migration guide says they move to the standalone mcp_config.json, and the old httpUrl key becomes serverUrl.
The mcp_config.json format
The root object has one key, mcpServers. Each entry under it is a server, named by you. This is the example from Google's docs, with one local server and one remote server:
{
"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"
}
}
}
}
Every entry needs exactly one transport. A local server, which Antigravity starts as a process on your machine, uses command, with optional args, env and cwd. A remote server uses serverUrl, with optional headers for an API key or bearer token.
The remote rule is the one most likely to bite. Remote servers must use the Streamable HTTP transport. The docs say url works in place of serverUrl, but the older HTTP+SSE transport and the httpUrl field are not supported. A config pasted from another tool that uses either one will not connect.
A few optional fields are worth knowing. disabled: true switches a server off without deleting its entry. enabledTools is an allowlist that hides every other tool on the server, and disabledTools hides the ones you name. timeoutSeconds changes how long Antigravity waits.
Sign in to a server that needs it
There are three ways to authenticate, depending on the server.
For an API key, put it in headers, as in the example above.
For a Google Cloud service, set "authProviderType": "google_credentials" in the entry and run this once:
gcloud auth application-default login
For OAuth, most servers need no extra config. Antigravity handles the flow itself when the server supports Client ID Metadata Documents or Dynamic Client Registration, two ways for a client to identify itself without manual setup. In the IDE, the first of those needs version 2.6.0 or later. If the server supports neither, add an oauth object with your clientId and optional clientSecret, and register https://antigravity.google/oauth-callback as a redirect URI with the provider.
To finish an OAuth sign-in in the app, open Customizations, click Installed, and click Authenticate next to the server. Sign in in the browser, copy the authorization code, paste it into the Enter authorization code field and click Submit. The server then reconnects on its own. Tokens are stored in ~/.gemini/antigravity/mcp_oauth_tokens.json and refreshed automatically.
Stop the approval prompts
A new MCP server asks before every tool call. That is the default: per the permissions docs, unconfigured MCP tools run in Ask mode. To let a trusted server run without prompting, add an allow rule. In the CLI, rules go in ~/.gemini/antigravity-cli/settings.json:
{
"permissions": {
"allow": ["mcp(linter/*)"],
"ask": ["mcp(sql/execute_mutation)"]
}
}
mcp(server/tool) matches one tool, mcp(server/*) matches every tool on a server, and mcp(*) matches all MCP tools everywhere. Deny beats Ask, and Ask beats Allow. The broad wildcard is a poor trade for most people. Allowing one server at a time costs a line of JSON each and keeps a newly added server from acting unasked.
Common problems
The remote server never connects. Check for httpUrl or an SSE-only endpoint first. Antigravity wants Streamable HTTP and serverUrl.
A tool call fails with a message like MCP tool call to server "sqlite-explorer" timed out after 3m0s. By default Antigravity allows 5 minutes to connect and list tools, and 3 minutes per tool call. Set "timeoutSeconds": 600 in that server's entry to allow 10 minutes, or a negative value such as -1 to turn the limits off. The same number also caps connection time, so the docs warn that a small value can stop a slow-starting server from connecting at all.
The config changed but the CLI still shows the old servers. Open /mcp and reload the configuration.
The agent takes an extra step before a tool you use constantly. Antigravity loads MCP tools lazily by default: it keeps each tool's schema on disk and reads it only when needed, which saves tokens. For a tool used all the time, add "tools": { "read_query": { "eager": true } } to the server entry. Google's advice is to keep that for a few core tools, because an eager tool's full schema is sent to the model on every turn.
For sign-in, quota and agy errors that have nothing to do with MCP, see our Antigravity fixes guide. MCP servers give the agent new tools; to give it instructions for using them, add a skill next.
Frequently asked questions
Where is the Antigravity MCP config file?
Google's docs put the global file at ~/.gemini/config/mcp_config.json and the workspace file at .agents/mcp_config.json in the project. In the Antigravity App, the Copy Config File Path button in the MCP Servers section gives you the path.
What is the Antigravity MCP config format?
It is JSON with a root mcpServers object, where each key is a server name. A local server needs command, plus optional args, env and cwd. A remote server needs serverUrl, plus optional headers.
How do I add MCP servers in the Antigravity CLI?
Add the server to ~/.gemini/config/mcp_config.json or <workspace>/.agents/mcp_config.json, then type /mcp in agy to open the MCP manager, check its status and reload the configuration. Servers can also arrive through a plugin installed with agy plugin install.
Why does my Antigravity MCP server show an error or time out?
For a remote server, check that it uses Streamable HTTP and the serverUrl key, because HTTP+SSE and httpUrl are not supported. For timeouts, the defaults are 5 minutes to connect and 3 minutes per tool call; raise them with timeoutSeconds in the server's entry.
Sources
- Model Context Protocol (MCP)Google Antigravity
- Agent permissionsGoogle Antigravity
- PluginsGoogle Antigravity
- CLI commandsGoogle Antigravity
- Migrating from Gemini CLIGoogle Antigravity
- Connect to the Developer Knowledge MCP serverGoogle for Developers



