Skip to content
shadcn.io

shadcn.io is not affiliated with official shadcn/ui

MCP

get_install_command

Get the CLI command that installs a component, with your token in the URL. React and Solid use shadcn; Vue and Svelte use their own CLI.

Group
Install
Inputs
base?framework?have?name?names?packageManager?
Access
Read-only

When to use it

  • To add a component to a React project: one command brings every file and dependency.
  • To add the several a page needs in one go (names).

Inputs

InputType
base?"base" | "aria" | "ark" | "radix"

React only. Default base (Base UI).

Type
"base" | "aria" | "ark" | "radix"
framework?"react" | "vue" | "svelte" | "solid"

Default react.

Type
"react" | "vue" | "svelte" | "solid"
have?string[]

What the ui folder already has: left out.

name?string

Or names for several.

names?string[]

Several at once, in place of name.

packageManager?"npm" | "pnpm" | "yarn" | "bun"

From the lockfile. Default npm.

Type
"npm" | "pnpm" | "yarn" | "bun"

Example prompts

Name the server, so the agent doesn't answer from memory:

Prompts
use shadcnio to install the Color Picker with pnpm
use shadcnio to add the Tabs on Radix to this project

Call and response

Asked “Install the Color Picker”, the agent sends this call. The response is real, trimmed: long lists show their first items and long strings are cut.

Call
get_install_command({ name: "color-picker", packageManager: "pnpm" })
Response
{
  "command": "pnpm dlx shadcn@latest add \"https://kit.dev/r/color-picker.json?token=YOUR_TOKEN\" --overwrite",
  "name": "color-picker",
  "next": "Adds it to the project's ui folder, with what it uses. It never stops to ask: a file of the same name that differs is replaced (one the same…",
  "target": "React · Base UI"
}

Call it by hand

Your MCP client sends this for you. To try the tool without one, post the call yourself; the server answers in server-sent events, the result on the data: line.

Terminal
Sign in to get your config
Sign in with a Pro account, and this holds your MCP URL, ready to paste.

What your agent reads

The server's description of get_install_command, one of the Install tools. Your agent reads it to decide when to call the tool:

tools/listget_install_command.description
The CLI command, your token in its URL: shadcn for React and Solid, shadcn-vue, shadcn-svelte. names for several in one command; have leaves out what the project has.

Next

FAQ

Can I install several components with one command?

Pass names in place of name: one command, one URL each, every dependency once. An unknown name fails the call, with what it likely meant, so nothing installs halfway.

How do I install a component in Vue, Svelte, or Solid?

Their own CLI: shadcn-vue for Vue, shadcn-svelte for Svelte, and the shadcn CLI for Solid, once get_project_setup has set it up (setup says so). Without a shell: get_install_plan.

Where do the installed files land?

Where your components.json aliases say: components/ui, lib and hooks.

Is my token safe in the install command?

It's in the URL the CLI fetches, as in your own shadcn add commands. Keep the command out of public logs, and regenerate your token on your account if it leaks.