Add a remote MCP server to Antigravity CLI
Antigravity reads MCP servers from mcp_config.json under mcpServers. A remote server takes serverUrl (url also works) and an optional headers object, and it has to speak Streamable HTTP.
By Jake Marsh. Checked against Antigravity CLI's own docs on 2026-10-31; each section links its source.
The Antigravity CLI config
For a server named my-server at https://example.com/mcp that takes an Authorization header. Where it goes: ~/.gemini/config/mcp_config.json (or .agents/mcp_config.json in the workspace).
{
"mcpServers": {
"my-server": {
"serverUrl": "https://example.com/mcp",
"headers": {
"Authorization": "Bearer YOUR_KEY"
}
}
}
}Swap in your own server below and the Antigravity CLI version updates first, with every other client after it.
Where Antigravity CLI reads it
~/.gemini/config/mcp_config.jsonglobal: every project<workspace>/.agents/mcp_config.jsonworkspace: that workspace only
Source: antigravity.google/docs/mcp
Keys, headers and sign-in
Put a static key in headers. Antigravity's docs describe env only as variables injected into a stdio server's process and document no variable expansion in headers, so write the header value itself.
Servers with dynamic client registration need nothing more for OAuth. Otherwise add an oauth object with clientId and an optional clientSecret, and register https://antigravity.google/oauth-callback with the provider. To sign in, open Agent settings, go to Customizations and click Authenticate, then paste the authorization code.
Source: antigravity.google/docs/mcp
Check that it connected
In the CLI, type /mcp to open the MCP Manager: it shows each server's status and lets you reload the configuration or read its connection logs. In the IDE, the agent panel's … menu has MCP Servers > Manage MCP Servers > View raw config.
Source: antigravity.google/docs/mcp
Antigravity CLI gotchas
httpUrl and the legacy HTTP+SSE transport aren't supported. A config copied from Gemini CLI with httpUrl needs that key renamed to serverUrl.
Source: antigravity.google/docs/mcp
Defaults are 300 seconds to connect and list tools and 180 seconds per tool call. timeoutSeconds with a positive value replaces both; a negative value such as -1 turns both limits off.
Source: antigravity.google/docs/mcp
enabledTools is an allow list (every other tool on that server is hidden), disabledTools a deny list, and disabled: true suspends a server without deleting it.
Source: antigravity.google/docs/mcp
Still not connecting? Antigravity CLI MCP server not connecting walks through the fixes in order.
Generate the config for your server
Runs in your browser. Nothing you type is sent anywhere. Still, don't paste real keys on shared screens.
Antigravity CLI (agy)
~/.gemini/config/mcp_config.json (or .agents/mcp_config.json in the workspace)
{
"mcpServers": {
"my-server": {
"serverUrl": "https://example.com/mcp",
"headers": {
"Authorization": "Bearer YOUR_KEY"
}
}
}
}Source: antigravity.google/docs/mcp
Claude Code
Run in a terminal (--scope user makes it available in every project)
claude mcp add --transport http --scope user my-server "https://example.com/mcp" --header "Authorization: Bearer YOUR_KEY"Source: code.claude.com/docs/en/mcp
Cursor
~/.cursor/mcp.json (all projects) or .cursor/mcp.json (one project)
{
"mcpServers": {
"my-server": {
"url": "https://example.com/mcp",
"headers": {
"Authorization": "Bearer YOUR_KEY"
}
}
}
}Source: cursor.com/docs/context/mcp
Codex CLI
~/.codex/config.toml
[mcp_servers.my_server]
url = "https://example.com/mcp"
http_headers = { "Authorization" = "Bearer YOUR_KEY" }Source: developers.openai.com/codex/mcp
Windsurf / Devin Desktop
~/.config/devin/mcp_config.json (older Windsurf: ~/.codeium/windsurf/mcp_config.json)
{
"mcpServers": {
"my-server": {
"serverUrl": "https://example.com/mcp",
"headers": {
"Authorization": "Bearer YOUR_KEY"
}
}
}
}Devin CLI / Devin Local
Run in a terminal (-s user saves it to ~/.config/devin/mcp_config.json for every project)
devin mcp add -s user -H "Authorization: Bearer YOUR_KEY" my-server "https://example.com/mcp"VS Code (Copilot agent mode)
.vscode/mcp.json in the workspace, or your user mcp.json (MCP: Open User Configuration)
{
"servers": {
"my-server": {
"type": "http",
"url": "https://example.com/mcp",
"headers": {
"Authorization": "Bearer YOUR_KEY"
}
}
}
}Source: code.visualstudio.com/docs/agents/reference/mcp-configuration
Gemini CLI
~/.gemini/settings.json (or .gemini/settings.json in the project)
{
"mcpServers": {
"my-server": {
"httpUrl": "https://example.com/mcp",
"headers": {
"Authorization": "Bearer YOUR_KEY"
}
}
}
}Cline
cline_mcp_settings.json (in the Cline panel, MCP Servers > Configure > Configure MCP Servers; Cline CLI: ~/.cline/data/settings/cline_mcp_settings.json)
{
"mcpServers": {
"my-server": {
"type": "streamableHttp",
"url": "https://example.com/mcp",
"headers": {
"Authorization": "Bearer YOUR_KEY"
}
}
}
}Source: docs.cline.bot/mcp/mcp-overview
OpenCode
opencode.json in the project root, or ~/.config/opencode/opencode.json for every project
{
"$schema": "https://opencode.ai/config.json",
"mcp": {
"my-server": {
"type": "remote",
"url": "https://example.com/mcp",
"oauth": false,
"headers": {
"Authorization": "Bearer YOUR_KEY"
}
}
}
}Source: opencode.ai/docs/mcp-servers/
Need a task list for those agents?
Taskhold is a remote MCP server that gives Antigravity CLI and your other agents a task list you share, with their progress on a live board. Its setup link writes this config for the agent, so you don't have to. $12 a month or $120 a year, 7-day trial.