Skip to content

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

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.

  1. Copy the config

    With Pro, the shadcnio entry holds your URL with its token. No token yet? Create one on your account.

  2. Open Kiro's MCP config

    From the command palette (Cmd+Shift+P, or Ctrl+Shift+P on Windows and Linux), run Kiro: Open user MCP config (JSON) for every workspace, or Kiro: Open workspace MCP config (JSON) for this one only.

  3. Paste it and save

    Put shadcnio inside mcpServers, next to any servers already there, and save. Kiro reconnects on save, with no restart, and the open chat keeps its context.

  4. Find it under MCP servers

    The MCP servers tab of the Kiro panel should list shadcnio with 22 tools. If nothing loads, open Settings (Cmd+,), search for MCP and turn MCP support on.

.kiro/settings/mcp.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": {
      "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.

Where Kiro reads a server from
ConfigApplies toOn a name clash
~/.kiro/settings/mcp.jsonEvery workspace, in the IDE and kiro-cliLoses to the other two
.kiro/settings/mcp.jsonThis workspace, once you trust itWins over the user file
A custom agent's mcpServersSessions running that agentWins 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.

.kiro/settings/mcp.json
{
  "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.

  1. Select the Kiro icon in the activity bar and open the MCP servers tab.
  2. Expand shadcnio: connected, with 22 tools listed under it.
  3. In kiro-cli, /mcp shows the same server, its status and its tools.
  4. Send the prompt below: Kiro asks to run whoami, then names your account and the calls left this minute.
Prompt
use shadcnio to check which account this token belongs to

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.

Your agent
  1. shadcn.io MCP connected · 22 tools
  2. You: Spec the invite flow: add teammates by email, then confirm who was invited.
  3. MCP call: search_blocks({ query: "invite teammates by email", category: "dialog" })Returns: dialog-invite-team, dialog-invite-members, more
  4. MCP call: get_block({ names: ["dialog-invite-team", "success-invites-sent"], include: ["install", "preview"] })Returns: One install for both, with their preview links
  5. Agent step: Wrote design.md and tasks.mdReturns: Both blocks named in the design; task 1 adds them
  6. Agent step: Ran npx shadcn add for task 1 (you chose Allow)Returns: The two blocks and the components they import
  7. Your agent: Task 1 is done: the invite dialog and its sent screen are in, and tasks 2 and 3 connect them to your invitations endpoint.

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.

01
use shadcnio to plan our scheduling app's landing page and list the blocks it picks in the spec's design.md
02
use shadcnio to turn the filters in #current into a sheet that slides in on mobile
03
use shadcnio to add a kanban board for the support queue, one column per status
04
use shadcnio to build the login screen from a block, with GitHub and Google buttons
05
use shadcnio to save Notion's DESIGN.md at the root and add a steering file that points to it
06
use shadcnio to check which props the Date Picker takes before you start task 2
07
use shadcnio to swap the emoji in our empty states for Lucide icons
08
use shadcnio to set up this SvelteKit app for shadcn components

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 shadcnio call asks, choose Always allow, widen the pattern to shadcnio/* and apply it to all workspaces. Kiro saves the rule in ~/.kiro/settings/permissions.yaml; npx shadcn add still asks, as a shell command.

    rules:
      - capability: mcp
        match: ["shadcnio/*"]
        effect: allow
  • Steering for your components folder

    A fileMatch steering file loads only while Kiro works on matching files, so the reminder costs nothing elsewhere. Once get_design has 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_page while Kiro drafts design.md, so the sections are blocks by name. Each task in tasks.md then 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 true
  • Scripts with kiro-cli

    kiro-cli reads the same files. In a script, --require-mcp-startup exits 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 shadcnio with 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 Logs shows a 401 for shadcnio.
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 Logs shows a 403 for shadcnio.
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.json stays as it is.
The shared config warns about an unapproved variable and never connects.
Approve SHADCNIO_TOKEN from 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 shadcnio to the registry; nothing in your own mcp.json overrides 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.

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