Skip to content

shadcn MCP Server

Browse, search and install shadcn/ui components and blocks in plain language, from any registry you use.

Officialby shadcn/uiRuns on your computerChecked October 27, 2026

The shadcn MCP server, from the shadcn/ui project, lets Claude list, search and view the components, blocks and templates in the shadcn/ui registry and in any other registry set in your project's components.json, private company libraries included. For the items you pick it returns the exact npx shadcn add command, so components go into your project from a plain-language request. It runs on your computer through the shadcn CLI and needs no account.

Who it is for

  • Developers building interfaces with shadcn/ui
  • People building websites with Claude Code or Cursor
  • Teams that share a private component library

Prompts to try

Once it is connected, ask in plain words. Your AI tool decides when to use the server and asks before it changes anything important.

Prompt 1
Show me the login blocks in the shadcn registry and add the simplest one to my project.
Prompt 2
Build a pricing section with shadcn components: three plan cards, a monthly or yearly switch and an FAQ accordion.
Prompt 3
Find the data table example in the shadcn registry and adapt it to list my orders.

How to add the shadcn MCP server to Claude

MCP is an open standard, so this server works in Claude, ChatGPT, Codex, Cursor, VS Code and more. Pick your tool:

Easiest: paste this into Claude Code
Connect the shadcn MCP server to Claude Code for me: run this command: npx shadcn@latest mcp init --client claude
If a value starts with YOUR_, ask me for it first. When it is connected, help me sign in if needed and show me one thing I can ask it to do.

Or do it yourself:

npx shadcn@latest mcp init --client claude

Good to know

Run the init command inside your project, then restart Claude Code and check the server with /mcp. shadcn documents the same command for Cursor, VS Code, Codex and OpenCode (--client cursor, vscode, codex or opencode); for Codex it only prints the lines to add to ~/.codex/config.toml, because the CLI cannot edit that file.

Unlock the setup steps

Free. Leave your email once to open the setup steps for all 152 servers, and get the best new connectors each month.

No spam. One click to unsubscribe. We use your email to send you the course and AI tips.

How we checked it

Checked the shadcn/ui MCP docs and changelog (the MCP server came with CLI 3.0 in August 2025), the shadcn-ui/ui repo (MIT, 126.6k stars, commits through 2026-10-26) and the shadcn npm package (4.22.1). On 2026-10-27 we ran npx shadcn@latest mcp init --client claude in an empty test folder: it wrote .mcp.json and added shadcn as a dev dependency. We then started the server, which listed 7 tools, and a search for a login form in the @shadcn registry returned two login blocks with their add commands. We have not yet used it inside Claude Code.

Source: ui.shadcn.com/docs/mcp

shadcn MCP: common questions

Which AI tools does the shadcn MCP server work with?

shadcn's docs give a one-command setup for Claude Code, Cursor, VS Code with GitHub Copilot, Codex and OpenCode: run npx shadcn@latest mcp init in your project with --client claude, cursor, vscode, codex or opencode. For Codex you also add the server to ~/.codex/config.toml by hand, because the shadcn CLI cannot edit that file. Any other MCP client can run the same command: npx with the arguments shadcn@latest and mcp.

Do I need an account or an API key?

No. The standard shadcn/ui registry needs no configuration at all. Only private registries that require sign-in need a token, which you keep in an environment variable in .env.local and pass in the registry's headers in components.json.

Can it use my company's own components?

Yes. It works with any registry that follows the shadcn registry specification: the default shadcn/ui registry, third-party registries and private company libraries. Add each one to the registries section of components.json under a namespace such as @internal, then ask for items by name, for example @internal/auth-form.

What if my AI tool shows No tools or prompts for shadcn?

shadcn's troubleshooting steps: clear the npx cache with npx clear-npx-cache, turn the MCP server off and on again in your AI tool, and check its logs (in Cursor, View > Output, then MCP: project-* in the dropdown). If components fail to install, check that your project has a valid components.json and that the target folders exist.

We wrote these answers from the official pages of each product named, read on October 27, 2026.