Client setup
Antigravity CLI MCP config: move a remote server from Gemini CLI
Move a remote MCP server entry from Gemini CLI's settings.json to Antigravity CLI's mcp_config.json: serverUrl, headers, file paths and the /mcp check.
By Lucian Dyer, FetchMCP team · Published
This article was drafted with AI assistance from the sources listed below and edited and published by the FetchMCP team. Disclosure: the FetchMCP API, which this article mentions, is this site's own product.
- 1Find the old entrymcpServers in ~/.gemini/settings.json or .gemini/settings.json.
- 2Pick the new file~/.gemini/config/mcp_config.json globally, .agents/mcp_config.json per workspace.
- 3Rename the keyhttpUrl becomes serverUrl. An SSE url entry needs a Streamable HTTP endpoint first.
- 4Keep the headersAuthorization goes in headers, as before.
- 5Check itType /mcp to open the MCP Manager and look at the status ring.
The Gemini CLI docs carry a notice: for unpaid-tier and Google One users, Gemini CLI was replaced by Antigravity CLI on June 18, 2026. If that is you, your remote MCP servers still sit in Gemini CLI's settings.json, and Antigravity CLI reads a different file with different keys. This post moves one remote entry across by hand. Checked against the Antigravity and Gemini CLI docs on 2026-11-27.
Find the old entry
~/.gemini/settings.json is Gemini CLI's user config, and .gemini/settings.json its project config. Servers live inline in the mcpServers object of either file.
A remote entry in Gemini CLI uses one of two keys, and the difference matters for the move:
httpUrlis the Streamable HTTP endpoint.urlis an SSE endpoint, such ashttp://localhost:8080/ssein the Gemini CLI docs.
headers holds custom HTTP headers for either kind. That is where a bearer key sits.
Pick the new file
~/.gemini/config/mcp_config.json is Antigravity's global file. It applies to all your projects. <workspace>/.agents/mcp_config.json applies only to that workspace. The Antigravity IDE reads the same two locations.
Use the paths on Antigravity's own MCP page, and check them against your home directory before you edit.
Rename the key
serverUrl holds the endpoint in Antigravity. The docs say url also works. They also say remote servers must use Streamable HTTP, and that the legacy HTTP+SSE transport and the httpUrl field are not supported.
Map each old entry like this:
httpUrlentry: rename the key toserverUrl. Keep the URL as it is.urlentry that points at an SSE endpoint: a rename is not enough, because Antigravity does not support SSE for remote servers. Look up the server's Streamable HTTP endpoint in its docs and put that inserverUrl. The post on outdated SSE snippets shows how to tell the two apart.- Server with no Streamable HTTP endpoint: leave it out until it has one.
Before, in ~/.gemini/settings.json:
{
"mcpServers": {
"my-remote-server": {
"httpUrl": "https://example.com/mcp",
"headers": { "Authorization": "Bearer YOUR_KEY" }
}
}
}
After, in ~/.gemini/config/mcp_config.json:
{
"mcpServers": {
"my-remote-server": {
"serverUrl": "https://example.com/mcp",
"headers": { "Authorization": "Bearer YOUR_KEY" }
}
}
}
Keep the headers, and keep the key out of git
headers carries over unchanged. Antigravity sends those headers with remote serverUrl connections, and Authorization is the example its docs give.
The Antigravity MCP page describes headers and env only as key-value maps. It documents no ${VAR} syntax. Do not assume a variable is expanded; the server might receive the literal text. Put an entry with a real key in the global file, which lives in your home directory, and keep .agents/mcp_config.json for entries without secrets if the workspace is committed.
Set the timeout and OAuth fields only if you need them
timeoutSeconds is Antigravity's timeout field. Its default is 180 seconds per tool call and 300 seconds to connect. Antigravity's own example raises it to 600 for long-running tools.
oauth is for servers that need sign-in but support neither CIMD nor Dynamic Client Registration. You give oauth.clientId and, optionally, oauth.clientSecret. For servers that support either one, Antigravity handles OAuth 2.0 with PKCE by itself and keeps the tokens in ~/.gemini/antigravity/mcp_oauth_tokens.json. A server that takes a bearer key in headers needs no oauth block.
Check what the migration already did
agy offers a conversion on first launch when it finds a legacy setup. It detects your profiles and lets you pick which extensions and global settings to convert. The migration page does not say that inline settings.json servers are part of that step.
agy plugin import gemini converts Gemini extensions. Its sample output reports a line such as 1 server definition migrated to mcp_config.json for an extension that shipped a server.
So open mcp_config.json after either step and look for your entry. If it is there with url or httpUrl, fix the key as above. If it is missing, add it.
Confirm the connection
- Type
/mcpin the prompt panel and press Enter. The MCP Manager overlay opens. - Read the status ring next to the server: active, disconnected or loading.
- Use the overlay to reload the configuration after an edit, or to read the live connection logs when the ring stays disconnected.
disabled: true pauses one server without deleting its entry. Use it to rule out one server while you debug another.
For the same move in other clients, see the remote MCP server setup guide.
Try it with a real server
The FetchMCP API runs a remote Streamable HTTP server that takes a bearer key, so it fits the entry above. The MCP server registers 2 tools. Failed fetches cost 0 credits.
{
"mcpServers": {
"fetchmcp": {
"serverUrl": "https://fetchmcp.net/mcp",
"headers": { "Authorization": "Bearer YOUR_KEY" }
}
}
}
Put it in ~/.gemini/config/mcp_config.json, run /mcp, and the two tools should appear under fetchmcp. The MCP setup docs cover the server, and sign-up gives you a key.
Frequently asked questions
Where does Antigravity CLI read MCP servers from?
From ~/.gemini/config/mcp_config.json for all projects and from .agents/mcp_config.json inside a workspace for that workspace only. Gemini CLI kept its servers inline in settings.json instead.
Does Antigravity CLI support httpUrl?
No. Antigravity's MCP docs say the httpUrl field and the legacy HTTP+SSE transport are not supported. Put the endpoint in serverUrl; url also works as an alias, but the server must speak Streamable HTTP.
Can I use an environment variable for the bearer key in mcp_config.json?
Antigravity's MCP docs, checked on 2026-11-27, describe headers and env only as key-value maps and document no variable syntax. Keep a literal key in the global file in your home directory, not in a workspace file you commit.
Did Gemini CLI shut down for everyone?
No. The Gemini CLI docs say Gemini CLI was replaced by Antigravity CLI on June 18, 2026 for unpaid-tier and Google One users.
Sources
- Antigravity: MCP (Documentation)
- Antigravity: Migrating from Gemini CLI (Documentation)
- Gemini CLI: MCP servers (Documentation)