# Antigravity MCP Setup: The Right Config Path and Prompts

> Antigravity MCP setup tested on November 6, 2026: where mcp_config.json lives, remote vs npx entries, reloading, and prompts that install real components.

- Author: [Serban Rusu](https://wingo-ui.com/blog/authors/serban), Founder of Wingo UI
- Published: Nov 6, 2026
- Category: [Building UI with AI agents](https://wingo-ui.com/blog/category/ai-agents)
- Reading time: 10 min
- Canonical: https://wingo-ui.com/blog/antigravity-mcp

## TL;DR

Google Antigravity reads MCP servers from ~/.gemini/config/mcp_config.json, one file shared by the Antigravity app, the IDE and the agy CLI; older guides point to ~/.gemini/antigravity/mcp_config.json, the path from before a migration. Run agy mcp add wingo-ui npx -y wingo-ui@latest mcp (or add a remote entry with serverUrl https://wingo-ui.com/mcp), then refresh the server list. An AGENTS.md block that says to search the registry before writing UI makes the agent install real components.

Ask the Antigravity agent for a customers table and it writes one from training data: a plain `<table>`, a hand-rolled filter, no phone layout. An Antigravity MCP server entry fixes that by giving the agent a component registry it can search, read props from and install from. The hard part is the config file. Search results disagree about where `mcp_config.json` lives, which key a remote server needs and whether a project can have its own. This tutorial answers those from the binaries on our machine, adds a component library (ours, Wingo UI) and the shadcn server, and ends with prompts that turn into real components.

We checked everything on November 6, 2026 on macOS with the Antigravity app 2.16.0, Antigravity IDE 2.6.0 and the `agy` CLI 1.5.1, plus our CLI 1.0.4 and shadcn 4.23.0. We ran `agy mcp add` and `agy mcp list` in a throwaway home folder, read the MCP docs bundled inside the app and the CLI, and called our stdio server directly. We did not grade what the agent writes, which depends on the model you pick. Why an agent needs a component server at all is in our [component library MCP guide](https://wingo-ui.com/blog/component-library-mcp-guide).

## Where is the Antigravity MCP config file?

`~/.gemini/config/mcp_config.json`. One file serves all three surfaces:

| Surface | Version checked | Reads MCP servers from | How to open or reload |
| --- | --- | --- | --- |
| Antigravity app | 2.16.0 | `~/.gemini/config/mcp_config.json` | Settings > Customizations > Installed MCP Servers |
| Antigravity IDE | 2.6.0 | `~/.gemini/config/mcp_config.json` | Agent panel `...` > MCP Servers > Manage MCP Servers > View raw config |
| `agy` CLI | 1.5.1 | `~/.gemini/config/mcp_config.json` | `/mcp` in a session, `agy mcp list` in the shell |

For the IDE we read the code that builds the path: it joins your home folder with `.gemini`, `config` and `mcp_config.json`. The app's language server and the CLI ship the same docs page, which names `~/.gemini/config/mcp_config.json` as the global configuration that "applies to all sessions". Google's [Antigravity MCP docs](https://antigravity.google/docs/mcp) and its [Workspace MCP guide](https://developers.google.com/workspace/guides/configure-mcp-servers) say the same as of November 6, 2026.

### Why do other guides say ~/.gemini/antigravity/mcp_config.json?

Because that was the older path. On our machine `~/.gemini/config/` holds a `.migrated` marker, and the changelog bundled with `agy` describes a fix for a `[Disable]` button that wrote to the legacy path instead of the migrated `config/mcp_config.json`. Guides written before the move still show `~/.gemini/antigravity/mcp_config.json`. If you edited that file and nothing appeared, this is why.

A [community guide on dev.to](https://dev.to/gde/configuring-mcp-servers-and-skills-for-antigravity-cli-and-ide-2bh0) from May 2026 also lists `~/.gemini/antigravity-cli/mcp/` and `~/.gemini/antigravity-ide/mcp/`. The guide marks both as generated from the shared config. Edit the shared file, never those.

### Can a project have its own mcp_config.json?

Google's docs say yes: `<workspace>/.agents/mcp_config.json` applies to one workspace. We could not confirm it. With a server in `.agents/mcp_config.json`, `agy mcp list` printed `No MCP servers configured.`, `agy mcp add` wrote only the global file, and the docs bundled in all three builds mention only the global file and plugin folders. Until you have seen a workspace server appear in your own build, put servers in the global file.

## What goes in the Antigravity mcp_config JSON?

A map under `mcpServers`, with one entry per server. A stdio entry has `command`, `args` and an optional `env`. A remote entry has `serverUrl` (or `url`) and optional `headers`. Google's docs list more optional keys: `disabled`, `enabledTools`, `disabledTools` and `timeoutSeconds`. The file may contain `//` and `/* */` comments and trailing commas: the `agy` changelog lists a fix for configs that failed to parse with them.

The quickest way to get a correct entry is to let `agy` write it:

```bash
agy mcp add wingo-ui npx -y wingo-ui@latest mcp
agy mcp list
```

That printed `Added MCP server "wingo-ui" (stdio)` and then:

```text
NAME      TYPE   STATUS   COMMAND/URL
wingo-ui  stdio  enabled  npx -y wingo-ui@latest mcp
```

And this is the file it wrote:

```json
{
  "mcpServers": {
    "wingo-ui": {
      "args": ["-y", "wingo-ui@latest", "mcp"],
      "command": "npx",
      "disabled": false
    }
  }
}
```

The `-y` matters. Without it, npx stops to ask before it downloads a package, and nobody answers a server that Antigravity started in the background. We saw exactly that failure in our [Gemini CLI shadcn setup](https://wingo-ui.com/blog/gemini-cli-shadcn-mcp).

Note that `agy mcp list` only shows what is configured. Connection status and the tool list are in `/mcp` inside a session or in the app's MCP Servers section.

## Remote entry or npx stdio entry: which should I use?

Our server answers both ways. The stdio entry above runs a small local proxy, `npx wingo-ui@latest mcp`, which forwards to `https://wingo-ui.com/mcp` and adds the key that `npx wingo-ui@latest login` saved on your machine. The remote entry talks to the server directly:

```bash
agy mcp add --header "Authorization: Bearer wui_your_key" wingo-ui https://wingo-ui.com/mcp
```

```json
{
  "mcpServers": {
    "wingo-ui": {
      "disabled": false,
      "headers": { "Authorization": "Bearer wui_your_key" },
      "serverUrl": "https://wingo-ui.com/mcp"
    }
  }
}
```

`agy` detects the URL and picks HTTP on its own. Flags go before the name: `agy mcp add wingo-ui https://wingo-ui.com/mcp --header ...` fails with `http server type does not accept command arguments`.

| | stdio (`npx -y wingo-ui@latest mcp`) | remote (`serverUrl`) |
| --- | --- | --- |
| Needs Node on the machine | Yes | No |
| Where the key lives | The CLI's login store, or `WINGO_UI_API_KEY` | In `mcp_config.json` as plain text |
| Without a key | Docs, props and search, no source | The same |
| New server tools | Mirrored from the remote server on connect | Listed by the remote server on connect |

We recommend stdio for most people, because of the key row. Google's MCP docs do not mention `${VAR}` expansion in `headers` or `env` as of November 6, 2026, and the dev.to author writes that environment variables for API keys "isn't working for me" in the CLI and IDE. We could not test it without a signed-in session. So assume the header value is sent exactly as written, and keep that file out of dotfile repositories.

When our stdio proxy started without a key, it printed `serving https://wingo-ui.com/mcp (anonymous: docs only ...)` to stderr and answered `tools/list` with 10 tools, all marked read-only: `search_components`, `list_categories`, `get_component`, `get_block`, `get_design_rules`, `get_theme_tokens`, `get_install_instructions`, `check_updates`, `get_changelog` and `get_account_status`. Every tool and option is on the [MCP server docs](https://wingo-ui.com/docs/mcp).

## How do I add an Antigravity shadcn MCP entry?

The same way, by hand. In shadcn 4.23.0, `npx shadcn@latest mcp init --client` accepts `claude`, `cursor`, `vscode`, `codex` and `opencode`, and shadcn's [MCP docs](https://ui.shadcn.com/docs/mcp) do not mention Antigravity as of November 6, 2026:

```bash
agy mcp add shadcn npx -y shadcn@latest mcp
```

That writes `"command": "npx"` with `"args": ["-y", "shadcn@latest", "mcp"]`. The shadcn server searches the registries in your `components.json` and returns `npx shadcn@latest add` commands. In our earlier tests it returned no props, so for components with a large API you want the library's own server next to it.

With both servers in one project, both libraries install a `button.tsx` with different props. Say in your rules which registry owns which folder, so the agent knows whose API it is reading.

## How do I reload Antigravity MCP servers after an edit?

Refresh the server list; you rarely need a full restart. Per Google's MCP docs and its Workspace guide as of November 6, 2026:

- **App:** Settings > Customizations, then Refresh under Installed MCP Servers. Each server's More actions menu also has Restart, Disable and Delete.
- **IDE:** Antigravity User Settings > Customizations > Refresh, the same steps as the app. Manage MCP Servers in the agent panel opens the raw config.
- **CLI:** `/mcp` opens the MCP Manager, which reloads configurations and shows connection logs.

Then ask one question only the server can answer: "Call get_account_status on the wingo-ui server." Without a key it says you are anonymous.

Google's docs also say unconfigured MCP tools run in Ask mode, so the agent asks before each call. Permission rules accept patterns such as `mcp(wingo-ui/*)` if you want to allow a read-only server once. Keep shell installs on confirm.

## What should the rules file say?

When to search, how to install, which tokens to use. Antigravity loads `GEMINI.md` and `AGENTS.md` from the folder you work in up to the repository root, according to its bundled docs, and Google's [rules docs](https://antigravity.google/docs/rules) add `.agents/rules/*.md` (as of November 6, 2026). Each rule file is capped at 24,000 bytes. Our CLI has no Antigravity target (`agents install` knows Claude Code, Codex, Gemini CLI, Grok and Cursor), so fetch the same block it writes for Codex:

```bash
curl -s https://wingo-ui.com/agents/AGENTS.md >> AGENTS.md
```

The block sits between `<!-- wingo-ui:start v=3 -->` and `<!-- wingo-ui:end -->` markers. Its core line:

```md
- Before writing UI, use the `wingo-ui` MCP tools: `search_components` to find what exists (blocks for whole screens), `get_component` / `get_block` for props and usage, `get_design_rules` for tokens, sizes, motion and mobile rules. Never recreate a component the library has.
```

`AGENTS.md` is also what Codex, Cursor and Grok read, so one file covers the team. Our [AGENTS.md vs CLAUDE.md comparison](https://wingo-ui.com/blog/agents-md-vs-claude-md-react) has a fuller template.

## Which prompts get the agent to install real components?

Name the screen, the data and what the agent should report back. The rules already send it to `search_components`, then `get_component` or `get_block`, then `npx wingo-ui@latest add`. The prompt supplies what a rules file cannot: columns, routes and copy.

### Prompt 1: a customers table

```text
Build app/customers with the Wingo UI data table. Search the wingo-ui MCP server first and read its
props with get_component. Columns: name, email, status (Active, Trial, Past due) as a badge with a
filter, plan, MRR with a total, signup date. Multiple selection with an Export CSV bulk action, and
each row opens /customers/<id>. Install it with the CLI, then open the page at 390px and 1440px.
```

The [Data Table](https://wingo-ui.com/components/data-table) covers every line of that prompt with props. The core of a good result:

```tsx
// app/customers/customers-table.tsx
"use client";

import { useRouter } from "next/navigation";
import { DataTable, createColumns } from "@/components/ui/data-table";

export type Customer = {
  id: string;
  name: string;
  email: string;
  plan: "Free" | "Pro";
  status: "Active" | "Trial" | "Past due";
  mrr: number;
  signedUpAt: string;
};

const col = createColumns<Customer>();
const columns = col([
  col.accessor("name", { header: "Customer", mobile: "title" }),
  col.accessor("email", { header: "Email", mobile: "subtitle" }),
  col.accessor("status", {
    header: "Status",
    type: "badge",
    badge: { Active: { tone: "success" }, Trial: { tone: "info" }, "Past due": { tone: "danger" } },
    filter: "multi-select",
    mobile: "meta",
  }),
  col.accessor("plan", { header: "Plan", filter: "select" }),
  col.accessor("mrr", { header: "MRR", type: "currency", footer: "sum" }),
  col.accessor("signedUpAt", { header: "Signed up", type: "date" }),
]);

type Props = { customers: Customer[]; onExport: (ids: string[]) => Promise<unknown> };

export function CustomersTable({ customers, onExport }: Props) {
  const router = useRouter();
  return (
    <DataTable
      data={customers}
      columns={columns}
      caption="Customers"
      locale="en-US"
      selectionMode="multiple"
      bulkActions={(_rows, keys) => [{ label: "Export CSV", onSelect: () => onExport(keys) }]}
      onRowClick={(row) => router.push(`/customers/${row.id}`)}
    />
  );
}
```

The `mobile` roles are the part a model writing from memory skips: below 768px each row becomes a card with the name as its title.

> Live demo (Data Table): Tick two rows to see the bulk bar replace the toolbar, then narrow the window below 768px: rows turn into cards. Try it at [Data Table](https://wingo-ui.com/components/data-table) and install it with `npx wingo-ui@latest add data-table`.

### Prompt 2: a sign-in screen

```text
Build /login from the Wingo UI login-page block, card layout, password and 6 digit email code, no
social buttons. Post to our /api/auth routes and go to /dashboard on success. Replace every
Northwind string in the labels with Harbor and list each handler you left on its sample default.
```

The [Login Page](https://wingo-ui.com/components/login-page) ships sample handlers so its demo runs, and its default labels name Northwind CRM. That is why the prompt asks for a report: without `onVerifyCode`, the code view accepts 123456 for anyone. A good result passes `layout="card"`, `methods={["password", "otp"]}`, `showProviders={false}`, `labels` with `appName`, `signInDescription` and `copyright`, and real `onSignIn`, `onSendCode`, `onVerifyCode` and `onSuccess` handlers. The complete component with those handlers is in our [Gemini CLI shadcn setup](https://wingo-ui.com/blog/gemini-cli-shadcn-mcp).

> Live demo (Login Page): Type any email and a password shorter than 8 characters to see the error alert, then open Forgot password: the email carries over. Try it at [Login Page](https://wingo-ui.com/components/login-page) and install it with `npx wingo-ui@latest add login-page`.

### Prompt 3: swap a hand-written spinner

```text
Find every button in app/account that renders its own spinner while saving and replace it with the
Wingo UI button. Read its props with get_component first and show me the diff.
```

Our [Button](https://wingo-ui.com/components/button) has a `loading` prop, so the spinner markup and the `disabled` juggling go away:

```tsx
import { Button } from "@/components/ui/button";

export function SaveButton({ saving, onSave }: { saving: boolean; onSave: () => void }) {
  return (
    <Button tone="brand" loading={saving} loadingText="Saving" onClick={onSave}>
      Save changes
    </Button>
  );
}
```

## What goes wrong, and how do I fix it?

- **Nothing shows up after an edit.** You edited `~/.gemini/antigravity/mcp_config.json` or a generated `mcp/` folder. Move the entry to `~/.gemini/config/mcp_config.json` and refresh.
- **The server fails to start over stdio.** Usually npx waiting for an install answer: add `-y` to `args`.
- **A remote server will not connect.** Check that the URL is a Streamable HTTP endpoint (`/mcp`, not `/sse`) and that the key is the literal value, not a variable name.
- **Connected, but no source.** No key: run `npx wingo-ui@latest login` (a free account needs only an email) and refresh the server.
- **Pro blocks with a free key.** `get_block` still returns props and usage for `login-page`, and `npx wingo-ui@latest add login-page` stops because the block is part of Pro. The Button is free; the Data Table and Login Page are Pro ($8 a month, $80 a year or $150 once, on the [pricing page](https://wingo-ui.com/pricing)).

## Where should I start?

Create a free account, run `npx wingo-ui@latest login`, then `agy mcp add wingo-ui npx -y wingo-ui@latest mcp`, add the `AGENTS.md` block and try prompt 3 on the free Button. The [coding agents docs](https://wingo-ui.com/docs/agents) cover the other agents. The same setup for other editors is in our [Codex MCP setup](https://wingo-ui.com/blog/codex-mcp-setup-react-ui), [Cursor shadcn setup](https://wingo-ui.com/blog/cursor-shadcn-mcp-rules), [Copilot shadcn setup](https://wingo-ui.com/blog/copilot-shadcn-mcp-setup) and [OpenCode MCP setup](https://wingo-ui.com/blog/opencode-mcp), and the rest of the series is under [Building UI with AI agents](https://wingo-ui.com/blog/category/ai-agents).

## Components in this post

- [Button](https://wingo-ui.com/components/button) (Free): The React button component every screen starts with: five variants, six tones, all sizes, and a loading state that never jumps. Install: `npx wingo-ui@latest add button`
- [Login Page](https://wingo-ui.com/components/login-page) (Pro): A React login page with password, magic link or code sign-in, Google, Apple and Microsoft buttons, two-step codes and password recovery. Install: `npx wingo-ui@latest add login-page`
- [Data Table](https://wingo-ui.com/components/data-table) (Pro): A React data table on TanStack Table: search, filters, sorting, bulk actions, pinning, resizing, virtualization and cards on phones. Install: `npx wingo-ui@latest add data-table`

## FAQ

### Where is the Antigravity MCP config file?

At ~/.gemini/config/mcp_config.json. In the builds we checked on November 6, 2026 (Antigravity 2.16.0, Antigravity IDE 2.6.0 and agy 1.5.1 on macOS), all three read and write that one file. The app shows the path through Copy Config File Path in its MCP Servers section.

### Does Antigravity support a project-level mcp_config.json?

Google's MCP docs list <workspace>/.agents/mcp_config.json for one workspace. In agy 1.5.1, agy mcp list ignored that file and agy mcp add wrote only the global one, so the global file is the safer place until you have confirmed it in your own build.

### Should a remote server use serverUrl or url in Antigravity?

Either works. Google's docs use serverUrl and accept url, the CLI's bundled docs call serverUrl the legacy key, and agy mcp add still writes serverUrl. httpUrl and the old HTTP+SSE transport are not supported.

### Does the shadcn MCP server work with Antigravity?

Yes, as a manual stdio entry: agy mcp add shadcn npx -y shadcn@latest mcp. In shadcn 4.23.0, mcp init --client accepts claude, cursor, vscode, codex and opencode, not Antigravity, so it will not write the file for you.

### Do I need to restart Antigravity after editing mcp_config.json?

No, refresh the server list: Settings > Customizations > Refresh under Installed MCP Servers in the app or IDE, Restart on a single server in the app, or /mcp in the CLI. A full restart only helps when a server stays stuck.

---

Source: https://wingo-ui.com/blog/antigravity-mcp
