Skip to content

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.

  1. Copy the entry

    It's a streamable HTTP server: a url and "type": "streamable-http", which Roo needs spelled out. No token yet? Create one on your account.

  2. 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.

  3. Pick project or global

    Under the server list, Edit Project MCP opens .roo/mcp.json at the workspace root, creating it if needed. Edit Global MCP opens mcp_settings.json, which every workspace reads.

  4. Paste it and save

    Paste the entry inside mcpServers and save. Roo watches both files, so shadcnio joins the list without a reload.

  5. Look for the green dot

    A green dot beside shadcnio means Roo connected. Red means it didn't: the error shows under the name, with a Retry Connection button.

.roo/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 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.

The fields Roo reads in the shadcnio entry
FieldWhat it does here
type"streamable-http". Required beside a url, or Roo refuses the entry
urlYour MCP URL with the token; the team entry leaves the token out
headersThe team entry's Authorization header, filled from ${env:SHADCNIO_TOKEN}
alwaysAllowTools Roo may call without asking, or ["*"] for every one
disabledToolsTools kept out of the prompt, like their switch in the Tools tab
timeoutSeconds 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.

.roo/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.

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.

  1. Open MCP Servers from Roo's settings and check Enable MCP Servers is on.
  2. Find shadcnio with a green dot and a project or global tag after its name.
  3. Click the row to open its Tools tab: 22 tools, each with an Always allow box.
  4. In a new task, send the prompt below and press Approve when Roo asks to use a tool on the shadcnio MCP server. whoami replies with your account and the calls left this minute.
Prompt
use shadcnio to show the account this token belongs to

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.

Your agent
  1. shadcn.io MCP connected ยท 22 tools
  2. You: use shadcnio to plan the billing page from blocks, then build it once I've read the plan
  3. 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-history
  4. Agent step: Wrote plans/billing-page.md (Architect edits Markdown only)Returns: The three blocks, their order, what each one shows
  5. MCP call: get_block({ names: ["billing-current-plan", "billing-usage-meters", "billing-invoice-history"], include: ["install"] })Returns: A single npx shadcn add covering all three
  6. Agent step: Switched to Code mode, then ran npx shadcn add (Run)Returns: The blocks in components, the page at app/billing
  7. Your agent: The billing page follows the plan: the current plan on top, usage meters below it, invoices last.

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.

01
use shadcnio to plan the team settings page from blocks and save the plan as docs/team-settings.md
02
use shadcnio to work out why the combobox in the filters bar loses its value when the sheet closes
03
use shadcnio to replace the hand-rolled tabs in this file with the Tabs component, keeping each panel's content
04
use shadcnio to tell me how a range works in the Date Picker, without editing anything
05
use shadcnio to add a drag-and-drop file upload to the support form in this SvelteKit app
06
use shadcnio to pick Tabler icons for every sidebar link and import them from the package we already use
07
use shadcnio to set up a new Vite app for shadcn components, then add a button and a card
08
use shadcnio to bring Linear's DESIGN.md colors into our theme tokens

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 alwaysAllow in 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 reads AGENTS.md at 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 add to 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 with access_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 the url. Roo won't guess the transport from an address.
shadcnio has 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.

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