What it does
The shadcn MCP server lets an AI assistant work with shadcn registries the way you would with the CLI. It can list what a registry has, search it, read a component's files and install it. You ask in plain language; the assistant picks the component and runs the install.
It reads the registries in your project's components.json. shadcn/ui is always there, and any other registry you add becomes searchable too. That's what makes it useful beyond the base components.
Set it up
Run one command in a project set up with shadcn init. It writes the MCP config for your client.
Claude Code
npx shadcn@latest mcp init --client claudeCursor
npx shadcn@latest mcp init --client cursorVS Code, Codex and OpenCode
npx shadcn@latest mcp init --client vscodeUse codex or opencode in place of vscode. Restart the client afterwards so it picks up the server. The shadcn MCP docs list the config each client gets.
Add other registries
A registry namespace maps a name to a URL pattern. Add one under registries in components.json, and both the CLI and the MCP server can use it.
{
"registries": {
"@uibrik": "https://uibrik.com/r/{name}.json"
}
}Your assistant can now browse @uibrik next to shadcn/ui and install with npx shadcn@latest add @uibrik/tag-input. The same works for any library that publishes a shadcn registry. See the shadcn registry guide for private registries and keys.
What to ask
Name the job, not the component. The assistant searches every registry it knows.
- Show me the components in the @uibrik registry for AI chat.
- Add a tag input to the settings form, using the registry that has an animated one.
- Find a pricing section and install it on /pricing with our theme colours.
Remote MCP servers
The shadcn MCP server runs locally through npx and needs a components.json. Some libraries also run their own remote server: a URL you add once, with nothing to install. uibrik's is at https://uibrik.com/mcp and needs no account or key.
Claude Code
claude mcp add --transport http uibrik https://uibrik.com/mcpCursor
{
"mcpServers": {
"uibrik": {
"url": "https://uibrik.com/mcp"
}
}
}A library's own server can return more than a registry file: props, examples and install steps for your framework. The uibrik MCP docs list its tools.
Which to use
- The shadcn MCP server when you pull from several registries and want one tool for all of them.
- A library's remote server when you want its props and examples, or you're in a client or project without
components.jsonyet.
Questions
- What does the shadcn MCP server do?
- It lets an AI assistant browse, search and install components from any shadcn registry listed in your components.json, using plain-language requests instead of exact CLI commands.
- How do I add the shadcn MCP server to Claude Code?
- Run npx shadcn@latest mcp init --client claude in your project, then restart Claude Code. The same command takes cursor, vscode, codex and opencode.
- Can the shadcn MCP server install components from other libraries?
- Yes. Add the library's namespace to the registries field of components.json, for example "@uibrik": "https://uibrik.com/r/{name}.json", and the MCP server can browse and install from it.
- Do I need the shadcn MCP server to use uibrik?
- No. uibrik also runs a remote MCP server at https://uibrik.com/mcp that needs nothing installed and no account or key. Either one works; many projects use both.