Skip to content

shadcn/ui in Antigravity's agents

Add a serverUrl to mcp_config.json and the agents in Antigravity's app, IDE and CLI can find a component and install it for your framework. Antigravity's free tier is enough; you only need shadcn.io Pro.

Kind
Editor
Goes in
mcp_config.json
Connects
Over HTTP
Team config
No

Add it to mcp_config.json

One entry in mcp_config.json connects the App, the IDE and the CLI at once. Signed in with Pro, the entry beside these steps already holds your MCP URL.

  1. Copy your entry

    With Pro, the JSON beside these steps carries your MCP URL, token included. No token yet: create one on your account page.

  2. Open mcp_config.json

    In the IDE, click … at the top of the agent side panel, then MCP Servers → Manage MCP Servers → View raw config. From the App or the CLI, open ~/.gemini/config/mcp_config.json in any editor: all three read it.

  3. Add it under mcpServers

    Paste the shadcnio entry beside any servers already there. Keep the key serverUrl: it's the field Antigravity's docs name for remote servers, where many other clients write url.

  4. Refresh, then allow the first call

    Save, then click Refresh under Installed MCP Servers (in the CLI, reload from /mcp). MCP tools start in Ask, so the first shadcnio call brings up a permission card.

mcp_config.json
Sign in to get your config
Sign in with a Pro account, and this holds your MCP URL, ready to paste.

How it reads, with YOUR_TOKEN where your token goes:

{
  "mcpServers": {
    "shadcnio": {
      "serverUrl": "https://www.shadcn.io/api/mcp?token=YOUR_TOKEN"
    }
  }
}

It lands in ~/.gemini/config/mcp_config.json, outside every repo and shared by the App, IDE and CLI. The URL holds your token: regenerate it if it leaks.

Where Antigravity finds its servers
WhereRead byUse it for
~/.gemini/config/mcp_config.jsonApp, IDE and CLIYou, in every project: put shadcnio here
.agents/mcp_config.json in a projectIDE, CLI and the SDKOne project only; git-ignore it, since the entry holds your token
MCP Store (Add MCP or … → MCP Servers)App and IDEGoogle's listed integrations; shadcn.io goes in the raw config

Check the agent can reach it

Antigravity lists its servers under Settings → Customizations → Installed MCP Servers, each with its status. In the CLI, /mcp draws a ring per server: active, loading or disconnected.

  1. In the App, click Settings at the bottom left, open Customizations and click Refresh under Installed MCP Servers.
  2. In the IDE, Manage MCP Servers (the agent panel's … menu) should list shadcnio with its 22 tools; in the CLI, /mcp shows it with an active ring.
  3. Send the prompt below and allow the card: the agent calls whoami and answers with your account and the calls left this minute.
Prompt
use shadcnio to check which account my token belongs to

Three jobs for an Antigravity agent

Three jobs an Antigravity agent takes on: the prompt, the shadcnio calls and approvals, and what ends up in the project. Turn the MCP off to compare.

Your agent
  1. shadcn.io MCP connected · 22 tools
  2. You: /plan a support inbox for our helpdesk app: a ticket table, stats on top and a sidebar.
  3. MCP call: plan_page({ brief: "support inbox for a helpdesk app: ticket table, stats, sidebar", kind: "app" })Returns: A sidebar, a ticket dashboard and a table, two alternatives each
  4. Agent step: Implementation Plan artifact: you commented, then clicked ProceedReturns: Three blocks and where each one goes
  5. MCP call: get_block({ names: ["sidebar-helpdesk", "dashboard-support-tickets", "tables-support-tickets"], include: ["install"], packageManager: "pnpm" })Returns: A pnpm dlx shadcn add that takes the three at once
  6. Agent step: Ran pnpm dlx shadcn add outside the sandbox (you approved)Returns: The blocks' files, and the packages they use
  7. Your agent: The inbox is up at /inbox: the helpdesk sidebar, the ticket stats and the ticket table, in the order the plan gave.

In your project

Support inbox

  • Three blocks, picked and installed together
  • Agreed as a plan before any file changed

1 prompt → 2 MCP calls

Prompts for the agent

Paste one into the App's composer, the IDE's side panel or agy. Naming the server keeps the agent on the registry rather than on what it remembers.

01
/plan an onboarding checklist screen from shadcnio blocks, and wait for my comments before installing anything
02
use shadcnio to add a searchable combobox to the country field in the form I have open
03
use shadcnio to replace the emoji in the sidebar with Lucide icons from the package we already use
04
ask shadcnio for the Popover API, then find out why ours closes when the page scrolls
05
use shadcnio to give this app Google's look from its DESIGN.md, light and dark
06
use shadcnio to set up this new Nuxt app for shadcn.io's Vue components
07
use shadcnio to build the invite form with TanStack Form, an error under each field
08
use shadcnio to find a kanban block for the sprint board and put it on /board

Good to know in Antigravity

Antigravity's permission rules, sandbox, rules files and slash commands, set up for the registry.

  • Allow the server in one rule

    MCP tools start in Ask. Edit the first card's target to mcp(shadcnio/*) before you click Allow, or keep the rule in the CLI's settings.json, or under Shared in /permissions to cover every Antigravity product.

    {
      "permissions": {
        "allow": ["mcp(shadcnio/*)"]
      }
    }
  • Let installs out of the sandbox

    In the App on macOS and Linux, the Default preset runs commands in a sandbox with no network, so the install asks to run outside it. A command rule for its prefix lets it through; everything else still asks.

    command(npx shadcn@latest add)
  • A rule that loads with UI files

    A file in .agents/rules/ with a glob trigger loads only when the agent touches matching files, so UI work gets the reminder and the rest doesn't. For an always-on line, use AGENTS.md instead.

    ---
    trigger: glob
    globs: "*.tsx, *.vue, *.svelte"
    description: "Building or changing UI"
    ---
    Search the shadcnio MCP before writing a component, and install what it returns.
  • Plan the screen before files change

    Start with /plan and the agent explores first: plan_page turns the brief into blocks inside an Implementation Plan artifact. Comment on a pick, click Proceed, and they install in one command.

  • Check the result with /browser

    In the App and the CLI, /browser hands a check to the browser subagent: it opens your dev server in Chrome, tries what was added and saves a recording to the conversation's artifacts.

    /browser open http://localhost:3000, open the new cart sheet with the keyboard and report whether Escape closes it
  • Hide the tools you won't use

    A project that never needs brand designs or templates can withhold those tools: disabledTools keeps them from the model while the rest work as before.

    {
      "mcpServers": {
        "shadcnio": {
          "serverUrl": "…your MCP URL…",
          "disabledTools": ["search_designs", "get_design", "search_templates"]
        }
      }
    }

When shadcnio won't load

What Antigravity shows, and what to do about it. For errors common to every client, see the troubleshooting guide.

shadcnio isn't under Installed MCP Servers after you save.
Check that the entry sits inside mcpServers, with a comma between it and the server before it, and that its key is serverUrl. Click Refresh: a broken entry is skipped while the other servers keep loading.
The server's card on the Customizations page says it failed to start.
Choose Restart from the server's menu. If it fails again, compare its serverUrl with the entry on this page: a token cut short while pasting is the usual cause.
The agent reports a 401 from shadcnio.
The token in your URL is missing, or was regenerated after you pasted it. Copy the entry again, replace the serverUrl in mcp_config.json and click Refresh.
Calls come back 403.
A 403 means the token was accepted but its shadcn.io account is no longer on Pro. Renew the plan on pricing and the next call goes through, with mcp_config.json left as it is.
On a work account, shadcnio never loads though the file is right.
Gemini Enterprise admins can limit which MCP servers load with an allowlist. Ask yours to allow shadcnio, then click Refresh.
The agent writes a component from memory instead.
Antigravity offers MCP tools next to its own, and a vague prompt looks answerable without them. Name the server (use shadcnio…), or add the rule from the tips above.

Get the MCP for Antigravity with Pro

The MCP comes with every Pro plan, with every block and premium template, for you or your whole team. Monthly, yearly or lifetime.

4.9/5 out of 5 · 150+ reviewsfrom 150+ founders and developers.

  • Secure checkout via Stripe
  • Code lives in your repo
  • Keep what you've shipped if you cancel
  • License terms

Frequently asked questions

The shadcn MCP in Antigravity: setup, limits, and the rest.

4.9 out of 5 from 150+ developers

Connect Antigravity to shadcn.io

Every component, 6,231 blocks and 294k icons, one tool call away for the agents in the Antigravity App, IDE and CLI: included with Pro.

Get Pro