Skip to content

shadcn/ui in the Kilo Code extension

Add a .kilocode/mcp.json file to your project's root and Kilo Code can look up components, blocks and icons before it writes UI, then install them. It works with a shadcn.io Pro plan.

Kind
Extension
Goes in
.kilocode/mcp.json
Connects
Over HTTP
Team config
Yes

Put the file in your project

The block beside these steps is a complete .kilocode/mcp.json; signed in with Pro, its url already ends with your token. Kilo Code reads it from the project root, in VS Code and in the Kilo CLI.

  1. Copy the config

    It holds one shadcnio server of type streamable-http, pointed at your MCP URL with the token on the end. No token yet? Make one on your account.

  2. Save it as .kilocode/mcp.json

    In the folder you have open in VS Code, add a .kilocode folder and paste the block into a new mcp.json there. If the file already lists servers, put shadcnio beside them inside mcpServers.

  3. Reload the window

    Kilo Code loads project config when the workspace opens, so after saving, run Developer: Reload Window from the Command Palette.

  4. Find it under MCP Servers

    Click the gear icon in Kilo Code's sidebar toolbar, open the Agent Behaviour tab and choose MCP Servers. shadcnio should be listed as connected.

  5. Ask the Code agent

    Code is the default agent and the one that can run the install. Begin with use shadcnio the first few times so it goes to the server first.

.kilocode/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": {
      "type": "streamable-http",
      "url": "https://www.shadcn.io/api/mcp?token=YOUR_TOKEN"
    }
  }
}

The file carries your token in its url: add .kilocode/mcp.json to .gitignore, or commit the team version below instead. If it ever slips into a commit, regenerate the token.

Where Kilo Code finds MCP servers
FileWhere it livesReach
.kilocode/mcp.jsonYour project's root: the block aboveThis project, over a global entry of the same name
mcp_settings.jsonKilo Code's global settings in VS CodeEvery workspace in VS Code; the Kilo CLI skips it
kilo.jsonc~/.config/kilo/, or .kilo/ in the projectKilo's own format: the server goes under mcp with "type": "remote"

Share the project file

Commit .kilocode/mcp.json in the form shown below: its Authorization header reads the token from SHADCNIO_TOKEN, so the repository never holds a key. Every teammate exports their own SHADCNIO_TOKEN in their shell. On a shadcn.io Team or Organization plan, each member's token comes with Pro.

.kilocode/mcp.json
{
  "mcpServers": {
    "shadcnio": {
      "alwaysAllow": [],
      "disabled": false,
      "headers": {
        "Authorization": "Bearer ${env:SHADCNIO_TOKEN}"
      },
      "type": "streamable-http",
      "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 Kilo Code sees it

Kilo Code lists each server it loaded under Settings โ†’ Agent Behaviour โ†’ MCP Servers, with a status beside it: connected is what you want to see, failed means it never got through.

  1. Click the gear icon in Kilo Code's sidebar toolbar, then the Agent Behaviour tab and its MCP Servers sub-tab.
  2. Look for shadcnio marked connected. In a terminal, kilo mcp list shows the same server for the Kilo CLI.
  3. Start a chat on the Code agent and send the prompt below. Allow the whoami call if the Permission Dock asks, and Kilo Code replies with your email, your plan and the calls left this minute.
Prompt
use shadcnio to check whose account Kilo Code is calling with

Three chats in Kilo Code

A build error passed in with @terminal, a question for the Ask agent and a billing page in a Nuxt app: the prompt, the calls Kilo Code makes and the result. Switch the MCP off to see the difference.

Your agent
  1. shadcn.io MCP connected ยท 22 tools
  2. You: @terminal the dev server can't find components/ui/tooltip, so add the real one.
  3. Agent step: Read the @terminal outputReturns: Module not found: @/components/ui/tooltip in nav-item.tsx
  4. MCP call: get_component({ name: "tooltip", include: ["install", "usage"], packageManager: "pnpm" })Returns: A pnpm dlx shadcn add command and the usage to follow
  5. Agent step: Ran pnpm dlx shadcn@latest addReturns: components/ui/tooltip.tsx and its dependency
  6. Agent step: Edited nav-item.tsxReturns: Its imports now match the installed parts
  7. Your agent: Tooltip is installed and nav-item.tsx imports it, so the terminal error is gone.

In your project

Tooltip

  • The registry's Tooltip, added with pnpm
  • The dev server compiles again

1 prompt โ†’ 1 MCP calls

Prompts for Kilo Code's agents

Paste one into a chat on the Code agent, or on Ask when you only want an answer. Starting with use shadcnio makes Kilo Code check the server before it writes from memory.

01
use shadcnio to fix the missing import @terminal shows by installing the real component
02
use shadcnio to look at @git-changes and replace the tabs I wrote by hand with the registry's Tabs
03
use shadcnio to explain how the Date Picker handles a range, without editing any files
04
use shadcnio to add an invoice history section to the billing page from a block
05
use shadcnio to swap every icon in src/components/nav for its closest Lucide match
06
use shadcnio to give the signup form a password field with a show and hide toggle
07
use shadcnio to read Linear's DESIGN.md and map its colors onto our theme tokens
08
use shadcnio to set up this SvelteKit project for components, then add a Dialog

Working with shadcnio in Kilo Code

Approvals, agents, mentions and the CLI: what changes how Kilo Code works with a server that only reads.

  • Allow the tools once, by pattern

    If the Permission Dock stops on every shadcnio call, allow the tools by pattern: MCP tools are named after the server, an underscore and the tool. The alwaysAllow list in .kilocode/mcp.json isn't carried over, so the rule goes in the permission key of kilo.jsonc.

    {
      "permission": {
        "shadcnio_*": "allow"
      }
    }
  • Code installs, Ask only looks

    Code, the default agent, can call shadcnio and run the install it returns. Ask reaches the same tools with your approval on each call but can't edit files, which makes it the place to check props first. Switch with Cmd+. (Ctrl+.) or /agents.

  • Say it once in AGENTS.md

    Kilo Code loads AGENTS.md from the project root when a task starts, and one in a subfolder once it reads files there. A line in it means you can stop typing use shadcnio in every prompt.

    For UI work, check the shadcnio MCP for a component, block or icon before writing one, and install it with the command the server returns.
  • Hand it the error or the diff

    Type @terminal to attach your terminal's output, or @git-changes for uncommitted work. With the error or the half-built component in front of it, Kilo Code knows which registry item to look up.

  • The same file in the Kilo CLI

    The Kilo CLI reads .kilocode/mcp.json from the project as well, though not the extension's global mcp_settings.json. List what it loaded, and debug a server that won't connect, from your shell.

    $ kilo mcp list
    kilo mcp debug shadcnio
  • Many servers? Load tools on demand

    Each connected server's tools take up room in the agent's context. The experimental Programmatic Tool Calling setting has Kilo Code discover MCP tools as it needs them, rather than listing every one up front.

When Kilo Code can't reach shadcnio

Each problem as Kilo Code shows it, then the fix. For errors any client can run into, see the troubleshooting guide.

shadcnio never appears under MCP Servers.
Check the file is .kilocode/mcp.json at the root of the folder VS Code has open, and that the entry still has "type": "streamable-http": without it, Kilo Code reads the entry as a local command and skips it. Then run Developer: Reload Window.
The server's status reads failed.
Kilo Code found the entry but couldn't connect. Run kilo mcp debug shadcnio in the project to see why, and check the url still ends with /api/mcp?token= and your token.
Every shadcnio call returns 401.
Kilo Code is sending no token, or one you have since replaced. Copy the config again from your dashboard and replace the url in .kilocode/mcp.json, then reload the window.
Calls return 403 while the server shows connected.
The token was accepted, but the shadcn.io account behind it isn't on Pro anymore. Renew Pro and the same file works on the next call, with nothing to edit in Kilo Code.
shadcnio works in VS Code but not in the Kilo CLI.
The CLI doesn't read mcp_settings.json, the global file the VS Code extension uses. Put the entry in the project's .kilocode/mcp.json, or under mcp in ~/.config/kilo/kilo.jsonc, then run kilo mcp list.
Kilo Code writes the component itself and never calls shadcnio.
Open the prompt with use shadcnio, or add the line from the tips to AGENTS.md. On a custom agent, check that its tool access includes MCP tools.

Get the MCP for Kilo Code 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 Kilo Code: setup, limits, and the rest.

4.9 out of 5 from 150+ developers

Give Kilo Code the whole registry

Every component, 6,231 blocks and 294k icons for the Code and Ask agents in Kilo Code, with a shadcn.io Pro plan.

Get Pro