shadcn/ui in Kiro's agent
Add an entry to mcp.json and Kiro's agent can search components and blocks and install them as it works through the tasks in your spec. It's included with Pro.
- Kind
- Editor
- Goes in
.kiro/settings/mcp.json- Connects
- Over HTTP
- Team config
- Yes
- Its docs
- Kiro MCP (opens in a new tab)
Add it to Kiro's mcp.json
One entry in Kiro's mcp.json, and every chat and spec session can reach the registry. Signed in with Pro, the entry beside the steps already holds your token.
Copy the config
With Pro, the
shadcnioentry holds your URL with its token. No token yet? Create one on your account.Open Kiro's MCP config
From the command palette (
Cmd+Shift+P, orCtrl+Shift+Pon Windows and Linux), run Kiro: Open user MCP config (JSON) for every workspace, or Kiro: Open workspace MCP config (JSON) for this one only.Paste it and save
Put
shadcnioinsidemcpServers, next to any servers already there, and save. Kiro reconnects on save, with no restart, and the open chat keeps its context.Find it under MCP servers
The MCP servers tab of the Kiro panel should list
shadcniowith 22 tools. If nothing loads, open Settings (Cmd+,), search for MCP and turn MCP support on.
How it reads, with YOUR_TOKEN where your token goes:
{ "mcpServers": { "shadcnio": { "url": "https://www.shadcn.io/api/mcp?token=YOUR_TOKEN" } } }
In ~/.kiro/settings/mcp.json the token stays out of every repo. For the workspace file, use the shared config below instead, and regenerate your token if it was ever committed.
| Config | Applies to | On a name clash |
|---|---|---|
~/.kiro/settings/mcp.json | Every workspace, in the IDE and kiro-cli | Loses to the other two |
.kiro/settings/mcp.json | This workspace, once you trust it | Wins over the user file |
A custom agent's mcpServers | Sessions running that agent | Wins over both files |
Commit it for the whole team
Commit .kiro/settings/mcp.json with the entry below: it sends the token from each person's SHADCNIO_TOKEN, so no one's key reaches the repo. Kiro expands only variables you approve, so each teammate approves SHADCNIO_TOKEN once, from Kiro's warning or under Mcp Approved Env Vars in settings, and trusts the workspace. On a Team or Organization plan, each teammate's own shadcn.io seat is Pro, so the token they export works too.
{ "mcpServers": { "shadcnio": { "headers": { "Authorization": "Bearer ${SHADCNIO_TOKEN}" }, "url": "https://www.shadcn.io/api/mcp" } } }
Each teammate sets SHADCNIO_TOKEN to their own token (from their MCP URL), so no token is committed.
Check that Kiro sees it
The MCP servers tab in the Kiro panel lists every configured server with a status indicator. Right-click one to reconnect it or open its logs.
- Select the Kiro icon in the activity bar and open the MCP servers tab.
- Expand
shadcnio: connected, with 22 tools listed under it. - In
kiro-cli,/mcpshows the same server, its status and its tools. - Send the prompt below: Kiro asks to run
whoami, then names your account and the calls left this minute.
Three Kiro sessions, start to finish
Each tab is a prompt, the calls Kiro makes and what lands in the workspace. Switch the MCP off to see what Kiro writes from memory instead.
- shadcn.io MCP connected · 22 tools
MCP call: search_blocks({ query: "invite teammates by email", category: "dialog" })Returns: dialog-invite-team, dialog-invite-members, moreMCP call: get_block({ names: ["dialog-invite-team", "success-invites-sent"], include: ["install", "preview"] })Returns: One install for both, with their preview linksAgent step: Wrote design.md and tasks.mdReturns: Both blocks named in the design; task 1 adds themAgent step: Ran npx shadcn add for task 1 (you chose Allow)Returns: The two blocks and the components they import
In your project
Invite dialog
- design.md names real blocks, by slug
- Task 1 installs both with one command
1 prompt → 2 MCP calls
Prompts for Kiro chat
Paste one into a chat or a spec session. Naming the server keeps Kiro from answering out of memory.
Working with Kiro's agent
Approvals, steering, the # menu, specs and context: the parts of Kiro that shape how the MCP behaves.
Allow the server once
When the first
shadcniocall asks, choose Always allow, widen the pattern toshadcnio/*and apply it to all workspaces. Kiro saves the rule in~/.kiro/settings/permissions.yaml;npx shadcn addstill asks, as a shell command.rules: - capability: mcp match: ["shadcnio/*"] effect: allow
Steering for your components folder
A
fileMatchsteering file loads only while Kiro works on matching files, so the reminder costs nothing elsewhere. Onceget_designhas saved a brand's DESIGN.md, a#[[file:DESIGN.md]]line keeps it in view as well.--- inclusion: fileMatch fileMatchPattern: "components/**/*.tsx" --- Before writing UI in this folder, look it up with the shadcnio MCP and install what it returns. #[[file:DESIGN.md]]
Seven prompts in the # menu
Type
#in chat: the server's seven prompts (add, block, form, setup, page, icons, design) appear with an MCP icon, and a short form asks for their arguments. Its resource templates sit beside them, for a brand's DESIGN.md or a guide.Blocks in the design phase
In a Spec session, ask for
plan_pagewhile Kiro draftsdesign.md, so the sections are blocks by name. Each task intasks.mdthen installs its own, and#spec:<name>brings the plan back into a later chat.22 tools, loaded when needed
Kiro IDE 1.3 and later load MCP tools on demand: the model sees a short list and pulls a tool's full schema only when it calls it. In Kiro CLI V2 sessions it's opt-in.
$ kiro-cli settings toolSearch.enabled trueScripts with kiro-cli
kiro-clireads the same files. In a script,--require-mcp-startupexits with code 3 if a server fails to start, and the allow rule above matters: a headless run treats every ask as a deny.$ kiro-cli chat --no-interactive --require-mcp-startup "use shadcnio to list the dashboard blocks"
If shadcnio won't connect
Most failures show in the MCP servers tab or in Kiro - MCP Logs. For a client other than Kiro, see the troubleshooting guide.
- The MCP servers tab shows
shadcniowith an error. - Right-click it and choose Show MCP Logs. A missing comma between two servers or a cut-off URL is the usual cause: copy the config again, save, and Kiro reconnects.
Kiro - MCP Logsshows a 401 forshadcnio.- Kiro sent a token that is missing, mistyped or replaced: generating a new one on your account retires the one in
mcp.json. Copy the config from this page again and save the file. Kiro - MCP Logsshows a 403 forshadcnio.- Kiro connected and the token was accepted, but no Pro plan is active on that shadcn.io account. Renew it, then right-click the server and choose Reconnect:
mcp.jsonstays as it is. - The shared config warns about an unapproved variable and never connects.
- Approve
SHADCNIO_TOKENfrom the warning, or add it under Mcp Approved Env Vars in settings. Export it in your shell profile and restart Kiro so the app can read it. - The panel says MCP is disabled by your administrator, or that servers are hidden.
- Your organization manages MCP through IAM Identity Center: an admin turned it off, or allows only a registry's servers. Ask them to add
shadcnioto the registry; nothing in your ownmcp.jsonoverrides it. - Kiro answers from what the model remembers.
- Check the server is connected, then name it (
use shadcnio…) or point at one tool:#[shadcnio] search_components date range. A steering file makes the habit stick.
Get the MCP for Kiro 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 Kiro: setup, limits, and the rest.
For yourself, the user file: ~/.kiro/settings/mcp.json works in every workspace you open and keeps the token out of your repositories. The workspace file, .kiro/settings/mcp.json, is the one to commit, with the token read from SHADCNIO_TOKEN instead of your URL. If both define shadcnio, the workspace entry wins.
Open the command palette (Cmd+Shift+P, or Ctrl+Shift+P on Windows and Linux) and run Kiro: Open user MCP config (JSON), or the workspace variant for one project. Paste the shadcnio entry inside mcpServers and save: Kiro reconnects on save, with no restart.
Yes. kiro-cli reads the same user and workspace mcp.json files, and /mcp in a session lists shadcnio with its status and tools. kiro-cli mcp status --name shadcnio checks it from a shell.
Type # in chat. The server's seven prompts appear with an MCP icon, and the ones that take arguments, like page with its brief or design with a brand, open a small form first. Its resource templates are there too, so a brand's DESIGN.md can join the conversation as context.
During the design phase, Kiro can call plan_page or search_blocks and write the picks into design.md by name, so tasks.md installs real blocks instead of describing imaginary ones. Later chats can pull the whole spec back in with #spec.
Answer the first prompt with Always allow, widen the pattern to shadcnio/* and apply it to all workspaces. Kiro saves the rule in ~/.kiro/settings/permissions.yaml. Every tool on the server only reads the registry; npx shadcn add still asks, as a shell command.
Yes. Kiro reads package.json and the tools answer for Vue, so a Nuxt workspace gets Vue components. Instead of one shadcn command, get_install_plan returns every file with its path and the packages to add, and Kiro writes them and runs the install after you allow it.
Commit .kiro/settings/mcp.json with the entry that sends the token as an Authorization header read from SHADCNIO_TOKEN, so no one's key reaches the repo. Each teammate exports the variable and approves it once, under Mcp Approved Env Vars in Kiro's settings. On a Team or Organization plan, every member has their own Pro seat and token.
The workspace file only applies once you trust the workspace. Trust it, then approve SHADCNIO_TOKEN if Kiro warns about the variable, and the committed server connects. Until then the entry sits unused.
Maybe. With IAM Identity Center, an administrator can switch MCP off or allow only the servers in an organization registry, and Kiro then hides everything else, your own mcp.json entries included. Ask them to add shadcnio to the registry.
In the URL of the shadcnio entry in mcp.json. In the user file, that is on your own disk and out of every repo. In a workspace file you commit, use the shared config instead, which reads SHADCNIO_TOKEN from the environment. If a token was ever committed, regenerate it on your account page.
Only the tool calls: their names and inputs, such as a component name, a framework or a search phrase. Your specs, steering files and code stay in the workspace, because Kiro reads them and the server never does. All of the tools only read from the registry.
A 401 means the token is missing, mistyped or replaced by a newer one. A 403 means the token is fine but no Pro plan is active on that account: renew it and reconnect the server from its right-click menu. A 429 means more than 600 calls in a minute on one token, so wait the Retry-After time.
Right-click the server and choose Show MCP Logs. A missing comma between two servers or a cut-off URL is the usual cause. Copy the config again, save, and Kiro reconnects.
Check that the server shows as connected, then name it in the prompt (use shadcnio...) or point at one tool with #[shadcnio]. A steering file with a fileMatch pattern for your components folder makes the habit stick.
Using another agent too?
The same URL works in every MCP client: use it beside Kiro, in your editor, your terminal or your chat app.
4.9 out of 5 from 150+ developers
Put the registry behind your specs
Kiro's agent gets the whole catalog, 6,231 blocks and 294k icons included, with any Pro plan.
Get Pro