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.
Copy the entry
It holds
"type": "streamableHttp"and your URL, nothing else. No token yet? Create one on your account.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.
Paste it into cline_mcp_settings.json
On Remote Servers, click Edit Configuration. Put
shadcnioinsidemcpServers, beside any servers already listed, and save. Cline reconnects on save, with no reload of the editor.Wait for the green dot
On Configure,
shadcniogets a green dot once it connects, and its Tools tab counts 22. Red means it failed: the reason is printed under the row.Ask in Act mode
Check the toggle at the bottom of the panel says Act, then begin your first prompts with
use shadcnio….
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.
| Where | What to do | Watch for |
|---|---|---|
| Remote Servers form | Server Name shadcnio, your MCP URL as Server URL, Streamable HTTP, then Add Server | Leave the transport off SSE (Legacy) |
cline_mcp_settings.json | Paste the entry above under mcpServers | type must read streamableHttp, in camelCase |
| Cline CLI | cline mcp add shadcnio "YOUR_MCP_URL" --transport http --yes | cline 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.
- Open MCP Servers from the Cline toolbar and pick the Configure tab.
- Find
shadcniowith its switch on and a green dot, then click it: Tools (22) lists each tool with its parameters. - In a terminal,
cline config mcpprints the servers the CLI has saved. - Send the prompt below. Cline pauses on
whoamiwith Approve and Reject; approve it, and the reply gives your account, your plan and how many calls this minute still allows.
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.
- shadcn.io MCP connected · 22 tools
Agent step: Plan mode: three sections agreed, then you switched to ActReturns: Profile, security and API keys, in that orderMCP call: plan_page({ brief: "account settings page with profile, security and API keys", kind: "app" })Returns: settings-profile, settings-security, settings-api-keysMCP call: get_block({ names: ["settings-profile", "settings-security", "settings-api-keys"], include: ["install"] })Returns: A shadcn add command covering the threeAgent step: Ran npx shadcn add after you clicked Run CommandReturns: The blocks in place, linked from the settings route
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.
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/newruleand let Cline write it. Apathslist 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 addstill 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
headersyou list on a remote entry. Put the bare endpoint inurland your token in anAuthorizationheader, 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,
shadcniodoesn't appear, or Cline calls the settings file invalid. - Check the JSON parses, and that
typereadsstreamableHttp. A config copied from another VS Code extension often saysstreamable-http, a spelling Cline refuses. - The entry has a
urlbut notype, 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
urlin the file and save. shadcnioturns 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
shadcniowith your own token. - A long call, such as a big install plan, stops on a timeout.
- Expand
shadcnioand raise Request Timeout above the 1 minute default. Cline saves it astimeout, 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.
In cline_mcp_settings.json, the file that opens from Edit Configuration on the Remote Servers tab, or Configure MCP Servers on the Configure tab. It sits in Cline's own settings, not in your project. The Cline CLI reads ~/.cline/data/settings/cline_mcp_settings.json, and CLINE_MCP_SETTINGS_PATH can point it elsewhere.
That field picks the transport. A url entry with no type falls back to the older SSE transport, kept for old configs, while this server expects streamable HTTP. Cline also only accepts the camelCase spelling, so a hyphenated streamable-http copied from another extension's config is refused.
Yes. On the Remote Servers tab, enter shadcnio as the Server Name, paste your MCP URL as the Server URL, leave Streamable HTTP picked and click Add Server. Cline writes the matching entry into its settings file for you.
Run cline mcp add shadcnio followed by your MCP URL, with --transport http and --yes. Then cline config mcp lists the servers the CLI has saved, shadcnio among them.
For one component, Act is enough. For a whole page, start in Plan: Cline reads your code and settles the sections with you without editing anything. Then flip the toggle to Act and it fetches and installs the blocks you agreed on.
The tools answer for the framework Cline finds in your package.json. React gets a single shadcn add command. Vue, Svelte and Solid get every file with its path plus the packages to add, and Cline writes each file as a diff you save or reject.
With several servers connected, the model chooses what to call, and a loose prompt may not reach for any tool. Open with use shadcnio, name the component or the kind of block you want, and check the server's switch is on in MCP Servers.
Add a rule in .clinerules/, or type /newrule and describe what you want. A paths list in its front matter keeps it to your component folders, so it only loads for UI work.
Yes, by default. Each call shows the tool name and its arguments, with Approve and Reject under them. Every shadcnio tool only reads from the registry, so approving one never touches your files; the edits and the install come later, as their own steps.
Not at the moment. Cline gates MCP tools with a single permission, Use MCP servers in the auto-approve bar, and it applies to every server you have connected. If another server can write or send things, leave it off and approve the shadcnio lookups one by one.
Only when you let it. The install arrives as a terminal command with Run Command and Reject. Cline's model usually flags package installs as needing approval, so they still stop even when safe commands are allowed to run by themselves.
Not as a file: the entry lives in each person's Cline settings, with their own token in the URL. What a team can share is the habit, as a rule in .clinerules/ or a line in AGENTS.md, both of which Cline reads. A shadcn.io Team or Organization plan gives every member Pro and a separate token.
When an admin blocks personal remote servers, Cline hides the Remote Servers tab and members can't add their own. Ask for that block to be lifted so each person can add shadcnio with their own token, rather than one URL that everyone shares.
The arguments of each call: a search phrase, a component name, the framework. Your code goes to the model provider you chose in Cline's settings, never to the shadcn server.
It is stored as plain text in cline_mcp_settings.json, in Cline's settings folder and outside your repository, so git never picks it up. Keep it out of screenshots and bug reports. If it does leak, regenerate it on your account page and paste the new URL in.
Read the error under the row first. The usual causes are a type other than streamableHttp, a token you regenerated after copying the URL, or an account that has lost Pro. Fix the entry, save, then click Retry Connection.
401 means the URL has no token, or one that is no longer valid: copy the entry again. 403 means the token is fine but its account isn't on Pro: renew, then restart the server. 429 means one token went past 600 calls in a minute.
Using another agent too?
The same URL works in every MCP client: use it beside Cline, in your editor, your terminal or your chat app.
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