shadcn/ui MCP Server for Claude

Find components in shadcn-compatible registries from Claude Code and inspect the implementation before adding it to your project.

How to set up the shadcn/ui MCP Server in Claude

  1. Run the setup command from the project root using pnpm, or merge the manual example into your project’s .mcp.json.
  2. Restart Claude Code and open /mcp. Try searching the configured registry for a component you already know.
Claude Code · Initialize shadcn MCP for Claude Code
pnpm dlx shadcn@latest mcp init --client claude
Claude Code · Project .mcp.json
{
  "mcpServers": {
    "shadcn": {
      "command": "npx",
      "args": [
        "shadcn@latest",
        "mcp"
      ]
    }
  }
}
Download configuration

Find the component your project can use

The server reads the registries configured in your project's components.json. Use it to compare available items and inspect their source before installing one. A component from a registry can add files and dependencies, so review the proposed changes before letting Claude apply them.

Compare dialog components

Ask Claude to show which dialog component the configured registries provide, identify its focus management and dismissal behavior, and give the proposed files and dependencies. Open the source in the registry and check that the imports match your project’s component style. After a test install, try closing the dialog with Escape and make sure focus returns to its trigger.

Keep registry access in the project

The standard registry works without additional configuration. Private registries can require their own URL and headers in components.json. Use the publisher’s environment-variable reference for private credentials and keep those values out of the committed configuration.

Publisher setup and documentation

Browse MCP servers