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.
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.jsonin 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:
commandfor stdio servers, with optionalargs,env, andcwdserverUrlfor remote Streamable HTTP or SSE servers, with optionalheaders
Remote connections must use serverUrl. Legacy fields such as url and httpUrl are not supported.
Verifying Your Servers
- Open
/mcp— your servers should appear - Start an agent session and ask it to use a tool from the server, e.g. "query the postgres server"
- If a server fails, inspect the connection log from the
/mcpmanager
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
envorheadersblocks; 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": trueon a server entry to keep it configured without connecting
Troubleshooting
Further Resources
- MCP Servers directory — pick servers that match your tools
- Antigravity CLI Configuration — CLI settings, plugins, environment variables
- Migration: Gemini CLI to Antigravity — moving your MCP config across
- MCP Setup in Cursor — the same concepts in Cursor
Sources
Related Articles & Guides
Setting up MCP Servers in Claude Code
Learn how to configure Model Context Protocol (MCP) servers in Anthropic's Claude Code CLI to supercharge your AI-assisted development workflow with external tools and services.
How to Set Up MCP Servers in GitHub Copilot (Step-by-Step)
Connect GitHub Copilot to external tools with MCP servers. Complete Copilot MCP setup guide covering VS Code mcp.json, Copilot CLI mcp-config.json, configuration examples, and troubleshooting.
How to Set Up MCP Servers in Cursor (Step-by-Step)
Connect Cursor to external tools with MCP servers. Complete Cursor MCP setup guide with .cursor/mcp.json configuration, the MCP UI, troubleshooting, and security best practices.