External Providers, MCP & Vercel
Connect external developer tools and cloud infrastructure to Antigravity CLI using the Model Context Protocol (MCP).
Third-Party Models in agy (No OpenRouter Needed)
Section titled “Third-Party Models in agy (No OpenRouter Needed)”While agy does not support swapping in arbitrary OpenAI-compatible base URLs for its core loop, Google natively bundles top frontier models into your subscription:
claude-sonnet-4-6: Claude Sonnet 4.6 (Thinking)claude-opus-4-6-thinking: Claude Opus 4.6gpt-oss-120b-medium: GPT-OSS 120B- Gemini 3.x Flash & Pro
You can assign these directly to any subagent (e.g. model: claude-sonnet-4-6) without paying per-token API charges.
What is MCP? (The “USB Port” for AI)
Section titled “What is MCP? (The “USB Port” for AI)”Model Context Protocol (MCP) is an open standard that lets AI agents connect to external developer tools, databases, and cloud platforms through a single universal protocol.
Connecting Vercel MCP to agy
Section titled “Connecting Vercel MCP to agy”Vercel provides an official remote MCP server at https://mcp.vercel.com.
Recommended Command (Using mcp-remote Bridge)
Section titled “Recommended Command (Using mcp-remote Bridge)”agy mcp add vercel npx -y mcp-remote https://mcp.vercel.comThe 401 Unauthorized Caveat:
Section titled “The 401 Unauthorized Caveat:”If you attempt to add https://mcp.vercel.com as a raw HTTP URL without the mcp-remote bridge, the server rejects unauthenticated handshakes with 401 Unauthorized.
Using mcp-remote spins up a local listener (localhost:23098), handles the browser OAuth login, and stores your session token permanently in ~/.mcp-auth/.
Headless Server & Remote VPS Setup (No Browser)
Section titled “Headless Server & Remote VPS Setup (No Browser)”When running agy or Vercel MCP on a remote VPS (e.g. Debian on Vultr) without a graphical desktop:
Method A: The Credential Sync (Fastest)
Section titled “Method A: The Credential Sync (Fastest)”Authenticate once on your local machine with a browser, then copy your cached tokens to the remote VPS:
# Sync Vercel MCP OAuth tokens:scp -r ~/.mcp-auth user@vps_ip:~/
# Sync Antigravity user session & settings:scp -r ~/.gemini/antigravity-cli user@vps_ip:~/.gemini/The VPS now has valid credentials and runs with zero browser prompts.
Method B: SSH Port-Forwarding
Section titled “Method B: SSH Port-Forwarding”Tunnel the OAuth callback port (23098) over SSH so your local laptop’s browser can route the redirect back to the VPS listener:
ssh -L 23098:localhost:23098 user@vps_ipRun npx -y mcp-remote https://mcp.vercel.com on the VPS, open the printed link in your laptop browser, and the SSH tunnel routes the OAuth callback back to the VPS!
Method C: Personal Access Tokens
Section titled “Method C: Personal Access Tokens”Bypass OAuth completely by creating a Personal Access Token in your Vercel dashboard:
agy mcp add --header "Authorization: Bearer YOUR_VERCEL_TOKEN" vercel https://mcp.vercel.comAnd for agy headlessly:
export GEMINI_API_KEY="your-gemini-api-key"