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.
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.
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.jsonin any editor: all three read it.Add it under mcpServers
Paste the
shadcnioentry beside any servers already there. Keep the keyserverUrl: it's the field Antigravity's docs name for remote servers, where many other clients writeurl.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 firstshadcniocall brings up a permission card.
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 | Read by | Use it for |
|---|---|---|
~/.gemini/config/mcp_config.json | App, IDE and CLI | You, in every project: put shadcnio here |
.agents/mcp_config.json in a project | IDE, CLI and the SDK | One project only; git-ignore it, since the entry holds your token |
| MCP Store (Add MCP or … → MCP Servers) | App and IDE | Google'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.
- In the App, click Settings at the bottom left, open Customizations and click Refresh under Installed MCP Servers.
- In the IDE, Manage MCP Servers (the agent panel's … menu) should list
shadcniowith its 22 tools; in the CLI,/mcpshows it with an active ring. - Send the prompt below and allow the card: the agent calls
whoamiand answers with your account and the calls left this minute.
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.
- shadcn.io MCP connected · 22 tools
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 eachAgent step: Implementation Plan artifact: you commented, then clicked ProceedReturns: Three blocks and where each one goesMCP 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 onceAgent step: Ran pnpm dlx shadcn add outside the sandbox (you approved)Returns: The blocks' files, and the packages they use
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.
shadcnio blocks, and wait for my comments before installing anythingGood 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'ssettings.json, or under Shared in/permissionsto 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
commandrule 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 aglobtrigger loads only when the agent touches matching files, so UI work gets the reminder and the rest doesn't. For an always-on line, useAGENTS.mdinstead.--- 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
/planand the agent explores first:plan_pageturns 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,
/browserhands 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:
disabledToolskeeps 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.
shadcnioisn'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 isserverUrl. 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
serverUrlwith 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
serverUrlinmcp_config.jsonand 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.jsonleft 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.
Yes. The App, the IDE and agy all read the global file at ~/.gemini/config/mcp_config.json, so shadcnio added once shows up in each of them after a refresh. A project can also have its own .agents/mcp_config.json, which the IDE and the CLI read for that project only.
It is the field Antigravity's docs name for remote servers, where many other clients write url. Keep serverUrl for the shadcnio entry, inside mcpServers and with a comma between it and the server before it, or Antigravity skips the entry.
Not today. The Store lists the integrations Google has picked, and shadcn.io isn't among them. The raw config takes any remote server, and once shadcnio is in it, its tools reach the agent the same way a Store server's do.
Usually not. Click Refresh under Installed MCP Servers, or reload from /mcp in the CLI. If shadcnio still doesn't appear, check that the entry sits inside mcpServers with a comma before it, since a broken entry is skipped while the other servers keep loading.
Outside React, get_install_plan answers with a list of files to create and the packages they depend on, not a command. The agent writes those files into your workspace itself and runs only the package install in the terminal. A React project gets one shadcn add command instead.
Start with /plan and the agent explores first: plan_page turns your brief into blocks inside an Implementation Plan artifact. Comment on a pick, click Proceed, and the blocks install in one command.
Allow the whole server with the rule mcp(shadcnio/*). Type it into the first card's target before clicking Allow to cover the rest of that turn, or keep it for good in your allow list, for example under Shared in the CLI's /permissions. Every shadcnio tool only reads; the commands the agent runs afterwards still follow your preset.
Yes, once it is allowed up front, since nothing in a script can click Allow. Put mcp(shadcnio/*) under permissions.allow in the CLI's settings.json, and keep the token for CI in a secret rather than in the script.
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 the prefix, command(npx shadcn@latest add), lets it through while everything else still asks.
No. Antigravity's free tier is enough to connect a server. What the shadcn MCP needs is a shadcn.io Pro plan on the account behind your token.
Each person adds the entry to their own global mcp_config.json with their own URL; a workspace file would carry one person's token, so it isn't one to commit. To put the whole group on Pro, a shadcn.io Team or Organization plan covers it, and each person then makes a token from their own account. On a Gemini Enterprise account, an admin's MCP allowlist may have to let shadcnio in first.
The global file sits in your home folder, outside every repository. Keep a project's .agents/mcp_config.json out of git, since the entry holds your token. If the token leaks, regenerate it on your shadcn.io account page and the old one stops working within a few minutes.
Only the tool calls, meaning what you asked for by name, framework or keyword. Your files and code stay on your machine, where the agent reads them, and every shadcnio tool is read-only, so it can't change your workspace.
Choose Restart from the server's menu on the Customizations page. If it fails again, compare its serverUrl with the entry on this page: a token cut short while pasting is the usual cause.
401 means the token in the URL is missing or was regenerated after you pasted it: copy the entry again, then Refresh. 403 means the token is fine but the account is off Pro. 429 means the token went past 600 calls in one minute; Retry-After tells you how long to pause.
Antigravity offers MCP tools next to its own, and a vague prompt looks answerable without them. Name the server in the prompt (use shadcnio) or add the allow rule and a glob-triggered file in .agents/rules/ that points UI work at it.
Using another agent too?
The same URL works in every MCP client: use it beside Antigravity, in your editor, your terminal or your chat app.
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