Large Language ModelsGenerate imagesGenerate videos

Antigravity MCP Config: File Location, Store and Common Errors

Where does Antigravity keep mcp_config.json, and why does your edit sometimes change nothing? See the global and workspace paths on Windows, macOS and Linux, the three ways to open the file, how the MCP Store adds servers, a working JSON example, and fixes for the errors people hit most.

Antigravity MCP Config: File Location, Store and Common Errors
Cristian Da Conceicao
Founder of Picasso IA

You paste a new server into Antigravity, press Refresh, and the tool list stays empty. Often the server is fine. The problem is the file: which mcp_config.json the app reads, where it sits on your disk, and whether the JSON uses the field names Antigravity expects. Google's own pages point to two different paths, forum posts show people editing the wrong copy, and the error messages are short enough to feel like riddles.

This article pins down the facts. You get the exact file location on Windows, macOS and Linux, three ways to open the file from the app, a tour of the MCP Store, a config that holds up, and a plain fix for each common error. Where the sources disagree, the text says so instead of guessing.

Where mcp_config.json Lives

Antigravity keeps every MCP server definition in one JSON file named mcp_config.json. The official MCP page lists a global file that applies to all projects and a workspace file that applies to a single repository.

Developer opening a hidden folder tree to find the Antigravity MCP config file

Global Path by Operating System

SystemGlobal path
Windows%USERPROFILE%\.gemini\config\mcp_config.json
macOS~/.gemini/config/mcp_config.json
Linux~/.gemini/config/mcp_config.json

On Windows, %USERPROFILE% expands to something like C:\Users\YourName. The .gemini folder starts with a dot, so Finder and most Linux file managers hide it. In Finder press Cmd+Shift+. to show hidden items, in the Windows file manager tick Hidden items under the View menu, or skip the browsing and paste the full path into the address bar or the Go to Folder box.

Laptop on a cafe table showing a dark code window, a typical macOS setup for editing the MCP config

Workspace Config for One Project

Inside a repository, the docs name .agents/mcp_config.json as the workspace location. It suits servers that only make sense for one codebase, such as a database server pointed at that project's development schema. A Japanese troubleshooting write-up reports that workspace settings can override the global file, so check this path first when a server behaves differently inside one repo.

💡 Tip: If a workspace file holds tokens, add .agents/mcp_config.json to .gitignore before your next commit.

Why Docs Disagree on the Path

The current docs and the CloudBees Unify setup page use ~/.gemini/config/mcp_config.json. Older tutorials, many server READMEs and the macOS PATH bug report use ~/.gemini/antigravity/mcp_config.json. The OAuth token file also sits in the antigravity folder, which is part of why that folder name keeps showing up.

No page says which file wins when both exist. Settle it with a test: add a harmless entry to one file, press Refresh, and see whether it appears in the server list. If it does not, you edited the wrong one. Then keep a single live file and rename the stray copy to mcp_config.json.bak so the two never drift apart. Opening the file through View raw config in the IDE is the quickest way to see which one your build uses.

Three Ways to Open the File

You do not have to hunt through hidden folders. Each Antigravity surface has its own door to the same configuration.

Hands editing the raw MCP config file in a dark code editor

From the IDE Agent Panel

In the Antigravity IDE, click the … menu at the top of the agent side panel, then choose MCP Servers, then Manage MCP Servers, then View raw config. The file opens in the editor. Save it, go back to the Manage MCP Servers screen and press Refresh. That last click is the step the troubleshooting threads recommend again and again.

From Antigravity 2.0 Settings

In Antigravity 2.0 the route is Settings (bottom left), then Customizations, then Installed MCP Servers. Each server has a toggle, a trash can and a shared Refresh button. The command line tool has its own door: type /mcp in the prompt panel to open the interactive MCP Manager. It also shows connection logs, including response codes such as 401, 403 and 404 and timeouts, which makes it the best place to read what actually went wrong.

How the MCP Store Works

The MCP Store is a searchable list of ready-made servers. The docs describe 76 or more integrations across databases, developer tools, design platforms, security and analytics. You reach it from Installed MCP Servers by clicking Add MCP, or from the MCP Servers menu in the IDE agent panel.

Desk with a laptop and a tablet showing a grid of blank tiles, like a store of MCP servers

Add a Server From the Store

  1. Open Settings, then Customizations, then Installed MCP Servers.
  2. Click Add MCP to open the store.
  3. Search or scroll to the server you want and click Add.
  4. Finish the sign in if the server asks for one.
  5. Check that the toggle is on, then press Refresh.

Open the raw config once after your first store install. The entry the store wrote is a ready-made template for the entries you write by hand later.

💡 Tip: Use the store for servers that need OAuth, because it handles the sign in screen. Use hand-written JSON for local scripts, private servers and anything that needs custom headers.

Where OAuth Tokens End Up

Per the docs, OAuth tokens are saved in ~/.gemini/antigravity/mcp_oauth_tokens.json. Treat that file like a password vault: keep it out of dotfile repositories and cloud sync folders. When a sign in keeps failing, use the Sign out button in the IDE first, or check for the Authed status in the CLI /mcp view. Deleting the token file is a last resort, and it may sign you out of every remote server at once.

A Config That Actually Works

The file has one top-level object, mcpServers, and every server is a named entry inside it. Names should have no spaces. A forum thread about the Figma server found that a suggested name like "Figma Desktop" had to become FigmaDesktop, and that the URL field had to be serverUrl, not url.

Developer at a desk with two monitors editing mcp_config.json server entries

Local Servers With command and args

{
  "mcpServers": {
    "filesystem": {
      "command": "npx",
      "args": ["-y", "@modelcontextprotocol/server-filesystem", "C:/Users/you/projects"],
      "env": { "NODE_ENV": "production" },
      "cwd": "C:/Users/you/projects"
    }
  }
}

On Windows, write paths with forward slashes or double the backslashes (C:\\Users\\you), because a single backslash is an escape character in JSON. Here is what each field does:

FieldPurposeNotes
commandProgram that starts a local serverMust be on PATH, or use an absolute path
argsArguments for that programOne string per argument
envEnvironment variablesPut tokens here instead of in args
cwdWorking directoryOptional
serverUrlEndpoint of a remote serverReplaces command for HTTP servers
headersHTTP headers sent to a remote serverBearer tokens go here
oauthClient settings such as clientIdNeeded by some remote servers
disabledToolsTool names hidden from the modelHelps with the 100 tool limit

Remote Servers With serverUrl

{
  "mcpServers": {
    "remote-example": {
      "serverUrl": "https://api.example.com/mcp/",
      "headers": { "Authorization": "Bearer YOUR_TOKEN" }
    }
  }
}

The docs say plain url fields are not supported for remote servers, so a snippet copied from another editor needs that one rename. Servers that use OAuth take an oauth block instead of a header: the CloudBees page shows "oauth": { "clientId": "public-mcp-client" }. For Google Workspace servers you create a Web application OAuth client in Google Cloud Console, add https://antigravity.google/oauth-callback as a redirect URI, and put the clientId and clientSecret in the oauth section. Servers that accept Google application default credentials use "authProviderType": "google_credentials".

Before saving, check three things that break JSON more often than any Antigravity bug: trailing commas, comments (JSON allows none), and curly quotes pasted from a web page.

Common Errors and Fixes

Developer concentrating on an MCP connection error on a laptop screen

MessageLikely causeFirst fix
context deadline exceeded or [MCP Proxy] Socket connection error: connect ENOENTInitialization failed at IDE startupManage MCP Servers, then Refresh
exec: "npx": executable file not found in $PATHThe app launched from the Dock or Spotlight without your shell PATHLaunch with agy from a terminal, or use an absolute path
calling 'initialize': sending 'initialize': UnauthorizedToken missing from the first request to a remote serverUpdate the app and sign in again
enabled tools would exceed max limit of 100Too many enabled tools across all serversDisable servers or list disabledTools
connection closed: calling 'initialize': client is closing: EOFThe server process exited during the handshakeRun the same command in a terminal and read its output

Context Deadline Exceeded

This shows up at startup, together with the ENOENT socket message, when a server does not finish initializing in time. The reported fix is simple: open Manage MCP Servers and press Refresh. If it comes back at every restart, a practical workaround is to install the server package globally and point command at the installed binary, so nothing has to be downloaded while the IDE is booting.

Executable Not Found in PATH

Messages such as exec: "npx": executable file not found in $PATH appear when Antigravity is started from the macOS Dock or Spotlight. The app inherits the sparse system PATH (/usr/bin:/bin:/usr/sbin:/sbin) instead of the one from your shell profile. The thread reports it on version 1.22.2 and lists these workarounds:

  • Start the app from a terminal with the agy command.
  • Put the absolute path in command. Run which npx and paste the result, for example /opt/homebrew/bin/npx on a typical Apple Silicon Homebrew setup.
  • Create a small wrapper script that loads your Node version manager before starting the server.

Windows users should run where npx in a terminal first. If it prints nothing, the problem is the Node install, not the config.

Unauthorized on Initialize

Network patch panel with neatly routed cables, standing in for a remote MCP server connection

An Unauthorized error on initialize means a remote server got the first request without a usable token. Update Antigravity, sign out of the server and sign in again. If you use a header token, confirm the field is named Authorization, the value starts with Bearer and the token has not expired. The status code in the CLI /mcp logs narrows it down: 401 points to missing or bad credentials, 403 to a token without the right permissions, and 404 to a wrong URL path.

More Than 100 Tools

Antigravity refuses to connect when the enabled tools across all servers would pass 100. Large servers for GitHub or databases can expose dozens of tools each, so three or four of them are enough to hit the wall. Switch off servers you are not using, or hide individual tools with the disabledTools property listed in the docs.

One more pattern is worth knowing. A report on the Google AI developers forum describes a Roblox Studio server, started through a batch file, that failed with the EOF message on Hub 2.4.3, 2.5.0 and 2.8.0 and only worked again after rolling back to Hub 2.2.1. When a local server fails this way, run its exact command in a terminal. If it fails there too, the config is fine and the server is the problem. If it works there, suspect a version regression and check the forum before changing your JSON.

Use Gemini 3.1 Pro on PicassoIA

When the JSON refuses to behave, a language model makes a fast proofreader. Gemini 3.1 Pro runs in the browser on PicassoIA, accepts text plus up to 10 images, and lets you set how hard it thinks before answering.

Woman reading an AI chat reply on a laptop while debugging a JSON config

Steps to Follow

  1. Open the Gemini 3.1 Pro page on PicassoIA.
  2. Replace every real token in your config with YOUR_TOKEN before pasting anything.
  3. Paste your JSON into the Prompt field after a clear instruction, for example: "Check this Antigravity mcp_config.json for syntax errors and wrong field names. Remote servers must use serverUrl, not url. Server names must not contain spaces. List each problem, then return the corrected JSON only."
  4. Optional: attach a screenshot of the error panel in the Images field (up to 10 images, 7 MB each).
  5. Run the model, copy the corrected JSON into View raw config, save, and press Refresh.

Parameter Tips

  • thinking_level: the default is high. Keep it for a long config with many servers. low is enough for a plain syntax check.
  • temperature: the default is 1. Drop it to around 0.2 so the model returns the same JSON every time instead of getting creative.
  • system_instruction: set it to something like "You are a strict JSON validator for MCP configuration files" to keep the reply short.
  • max_output_tokens: the default is high enough for any config you will ever write, so leave it alone.

The model cannot see your disk, so treat any path it suggests as a guess and check it against the table earlier in this article. For a second opinion on the same prompt, run it through Claude Sonnet 4.6 as well and compare the two answers.

A Checklist Before You Restart

Run through this list before blaming the server:

  • The JSON parses: no trailing commas, no comments, straight quotes only.
  • Remote servers use serverUrl, and local servers use command with args.
  • Server names contain no spaces.
  • The command works in a terminal, or command holds an absolute path.
  • Tokens live in env or headers, and the file is out of version control if it holds secrets.
  • Enabled tools across all servers stay under 100.
  • You edited the file the app really reads, which you can confirm through View raw config.
  • You pressed Refresh and then checked the toggles or the CLI /mcp view.

💡 Tip: A server that works in your terminal but fails inside Antigravity usually points to an environment difference, most often PATH. Compare which or where output with what the app sees.

Try Picasso IA Yourself

Once your servers connect, your agent can build faster, and every project that ships needs visuals too: README banners, docs headers, blog headers and social previews. Picasso IA puts the image models in one place, so you can test a prompt, change the lens or the light, and generate again in seconds.

Photographer reviewing a printed photo beside a tablet in a sunlit studio

Start with Seedream 4.5 for detailed photorealistic scenes or P-Image for fast drafts. Describe the subject, the setting, the light direction and the camera lens, the same way you would brief a photographer. Browse the full model list, pick one that fits your next project, and create your first image today.

Share this article