shadcn.io is not affiliated with official shadcn/ui
- 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
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:
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.
get_install_command({ name: "color-picker", packageManager: "pnpm" }){
"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.
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:
The CLI command, your token in its URL: shadcn for React and Solid, shadcn-vue, shadcn-svelte.namesfor several in one command;haveleaves 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.