How to Set Up MCP Servers in Antigravity CLI (Step-by-Step)

Connect Antigravity CLI to external tools with MCP servers. Complete setup guide covering the /mcp manager, mcp_config.json locations, remote serverUrl configuration, and troubleshooting.

October 19, 2026
implementationguidesetupAntigravity CLIagyMCPmcp_config.json

Prerequisites

  • Antigravity CLI (agy) installed and authenticated (see Getting Started)
  • Node.js 18+ or Docker for npx- and Docker-based servers

What is MCP?

MCP (Model Context Protocol) lets Antigravity CLI's agent use external tools — filesystem, GitHub, databases — through a standard interface. Antigravity CLI supports local stdio and remote MCP servers, configured through the /mcp manager or directly in mcp_config.json.

Method 1: Interactive MCP Manager

Type /mcp in the prompt panel and press Enter to open the MCP Manager overlay. It shows live status for active, disconnected, or loading servers and lets you reload configurations or inspect connection logs.

Method 2: mcp_config.json

Antigravity CLI reads server definitions from two files:

  • Global: ~/.gemini/config/mcp_config.json
  • Workspace: .agents/mcp_config.json in the active project

settings.json holds CLI preferences, not MCP servers. The configuration file contains a single mcpServers object:

{
  "mcpServers": {
    "filesystem": {
      "command": "npx",
      "args": ["-y", "@modelcontextprotocol/server-filesystem", "."]
    },
    "github": {
      "serverUrl": "https://api.githubcopilot.com/mcp/",
      "headers": {
        "Authorization": "Bearer YOUR_GITHUB_PAT"
      }
    }
  }
}

Each server entry requires one transport property:

  • command for stdio servers, with optional args, env, and cwd
  • serverUrl for remote Streamable HTTP or SSE servers, with optional headers

Remote connections must use serverUrl. Legacy fields such as url and httpUrl are not supported.

Verifying Your Servers

  1. Open /mcp — your servers should appear
  2. Start an agent session and ask it to use a tool from the server, e.g. "query the postgres server"
  3. If a server fails, inspect the connection log from the /mcp manager

Using MCP Tools in Antigravity CLI

Once connected, the agent calls the server's tools like any built-in tool:

You: "Use the github server to find issues labeled bug."

Agent: [calls the github tool, returns matching issues]

Security Considerations

  • Least privilege — give servers only the credentials they need
  • Keep secrets out of git — do not commit populated env or headers blocks; keep global credentials in the user-level file
  • Review server tools — an MCP server executes arbitrary commands on your machine
  • Disable unused servers — set "disabled": true on a server entry to keep it configured without connecting

Troubleshooting

Further Resources

Sources