Skip to content

shadcn/ui in the Cline extension

Add one entry to cline_mcp_settings.json and Cline can look up a component, a block or an icon before it writes, then install it once you approve. You need shadcn.io Pro for it.

Kind
Extension
Goes in
cline_mcp_settings.json
Connects
Over HTTP
Team config
No
Its docs
None

Add it in Cline's MCP Servers view

The JSON beside these steps is the whole entry: a type and your MCP URL, token included once you're signed in with Pro. It goes in cline_mcp_settings.json, which Cline opens for you.

  1. Copy the entry

    It holds "type": "streamableHttp" and your URL, nothing else. No token yet? Create one on your account.

  2. Open MCP Servers

    Click the stacked server icon in the toolbar at the top of the Cline panel. MCP Servers opens on two tabs, Remote Servers and Configure.

  3. Paste it into cline_mcp_settings.json

    On Remote Servers, click Edit Configuration. Put shadcnio inside mcpServers, beside any servers already listed, and save. Cline reconnects on save, with no reload of the editor.

  4. Wait for the green dot

    On Configure, shadcnio gets a green dot once it connects, and its Tools tab counts 22. Red means it failed: the reason is printed under the row.

  5. Ask in Act mode

    Check the toggle at the bottom of the panel says Act, then begin your first prompts with use shadcnio….

cline_mcp_settings.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": "streamableHttp",
      "url": "https://www.shadcn.io/api/mcp?token=YOUR_TOKEN"
    }
  }
}

Cline keeps this file in its own settings folder, outside your project, so the token stays out of git. The Cline CLI reads ~/.cline/data/settings/cline_mcp_settings.json. Regenerate the token if it ever leaks.

Three ways to add shadcnio to Cline
WhereWhat to doWatch for
Remote Servers formServer Name shadcnio, your MCP URL as Server URL, Streamable HTTP, then Add ServerLeave the transport off SSE (Legacy)
cline_mcp_settings.jsonPaste the entry above under mcpServerstype must read streamableHttp, in camelCase
Cline CLIcline mcp add shadcnio "YOUR_MCP_URL" --transport http --yescline config mcp shows what it saved

Check that Cline sees it

The Configure tab of MCP Servers lists each server with a switch and a status dot: green once connected, yellow while connecting, red with the error printed below.

  1. Open MCP Servers from the Cline toolbar and pick the Configure tab.
  2. Find shadcnio with its switch on and a green dot, then click it: Tools (22) lists each tool with its parameters.
  3. In a terminal, cline config mcp prints the servers the CLI has saved.
  4. Send the prompt below. Cline pauses on whoami with Approve and Reject; approve it, and the reply gives your account, your plan and how many calls this minute still allows.
Prompt
use shadcnio to tell me which shadcn.io account my token belongs to, and its plan

Three tasks, done in Cline

A page planned before it's built, a validated date field and a Vue component written file by file: the prompt, the calls Cline asks you to approve, and what lands. Turn the MCP off to compare.

Your agent
  1. shadcn.io MCP connected · 22 tools
  2. You: Plan an account settings page with profile, security and API keys, then build it.
  3. Agent step: Plan mode: three sections agreed, then you switched to ActReturns: Profile, security and API keys, in that order
  4. MCP call: plan_page({ brief: "account settings page with profile, security and API keys", kind: "app" })Returns: settings-profile, settings-security, settings-api-keys
  5. MCP call: get_block({ names: ["settings-profile", "settings-security", "settings-api-keys"], include: ["install"] })Returns: A shadcn add command covering the three
  6. Agent step: Ran npx shadcn add after you clicked Run CommandReturns: The blocks in place, linked from the settings route
  7. Your agent: The settings page has profile, security and API key sections, in the order we planned.

In your project

Settings page

  • The sections you settled on in Plan mode
  • A single install for all three blocks

1 prompt → 2 MCP calls

Prompts to try in Cline

Paste one into the Cline panel with the toggle on Act, or on Plan when you want to talk a page through first. Saying use shadcnio keeps Cline on the registry instead of its memory.

01
use shadcnio to plan a pricing page from blocks, and wait for my go-ahead before installing anything
02
use shadcnio to replace the hand-written dropdowns in src/components with Select, one file per diff
03
use shadcnio to add a command menu that opens with Cmd+K and jumps to our routes
04
use shadcnio to find a kanban board block for the tasks page and install it with pnpm
05
use shadcnio to read the Dialog API and tell me how to keep it open while the form submits
06
use shadcnio to pick Lucide icons for the sidebar links in place of the emoji
07
use shadcnio to set this new Vite app up for shadcn components
08
use shadcnio to show an empty state on the projects list when an account has none

What's worth knowing in Cline

How Cline's approvals, modes, rules and checkpoints behave with a server that only reads.

  • One switch for every MCP call

    Each call stops on Cline wants to use a tool on the `shadcnio` MCP server until you click Approve. Use MCP servers in the Auto-approve bar above the chat box lets calls through, but for every connected server at once: Cline has no per-tool opt-in.

  • Plan the screen, then Act

    Plan mode reads your code and talks the approach through, but it won't edit a file or run a command. Agree on the blocks there, then flip the toggle to Act. Use different models for Plan and Act, in Cline's settings, gives each mode its own model.

  • A rule that loads for UI files

    Save a rule in .clinerules/, or type /newrule and let Cline write it. A paths list in the front matter turns it on only when matching files are in context, and the scale icon by the model picker switches rules on and off.

    ---
    paths:
      - "src/components/**"
      - "app/**"
    ---
    For UI work, look the component up with the shadcnio MCP first, then install it with the command it returns.
  • Installs still ask first

    With MCP calls auto-approved, npx shadcn add still arrives as a command with Run Command and Reject. Cline's model tends to mark package installs as needing approval, so they pause even when safe commands run unattended.

  • Undo an install with a checkpoint

    Cline snapshots your files after each tool use. If an install or an edit goes wrong, open Restore on the checkpoint before it and pick Restore Files: the files go back, the conversation stays.

  • Move the token into a header

    Cline sends any headers you list on a remote entry. Put the bare endpoint in url and your token in an Authorization header, so it doesn't appear in the URL.

    "shadcnio": {
      "type": "streamableHttp",
      "url": "https://…/api/mcp",
      "headers": { "Authorization": "Bearer YOUR_TOKEN" }
    }

When shadcnio won't connect in Cline

What Cline shows, then the fix. A red server row prints its error underneath, which usually points at the cause; the troubleshooting guide covers the rest.

After you save, shadcnio doesn't appear, or Cline calls the settings file invalid.
Check the JSON parses, and that type reads streamableHttp. A config copied from another VS Code extension often says streamable-http, a spelling Cline refuses.
The entry has a url but no type, and it never connects.
With no type, Cline connects over the legacy SSE transport, and this server expects streamable HTTP. Add "type": "streamableHttp" to the entry and save.
Every shadcnio call fails with 401 Unauthorized.
The token in the URL is missing, or you regenerated it after copying. Copy the entry from this page again, replace url in the file and save.
shadcnio turns red with a 403 after it had been working.
The token is still valid, but its account no longer has Pro. Renew on pricing, then click Restart Server in the expanded row; the entry stays as it is.
MCP Servers shows only the Configure tab, no Remote Servers.
Your Cline organization blocks personal remote servers. Ask an admin to allow them, so you can add shadcnio with your own token.
A long call, such as a big install plan, stops on a timeout.
Expand shadcnio and raise Request Timeout above the 1 minute default. Cline saves it as timeout, in seconds, in the same file.

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

4.9 out of 5 from 150+ developers

Give Cline the whole registry

Pro brings every component, 6,231 blocks and 294k icons to Cline, whether you run it in VS Code, JetBrains or the terminal.

Get Pro