From Antigravity you get live Amazon data in the agentic editor you are already building in — query Ads, Seller Central, and Vendor Central while you work, prototype an Amazon agent against real campaigns, and hand it multi-step jobs without leaving the IDE.
Antigravity reads MCP servers from a JSON config file, and its remote-server field is named serverUrl rather than the url most clients use. That one difference is the most common reason a working config from another client fails here.
Your MCP server hostname is private to your deployment. It comes from your cloud provider, belongs to your environment, and is not shared across customers. Replace {your-private-mcp-host} with the private host shown in your dashboard.
For the official reference, see MCP in the Antigravity docs.
Prerequisites
- Antigravity installed, in either the IDE or CLI form.
- A connected workspace with access to your private MCP server.
- A dashboard API key from the Keys tab.
- The private MCP host assigned to your deployment.
1. Set your local key
Set the API key in the shell that launches Antigravity:
export MCP_API_KEY="mcp_live_..."Store it in your shell profile or secret manager for repeated use. Do not commit the raw value — the workspace config file below is checked in with the repository.
2. Add the MCP server
Antigravity reads two config locations:
| Scope | Path | Use when |
|---|---|---|
| Global | ~/.gemini/config/mcp_config.json | The server should be available in every project. |
| Workspace | .agents/mcp_config.json | Only this repository should see the server. Checked into the repo. |
Add the server under the top-level mcpServers key:
{
"mcpServers": {
"private-mcp": {
"serverUrl": "https://{your-private-mcp-host}/mcp",
"headers": {
"Authorization": "Bearer YOUR_API_TOKEN"
}
}
}
}Use serverUrl for remote Streamable HTTP, SSE, and websocket connections. A remote entry that uses command and args — the stdio shape — will not connect.
Prefer the global config when the header carries a live key, so the token never lands in a committed workspace file.
3. Verify the server
Open the MCP manager for the surface you are using:
| Surface | Where |
|---|---|
| Antigravity CLI | Type /mcp in the prompt panel for the Interactive MCP Manager. |
| Antigravity IDE | Agent side panel … > MCP Servers > Manage MCP Servers. |
| Antigravity 2.0 | Settings > Customizations > Installed MCP Servers. |
private-mcp should be listed with its tools discovered. Ask for a read-only call first:
What MCP tools are available from private-mcp? List the read-only ones before calling anything.Alternative: OAuth and Google credentials
If your deployment fronts the MCP server with OAuth, Antigravity handles dynamic client registration automatically, or accepts a manual clientId and clientSecret under an oauth key. Setting authProviderType to google_credentials uses your local application-default credentials instead, configured with gcloud auth application-default login.
Bearer-header auth above is the path for a Kuudo dashboard API key.
Optional controls
MCP tools run in Ask mode by default, so Antigravity prompts before calling one. Permissions are expressed as patterns:
mcp(private-mcp/list_campaigns) a single tool
mcp(private-mcp/*) every tool on this server
mcp(*) every MCP toolGrant read tools broadly and keep write tools on Ask until you have watched the agent work. Two further fields help:
{
"mcpServers": {
"private-mcp": {
"serverUrl": "https://{your-private-mcp-host}/mcp",
"headers": { "Authorization": "Bearer YOUR_API_TOKEN" },
"disabledTools": ["delete_record"],
"disabled": false
}
}
}Use disabledTools to withhold specific tools from the agent, and disabled to switch the whole server off without deleting the entry.
Troubleshooting
The server never connects
Check that the entry uses serverUrl and not url or command. A config copied from Claude Code or Codex will use a different field name and silently fail to register a remote server.
Unauthorized or 401 errors
Confirm the Authorization header reads Bearer followed by a dashboard key that belongs to the same workspace as the MCP server. Rotated keys invalidate the old value.
Tools are listed but never called
MCP tools default to Ask mode. If the agent is running unattended, grant the tools it needs with an mcp(private-mcp/*) permission, or approve each prompt as it appears.
Some tools are missing
Check disabledTools on the server entry, and confirm the server itself is not disabled.
Config changes are not picked up
Restart Antigravity after editing the JSON. The IDE and CLI read the file at startup.
Start using tools
Read-only prompts first:
- "Using
private-mcp, list my Sponsored Products campaigns from the last 7 days." - "Pull the current Buy Box status for these ASINs and show which ones I am losing."
- "Summarize yesterday's orders by marketplace."
For write-capable work, ask Antigravity to explain the change it intends before it calls a mutating tool.