shadcn/ui in Roo Code for VS Code
Add a shadcnio server to .roo/mcp.json and Roo Code checks the registry for components, blocks and icons while it plans, codes or debugs, then runs the install once you approve it. It needs shadcn.io Pro, and works in 3.54.0, Roo Code's final release.
- Kind
- Extension
- Goes in
.roo/mcp.json- Connects
- Over HTTP
- Team config
- Yes
Add it in Roo's MCP settings
Roo Code reads the entry beside these steps from .roo/mcp.json in your project, or from its global mcp_settings.json. Signed in with Pro, the entry already holds your URL, token and all.
Copy the entry
It's a streamable HTTP server: a
urland"type": "streamable-http", which Roo needs spelled out. No token yet? Create one on your account.Open MCP Servers
Click the gear at the top of the Roo Code pane and choose MCP Servers from the list of settings. Older versions put an MCP icon in the pane's top bar instead.
Pick project or global
Under the server list, Edit Project MCP opens
.roo/mcp.jsonat the workspace root, creating it if needed. Edit Global MCP opensmcp_settings.json, which every workspace reads.Paste it and save
Paste the entry inside
mcpServersand save. Roo watches both files, soshadcniojoins the list without a reload.Look for the green dot
A green dot beside
shadcniomeans Roo connected. Red means it didn't: the error shows under the name, with a Retry Connection button.
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 plain entry keeps your token in the file: before you commit .roo/mcp.json, swap in the team entry below. Roo Code was shut down on May 15, 2026; its last release, 3.54.0, still reads this file, and other VS Code agents such as Cline and Kilo Code have pages of their own.
| Field | What it does here |
|---|---|
type | "streamable-http". Required beside a url, or Roo refuses the entry |
url | Your MCP URL with the token; the team entry leaves the token out |
headers | The team entry's Authorization header, filled from ${env:SHADCNIO_TOKEN} |
alwaysAllow | Tools Roo may call without asking, or ["*"] for every one |
disabledTools | Tools kept out of the prompt, like their switch in the Tools tab |
timeout | Seconds to wait for an answer, 1 to 3600; 60 when left out |
Share one .roo/mcp.json with the team
Commit .roo/mcp.json with the entry below. Its URL carries no token, and the Authorization header reads ${env:SHADCNIO_TOKEN}, which Roo fills in from VS Code's environment as it loads the file. Each person exports their own token in their shell profile and restarts VS Code; if the variable is missing, Roo sends the text unchanged and the server answers 401. With a shadcn.io Team or Organization plan, each member's own token is already 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.
See it in Roo's server list
MCP Servers lists each server with a status dot: green once Roo has connected, yellow while it's connecting, red when it failed.
- Open MCP Servers from Roo's settings and check Enable MCP Servers is on.
- Find
shadcniowith a green dot and aprojectorglobaltag after its name. - Click the row to open its Tools tab: 22 tools, each with an Always allow box.
- In a new task, send the prompt below and press Approve when Roo asks to use a tool on the shadcnio MCP server.
whoamireplies with your account and the calls left this minute.
Architect, Debug and Code at work
A plan in Architect, a bug in Debug and a Svelte page in Code: the prompt, each call Roo makes, and what ends up in the editor. Turn the MCP off to see what Roo writes from memory.
- shadcn.io MCP connected ยท 22 tools
MCP call: plan_page({ brief: "billing page with the current plan, usage meters and past invoices", kind: "app" })Returns: billing-current-plan, billing-usage-meters, billing-invoice-historyAgent step: Wrote plans/billing-page.md (Architect edits Markdown only)Returns: The three blocks, their order, what each one showsMCP call: get_block({ names: ["billing-current-plan", "billing-usage-meters", "billing-invoice-history"], include: ["install"] })Returns: A single npx shadcn add covering all threeAgent step: Switched to Code mode, then ran npx shadcn add (Run)Returns: The blocks in components, the page at app/billing
In your project
Billing page
- A plan that names blocks which exist
- One install after you'd read it
1 prompt โ 2 MCP calls
Prompts for Roo's modes
Start a new task, pick the mode from the menu by the chat box, then paste one. Each names shadcnio, so Roo goes to the server and not to what the model remembers.
Roo settings worth changing
Approvals, modes, rules and the tool count: the Roo settings that decide how it works with shadcnio.
Approve the lookups once
Tick Always allow beside each tool in the server's Tools tab, or put
alwaysAllowin the entry. Either one only counts while MCP is switched on in the auto-approve menu by the chat box."alwaysAllow": ["search_components", "get_component", "search_blocks", "get_block"]
Pick the mode for the job
Code and Debug can call shadcnio, edit files and run the install. Architect calls it too but writes only Markdown, and Ask answers without touching anything. Orchestrator has no tools and hands each step to one of the others.
One rule for UI work
A Markdown file in
.roo/rules/goes into every mode's prompt; one in.roo/rules-code/goes into Code's alone. Roo readsAGENTS.mdat the root as well.For UI, look the component or block up with the shadcnio MCP first and install it with the command it returns.Let the install run
In Settings โ Auto-Approve, switch on Execute and add
npx shadcn@latest addto Allowed Auto-Execute Commands. Installs then run without a Run click, and prefixes under Denied Commands stay blocked.Watch the tool count
Roo warns once more than 60 MCP tools are on across your servers, since a long list confuses the model. shadcnio adds 22: in its Tools tab, switch off the ones you never use, such as the design or template searches.
Guides as resources
The server's Resources tab lists its guides and each DESIGN.md under
shadcnio://addresses. Roo reads one withaccess_mcp_resource, which only the auto-approve menu's MCP switch covers, not Always allow.
Fixes for Roo Code
What Roo shows, and what to change. Problems every client shares are in the troubleshooting guide.
- Roo says a configuration with a url must state its type as sse or streamable-http.
- Add
"type": "streamable-http"next to theurl. Roo won't guess the transport from an address. shadcniohas a red dot and an error under its name.- Check the URL is complete, token included, then press Retry Connection. If the error mentions 401, the token is missing or was regenerated: copy the entry from this page again.
- With the team entry, every shadcnio call fails with 401.
- VS Code didn't have
SHADCNIO_TOKEN, so Roo sent the placeholder as written. Export it in your shell profile, quit VS Code completely and open it again. - Calls come back with 403.
- Your token works, but the shadcn.io account behind it has no active Pro plan. Once you renew on pricing, the entry you already have connects again.
- Roo never offers to use a shadcnio tool.
- Tick Enable MCP Servers at the top of MCP Servers: off, it takes every server out of the prompt. Then check the mode, since Orchestrator can't call tools itself.
- A call stops with a timeout.
- Raise Network Timeout in the server's expanded row, or set
"timeout"in seconds in the entry. The 60-second default is enough for every shadcnio tool on a normal connection.
Get the MCP for Roo 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 Roo Code: setup, limits, and the rest.
Global, in mcp_settings.json, when you want it in every workspace on your machine. Project, in .roo/mcp.json at the repo root, when the repo should carry it. If both define shadcnio, Roo uses the project one. The plain entry holds your token, so a project file you mean to commit should get the team entry instead.
Roo supports two remote transports, streamable HTTP and the older SSE, and it won't pick one from the address. An entry with a url and no type is refused with an error. shadcnio speaks streamable HTTP, so the type is streamable-http.
No. Roo watches both files and reconnects when you save one. If the row still shows the old state, press the refresh button on it, or Refresh MCP Servers under the list.
MCP tools aren't auto-approved out of the box. Roo shows the tool and its arguments under a line saying it wants to use a tool on the shadcnio MCP server, then waits for Approve or Deny. To skip that, switch on MCP in the auto-approve menu and tick Always allow on the tools: Roo needs both.
Yes. All 22 tools only read from shadcn.io: they search, describe and hand back install commands, and none of them writes to your project. The edits and the npx shadcn add that follow are Roo's own steps, with their own Save and Run approvals.
Yes. In Settings, open Auto-Approve, switch on Execute and add npx shadcn@latest add to Allowed Auto-Execute Commands. Commands that don't start with a prefix on that list still wait for you to press Run, and anything under Denied Commands is refused.
Code, Debug, Architect and Ask all carry the MCP tool group. Code and Debug can also edit files and run the install. Architect edits Markdown only, and Ask changes nothing. Orchestrator has no tools of its own and hands each step to another mode as a subtask.
Put mcp in the mode's groups, in .roomodes for the project or in the global custom modes file. A mode without it never sees the server's tools. Add edit and command as well if that mode should install components on its own.
Yes. Architect can call plan_page and search blocks, then save the plan as a Markdown file, the only kind it may write. Read the plan, then switch to Code from the mode menu, or press Cmd+. (Ctrl+. on Windows and Linux), to install what it picked.
Yes, in the copy you have installed. Roo Code's maintainers shut the extension down on May 15, 2026 and archived its repository. Their final release note says it should keep working indefinitely, without bug fixes, new features or model updates. Its MCP support connects to shadcn.io straight from VS Code.
Roo's own docs point to ZooCode, a fork started by its community, and to Cline, the project Roo Code began from. Cline and Kilo Code each have a shadcn MCP page on this site. Your token and Pro plan stay the same; only the shape of the config changes.
No. Pro is billed by shadcn.io and isn't tied to any editor. Questions about a paid Roo Code plan go to billing@roocode.com, as Roo's docs say.
Yes, with the team entry. Its Authorization header reads ${env:SHADCNIO_TOKEN}, and Roo swaps in the value from the environment VS Code started with. The committed file holds no token, and each person exports their own.
Yes: the server checks the token each person sends. A shadcn.io Team or Organization plan gives every seat Pro; otherwise each teammate needs a Pro plan of their own. Roo adds no charge for MCP, and model calls stay billed by your provider.
Check that shadcnio has a green dot and that Enable MCP Servers is on, then start the prompt with use shadcnio. With several servers connected, naming it stops the model from skipping the tools. A line in .roo/rules makes it the default for UI work.
A 401 means the token is missing or was regenerated, or that VS Code didn't have SHADCNIO_TOKEN when the team entry loaded, so the header went out unfilled. A 403 says the token itself is fine and the account behind it lacks an active Pro plan.
Using another agent too?
The same URL works in every MCP client: use it beside Roo Code, in your editor, your terminal or your chat app.
4.9 out of 5 from 150+ developers
Give each Roo mode the registry
One entry gives Code, Architect and Debug mode 6,231 blocks, 294k icons and every component, with shadcn.io Pro.
Get Pro