A

Google · Antigravity IDE · Antigravity CLI (replaced Gemini CLI) · Antigravity app

How to add MCP servers to Google Antigravity

Where Google Antigravity keeps MCP config (~/.gemini/config/mcp_config.json (global), .agents/mcp_config.json (workspace)), the exact format, and working examples for local and remote servers.

1. Find the config file

  • ~/.gemini/config/mcp_config.json (global)
  • .agents/mcp_config.json (workspace)

Uses "mcpServers". Remote servers must use "serverUrl"; the old Gemini CLI keys "url" / "httpUrl" are not supported.

2. Add a local (stdio) server

Example: Context7, which runs locally with npx.

.agents/mcp_config.json
{
  "mcpServers": {
    "context7": {
      "command": "npx",
      "args": [
        "-y",
        "@upstash/context7-mcp"
      ]
    }
  }
}

3. Add a remote (HTTP) server

Example: Notion's hosted server. You sign in with OAuth the first time it connects.

.agents/mcp_config.json
{
  "mcpServers": {
    "notion": {
      "serverUrl": "https://mcp.notion.com/mcp"
    }
  }
}

4. If it won't connect

  • Validate the file. One trailing comma breaks the whole file.
  • Check the top-level key: VS Code uses servers; Claude Code, Cursor and Antigravity use mcpServers; Codex uses TOML tables.
  • If npx isn't found, the app may not see your shell's PATH (common with nvm). Use the full path to npx.
  • Restart the agent or reload the window after editing.
Generate your config →

Agent Stack Weekly · free

What changed across coding agents this week

Limit and pricing changes, new MCP servers, and setup fixes for Claude Code, Codex, Cursor, Copilot and Antigravity.

No spam. Unsubscribe anytime. Read past issues

Frequently asked questions

~/.gemini/config/mcp_config.json (global) or .agents/mcp_config.json (workspace).