Skip to content
WingoUI
ComponentsTemplatesDocsPricingAI agentsBlogChangelogContact
  1. Home
  2. Blog
  3. Building UI with AI agents
  4. Antigravity MCP Setup: The Right Config Path and Prompts
Auf Deutsch lesen
  1. Blog
  2. Building UI with AI agents
  3. Antigravity MCP Setup: The Right Config Path and Prompts
Building UI with AI agents
Building UI with AI agents

Antigravity MCP Setup: The Right Config Path and Prompts

SR
Serban Rusu · Founder of Wingo UI
Nov 6, 2026 · 10 min read

On this page

0%
  1. Where is the Antigravity MCP config file?
    1. Why do other guides say ~/.gemini/antigravity/mcp_config.json?
    2. Can a project have its own mcp_config.json?
  2. What goes in the Antigravity mcp_config JSON?
  3. Remote entry or npx stdio entry: which should I use?
  4. How do I add an Antigravity shadcn MCP entry?
  5. How do I reload Antigravity MCP servers after an edit?
  6. What should the rules file say?
  7. Which prompts get the agent to install real components?
    1. Prompt 1: a customers table
    2. Prompt 2: a sign-in screen
    3. Prompt 3: swap a hand-written spinner
  8. What goes wrong, and how do I fix it?
  9. Where should I start?
  10. FAQ
    1. Where is the Antigravity MCP config file?
    2. Does Antigravity support a project-level mcp_config.json?
    3. Should a remote server use serverUrl or url in Antigravity?
    4. Does the shadcn MCP server work with Antigravity?
    5. Do I need to restart Antigravity after editing mcp_config.json?

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.

Published Nov 6, 2026

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.

Where is the Antigravity MCP config file?

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

SurfaceVersion checkedReads MCP servers fromHow to open or reload
Antigravity app2.16.0~/.gemini/config/mcp_config.jsonSettings > Customizations > Installed MCP Servers
Antigravity IDE2.6.0~/.gemini/config/mcp_config.jsonAgent panel ... > MCP Servers > Manage MCP Servers > View raw config
agy CLI1.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 (opens in a new tab) and its Workspace MCP guide (opens in a new tab) 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 (opens in a new tab) 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.

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 machineYesNo
Where the key livesThe CLI's login store, or WINGO_UI_API_KEYIn mcp_config.json as plain text
Without a keyDocs, props and search, no sourceThe same
New server toolsMirrored from the remote server on connectListed 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.

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 (opens in a new tab) 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 (opens in a new tab) 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 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 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.

Tick two rows to see the bulk bar replace the toolbar, then narrow the window below 768px: rows turn into cards
$ npx wingo-ui@latest add data-table
ProData Table docs

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 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.

Type any email and a password shorter than 8 characters to see the error alert, then open Forgot password: the email carries over
$ npx wingo-ui@latest add login-page
ProLogin Page docs

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 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).

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 cover the other agents. The same setup for other editors is in our Codex MCP setup, Cursor shadcn setup, Copilot shadcn setup and OpenCode MCP setup, and the rest of the series is under Building UI with AI agents.

Components in this post

  • Button

    The React button component every screen starts with: five variants, six tones, all sizes, and a loading state that never jumps.

    Free
  • Login Page

    A React login page with password, magic link or code sign-in, Google, Apple and Microsoft buttons, two-step codes and password recovery.

    Pro
  • Data Table

    A React data table on TanStack Table: search, filters, sorting, bulk actions, pinning, resizing, virtualization and cards on phones.

    Pro

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 /.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.

Try it in your project

Button

Free

The React button component every screen starts with: five variants, six tones, all sizes, and a loading state that never jumps.

75 components free, no account needed. Pro from $8 a month.

Open Button liveSee pricing
  • Antigravity
  • MCP
  • shadcn/ui
  • AGENTS.md
  • AI agents

Share

SR

About the author

Serban Rusu

Founder of Wingo UI

Serban Rusu founded Wingo UI. He builds its component library, CLI and MCP server, and writes about React interfaces for phones and AI coding agents.

More from Serban
Keep reading

Related posts

All posts
Building UI with AI agents

Gemini CLI shadcn MCP Setup for Real React UI

Gemini CLI shadcn setup, tested on 0.67.0: the settings.json entry or gemini mcp add, folder trust, a GEMINI.md block and prompts that build real React screens.

SRSerban Rusu·Nov 5, 2026·11 min read
Building UI with AI agents

Component Library MCP: Make Agents Use Real Components

How a component library MCP server, rules files, llms.txt and a registry get Claude Code, Cursor and Codex to install real components instead of guessing.

SRSerban Rusu·Oct 9, 2026·27 min read
Comparisons and alternatives

Is shadcn Free for Commercial Use? MIT vs Paid Kits

Is shadcn free for commercial use? Yes: shadcn/ui is MIT licensed. What MIT asks of you, why paid shadcn kits have their own terms, and how to choose.

SRSerban Rusu·Nov 6, 2026·10 min read
Newsletter

Get new posts by email

New posts, product news and occasional offers from Wingo UI. We count clicks to keep it relevant.

No spam. Unsubscribe at any time.

WingoUI

Animated, configurable, mobile-first React components and blocks. Copy the source, make it yours, and let your coding agent build with it.

Product

  • Components
  • Templates
  • Pricing
  • AI agents
  • For teams
  • Theme generator

Resources

  • Docs
  • Contact
  • Programs
  • Blog
  • Changelog
  • Changelog RSS
  • llms.txt

Compare

  • Wingo UI vs paid kits
  • Wingo UI vs shadcn/ui
  • shadcn/ui alternatives
  • MUI alternatives
  • Tailwind Plus alternatives
  • Magic UI alternatives
  • Free components

Legal

  • Terms
  • Privacy
  • Refunds
  • License
  • Imprint

Component categories

  • Buttons & Actions
  • Inputs
  • Forms
  • Navigation
  • Overlays
  • Feedback
  • Data Display
  • Tables & Lists
  • Charts & Stats
  • Layout
  • Media
  • AI Kit
  • Text & Effects
  • Mobile
  • Commerce
  • Marketing Sections
  • Blocks
  • Hooks & Utilities

© 2026 Wingo UI

Wingo UI