How to Install an MCP Server in Antigravity, Step by Step
Add an MCP server to Google Antigravity's IDE, 2.0 app or CLI. The exact mcp_config.json paths, fields, OAuth steps, and what to check first.
Part of our guide to MCP Server Security: How to Vet a Server Before You Use It.
To install an MCP server in Google Antigravity, either pick it from the built-in MCP Store, or add an entry under mcpServers in ~/.gemini/config/mcp_config.json (or in .agents/mcp_config.json inside your workspace), using command for a local server or serverUrl for a remote one, then refresh the server list.
That one file is shared by the Antigravity IDE, the Antigravity 2.0 app and the Antigravity CLI (agy), so a server you add once shows up in all three. Everything below comes from Google's official Antigravity MCP docs and two Google guides, all read on 2026-11-29. Google changes Antigravity often, so if a menu label below no longer matches, trust the docs page over this post.
If you are new to MCP, start with what an MCP server is. For Claude, Cursor and VS Code, see our general guide on how to install an MCP server.
Antigravity MCP at a glance (as of 2026-11-29)
| What | Value | Source |
|---|---|---|
| Global config file | ~/.gemini/config/mcp_config.json | Antigravity docs |
| Workspace config file | <workspace>/.agents/mcp_config.json | Antigravity docs |
| Top-level key | mcpServers | Antigravity docs |
| Local (stdio) server | command, plus optional args, env, cwd | Antigravity docs |
| Remote server | serverUrl (alias url), Streamable HTTP only | Antigravity docs |
| Legacy HTTP+SSE | Not supported | Antigravity docs |
| Default timeouts | 300 s to connect, 180 s per tool call | Antigravity docs |
| Unconfigured MCP tools | Run in Ask mode (approval before each call) | Antigravity docs |
| CLI status screen | agy, then /mcp | Antigravity docs |
On Windows, ~ is your user folder, so the global file sits under %USERPROFILE%\.gemini\config\. Some older third-party guides give other file names or folders. Use the path in the current docs.
Before you install: what the server can touch
A local MCP server runs on your machine with your user permissions. A remote one receives whatever your agent sends it. Antigravity's agent can call tools on its own, so two minutes of checking is worth it:
- Who publishes it? Check that the npm or PyPI package links to the repository you expect.
- Pin a version.
package@2.4.1instead of whatever is latest. A server that changes its tool descriptions after you approved it is a rug pull, and pinning makes that harder. - Read the tool descriptions once it connects. Hidden instructions in a description are tool poisoning, explained in our guide to MCP tool poisoning.
- Give it the least privilege that works. One folder, read-only tokens. Our least-privilege guide covers this.
On AGXmart, each MCP server listing has a "What it can touch" section and a dated scan status. A scan shows what it saw on that date, not a guarantee. See how we scan.
Option 1: install from the MCP Store
This is the quickest route for servers Google already supports.
In the Antigravity IDE (quoted from the docs, not run for this post):
- Click … at the top of the editor's agent side panel and select MCP Servers.
- Hover over a server and click Install, or open its details and click Install.
- Follow any prompts, such as signing in.
In the Antigravity 2.0 app (quoted from the docs, not run for this post):
- Click Customizations in the sidebar, then Installed, and scroll to MCP Servers.
- Click Add MCP Server (+), search for the server, then click Add.
- To restart, disable or delete a server later, use its More actions (⋮) menu. Copy Config File Path in the section header shows you which
mcp_config.jsonit wrote to.
Option 2: add a custom server to mcp_config.json
Use this for any server that is not in the store.
Open the file
- IDE: … at the top of the agent panel, then MCP Servers, then Manage MCP Servers, then View raw config.
- 2.0 app: use Copy Config File Path under Customizations, Installed, MCP Servers, and open that file.
- Any client: open
~/.gemini/config/mcp_config.json(all projects) or.agents/mcp_config.jsonin your project (that project only) in any editor.
How to install an MCP server locally (stdio)
A local server is a program Antigravity starts for you. Here is the official filesystem reference server, limited to one folder. Version 2.4.1 was the current npm release when we checked on 2026-11-29 (npm view @modelcontextprotocol/server-filesystem version, run on 2026-11-29).
{
"mcpServers": {
"filesystem": {
"command": "npx",
"args": [
"-y",
"@modelcontextprotocol/server-filesystem@2.4.1",
"/Users/you/projects/notes"
]
}
}
}
This JSON was checked as valid on 2026-11-29; the server itself was not started for this post. On Windows, escape backslashes ("C:\\Users\\you\\notes"). Secrets go in an env object rather than in args, as in the docs' own example:
{
"mcpServers": {
"sqlite-explorer": {
"command": "node",
"args": ["/usr/local/bin/sqlite-mcp-server.js"],
"env": { "SQLITE_DB_PATH": "/var/data/app.db" }
}
}
}
That block is quoted from the Antigravity docs. You can also set cwd for the process's working directory. Not sure whether you need a local or a remote server? See local vs remote MCP servers.
Remote servers
Use serverUrl for a remote server that speaks Streamable HTTP. Antigravity does not support the older HTTP+SSE transport, and it does not accept the httpUrl field some other clients use. Headers carry an API key. This example is from Google's Developer Knowledge MCP codelab, with the codelab's placeholder ellipses removed:
{
"mcpServers": {
"google-developer-knowledge": {
"serverUrl": "https://developerknowledge.googleapis.com/mcp",
"headers": { "X-Goog-Api-Key": "<YOUR_API_KEY>" }
}
}
}
Keep a real key out of any .agents/mcp_config.json you commit to git. A per-user key belongs in the global file.
OAuth for remote servers
Antigravity runs OAuth 2.0 with PKCE for remote servers and looks for client credentials in this order, per the docs: a manual oauth.clientId (and optional clientSecret) in your config, then Client ID Metadata Documents (CIMD), then dynamic client registration (DCR). Most servers that support DCR need no extra config. If you register your own OAuth client, the redirect URI to add is https://antigravity.google/oauth-callback. The docs say CIMD support needs IDE version 2.6.0 or later.
For Google Cloud services that accept Application Default Credentials, set "authProviderType": "google_credentials" and run gcloud auth application-default login (quoted from the docs, not run for this post).
Once a server is listed, click Authenticate next to it, sign in in the browser, paste the code into Enter authorization code and click Submit. Google's Workspace MCP guide uses this same flow for Gmail, Drive, Calendar and the other Workspace servers.
Refresh and confirm
- IDE or 2.0 app: Settings, then Customizations, then under Installed MCP Servers click Refresh.
- CLI: start
agy, type/mcpand press Enter. The MCP Manager shows each server's status, lets you reload configs and shows connection logs. Signed-in servers show Authed.
The first time the agent calls a new tool, Antigravity asks you to approve it.
Antigravity CLI and MCP
The Antigravity CLI reads the same mcp_config.json files. As of 2026-11-29 the docs show no agy mcp add command: you edit the file, then open /mcp to check and authenticate. The one MCP-related install command the docs show is a plugin install, agy plugin install google-developer-knowledge; enabled plugins can bring their own mcp_config.json.
Fine-tune what each server can do
These fields are in the docs' property table and are not covered by the top guides we read today. They are where Antigravity differs most from other MCP clients.
| Field | What it does |
|---|---|
enabledTools | Allowlist. Only the named tools are visible to the agent. |
disabledTools | Denylist. Hides the named tools. |
disabled | true keeps the config but stops connecting. |
timeoutSeconds | Replaces both timeouts. A negative value turns them off. |
tools.<name>.eager | Loads that tool's schema into every turn. |
tools.<name>.background | "always" runs that tool's calls as background tasks. |
Use enabledTools for least privilege. If a server exposes many tools and you need three read tools, list those three. The docs say all other tools are hidden from the agent, which shrinks the blast radius if a prompt injection steers it.
Lazy loading is the default, and that is context engineering. Antigravity writes tool schemas to disk and lets the model call them through a built-in call_mcp_tool tool, instead of putting every schema in every prompt. This is a form of progressive disclosure, the same idea behind dynamic tool loading in other agents. Setting "eager": true on a tool registers it directly as mcp_<server>_<tool>, which the docs note costs more tokens per turn. Keep eager mode for the two or three tools you call constantly.
Set permission policies. MCP tools you have not configured run in Ask mode, which is human-in-the-loop approval for each call. You can write permission rules with patterns like mcp(server/tool), mcp(server/*) or mcp(*). Allow a single read-only tool rather than a whole server.
Here is a config that combines these, written for this post and checked as valid JSON on 2026-11-29:
{
"mcpServers": {
"filesystem": {
"command": "npx",
"args": ["-y", "@modelcontextprotocol/server-filesystem@2.4.1", "/Users/you/projects/notes"],
"enabledTools": ["read_text_file", "list_directory", "search_files"],
"timeoutSeconds": 60
}
}
}
The three tool names come from the filesystem server's README. Check them against the tool list Antigravity shows, since names can change between versions.
Best MCP servers for Antigravity, by one stated criterion
"Best" depends on your work, so this list uses one test: the publisher has its own Antigravity setup page, checked on 2026-11-29. That means the config was written for Antigravity, not adapted from a Cursor guide.
| Server | Type | Auth | Antigravity guide |
|---|---|---|---|
| Google Developer Knowledge | Remote | API key header | Google codelab |
| Google Workspace (Gmail, Drive, Docs, Sheets, Calendar and more) | Remote, one server per service | OAuth client | Workspace guide |
| Unity MCP | Config copied from Unity's Gemini integration | Set up in Unity | Android Developers |
| Silicon Labs docs | Remote | Sign-in prompt | Silicon Labs docs |
| daisyUI Blueprint | Local (npx) | Paid licence key in env | daisyUI |
Two notes from reading these pages. The Silicon Labs page bridges its remote server through npx mcp-remote; follow their page if you use it. The daisyUI page uses daisyui-blueprint@latest, so consider pinning a version. For general-purpose picks outside Antigravity, see our best MCP servers list, or search the catalogue from a terminal:
npx agxmart search postgres
(Command quoted from our developer docs, not run for this post.)
Troubleshooting
- Server never appears: check the JSON is valid and that each entry has exactly one of
commandorserverUrl. Then Refresh, or reload in/mcp. - "timed out after 3m0s": the tool call hit the 180-second default. Raise
timeoutSecondsfor that server. A very small value can also stop a slow server from connecting at all. - Remote server fails to connect: it may only speak HTTP+SSE, which Antigravity does not support.
- Tool missing: check
enabledToolsanddisabledToolsfor that server. - Asked to sign in every hour (Workspace): Google's guide says web clients default to online access; it suggests requesting offline access.
- Many servers, rising cost or confusion: an MCP gateway can put many servers behind one endpoint with shared policy.
FAQ
How do I install an MCP server in Antigravity?
Install it from the MCP Store (IDE: …, then MCP Servers; 2.0 app: Customizations, Installed, Add MCP Server), or add an entry to ~/.gemini/config/mcp_config.json under mcpServers. Then click Refresh under Installed MCP Servers, or run /mcp in the CLI.
How do I install an MCP server locally in Antigravity?
Add an entry with command and args, for example npx with a pinned package and the folder it may use. Antigravity starts the process itself over stdio, so you do not run it separately. Put secrets in env, not in args.
Where is the Antigravity mcp_config.json file?
The global file is ~/.gemini/config/mcp_config.json, and a per-project file can live at .agents/mcp_config.json in your workspace. In the 2.0 app, Copy Config File Path shows the exact location.
What are the best MCP servers for Antigravity?
It depends on your stack. Using the test "the publisher has its own Antigravity setup page" (2026-11-29), the list above includes Google Developer Knowledge, the Google Workspace servers, Unity MCP, Silicon Labs docs and daisyUI Blueprint. Check what each one can touch before you add it.
Does the Antigravity CLI support MCP servers?
Yes. agy reads the same mcp_config.json files, and /mcp opens the MCP Manager for status, reloads, logs and sign-in. As of 2026-11-29 the docs show no agy mcp add command.
List your MCP server on AGXmart
Built a server that works in Antigravity? Add a link to your Antigravity config in the README, then list it free on AGXmart. You get a listing page with "What it can touch" and a free automated scan. List it and start selling: see /sell.
Browse agents, MCP servers and skills on AGXmart, see what each can touch, and explore the newest standards on our agent protocol map. List yours and start selling.