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.
Copy the config
It holds one
shadcnioserver of typestreamable-http, pointed at your MCP URL with the token on the end. No token yet? Make one on your account.Save it as .kilocode/mcp.json
In the folder you have open in VS Code, add a
.kilocodefolder and paste the block into a newmcp.jsonthere. If the file already lists servers, putshadcniobeside them insidemcpServers.Reload the window
Kilo Code loads project config when the workspace opens, so after saving, run Developer: Reload Window from the Command Palette.
Find it under MCP Servers
Click the gear icon in Kilo Code's sidebar toolbar, open the Agent Behaviour tab and choose MCP Servers.
shadcnioshould be listed as connected.Ask the Code agent
Code is the default agent and the one that can run the install. Begin with
use shadcniothe first few times so it goes to the server first.
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.
| File | Where it lives | Reach |
|---|---|---|
.kilocode/mcp.json | Your project's root: the block above | This project, over a global entry of the same name |
mcp_settings.json | Kilo Code's global settings in VS Code | Every workspace in VS Code; the Kilo CLI skips it |
kilo.jsonc | ~/.config/kilo/, or .kilo/ in the project | Kilo'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.
{ "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.
- Click the gear icon in Kilo Code's sidebar toolbar, then the Agent Behaviour tab and its MCP Servers sub-tab.
- Look for
shadcniomarked connected. In a terminal,kilo mcp listshows the same server for the Kilo CLI. - Start a chat on the Code agent and send the prompt below. Allow the
whoamicall if the Permission Dock asks, and Kilo Code replies with your email, your plan and the calls left this minute.
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.
- shadcn.io MCP connected ยท 22 tools
Agent step: Read the @terminal outputReturns: Module not found: @/components/ui/tooltip in nav-item.tsxMCP call: get_component({ name: "tooltip", include: ["install", "usage"], packageManager: "pnpm" })Returns: A pnpm dlx shadcn add command and the usage to followAgent step: Ran pnpm dlx shadcn@latest addReturns: components/ui/tooltip.tsx and its dependencyAgent step: Edited nav-item.tsxReturns: Its imports now match the installed parts
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.
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
alwaysAllowlist in.kilocode/mcp.jsonisn't carried over, so the rule goes in thepermissionkey ofkilo.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.mdfrom 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 typinguse shadcnioin 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
@terminalto attach your terminal's output, or@git-changesfor 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.jsonfrom the project as well, though not the extension's globalmcp_settings.json. List what it loaded, and debug a server that won't connect, from your shell.$ kilo mcp list kilo mcp debug shadcnioMany 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.
shadcnionever appears under MCP Servers.- Check the file is
.kilocode/mcp.jsonat 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 shadcnioin the project to see why, and check theurlstill 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
urlin.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 undermcpin~/.config/kilo/kilo.jsonc, then runkilo 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 toAGENTS.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.
Both are read. Recent Kilo Code releases keep servers in kilo.jsonc, under an mcp key with "type": "remote", and that is the format its docs show now. They still load .kilocode/mcp.json from the project root and convert a streamable-http entry into a remote server, so the block here works unchanged, in the Kilo CLI as well.
It marks the entry as a remote server reached over HTTP. Leave it out and Kilo Code takes the entry for a local command, finds nothing to launch and skips it, so shadcnio never reaches the MCP Servers list.
This page sets up the project file, and an entry there beats a global one of the same name. The global mcp_settings.json follows you into every workspace you open in VS Code and never sits in a repo, but the Kilo CLI ignores it. Go global if you want shadcnio everywhere and have nothing to commit.
Set "disabled": true on the shadcnio entry in .kilocode/mcp.json and reload the window, then set it back to false when you want it again. In kilo.jsonc the same switch is "enabled": false, and the MCP Servers screen has a toggle for each server.
Code, for most work: it can call the server, run the install and edit your files. Ask reaches the same tools, approving each call, but it can't write, so use it to check a component's API or compare two blocks before anything changes. Debug has full access as well, which helps when a build breaks on a component that isn't there.
The tools answer for whatever framework the agent passes, and Kilo Code reads that from your package.json. A React app gets a single shadcn add command. A Vue, Svelte or Solid app gets each file with its path plus the packages to add, and Kilo Code writes them. In a monorepo, name the app in your prompt.
Yes. Type @terminal to attach what your active terminal printed, or @git-changes for the work you haven't committed. Kilo Code reads that first, so a failed import or a dropdown you wrote by hand becomes a lookup for the registry's own version.
Not in current versions. Kilo Code loads the server from that file but drops the alwaysAllow list, with a warning in its log. Approve a tool always from the Permission Dock, or put "shadcnio_*": "allow" under the permission key of kilo.jsonc, and Kilo Code stops asking for any shadcnio tool.
For this server, yes. Each of its 22 tools only reads from shadcn.io, and none of them can touch your files. What changes your project is the step after, such as running the npx shadcn add a tool handed back, and that follows Kilo Code's bash permission, not the MCP one.
The name of each tool Kilo Code calls and the arguments it sends, like a search phrase or a component name. Your code stays with Kilo Code and the model you chose in it. Nothing from your files reaches shadcn.io unless the agent writes it into an argument.
Yes: commit the team version shown on this page. In place of a key it reads the token from SHADCNIO_TOKEN, and each person exports their own in their shell. On a shadcn.io Team or Organization plan, every member's token carries Pro.
Write the instruction into that app's own AGENTS.md, for example apps/web/AGENTS.md. Kilo Code picks up a folder's AGENTS.md when it reads files inside it, so UI work in that app is pointed at shadcnio and the other packages never see the line.
The model decided not to call a tool. Open the prompt with use shadcnio, name the component or section you're after, and check that MCP Servers lists shadcnio as connected. One line in AGENTS.md turns that into a habit.
With a 401, the url has no token or an old one that has since been replaced, so copy the config again. A 403 means the token is valid but its account has no Pro. A 429 means that token made more than 600 calls inside one minute, so give it a moment.
Using another agent too?
The same URL works in every MCP client: use it beside Kilo Code, in your editor, your terminal or your chat app.
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