Skip to content

shadcn/ui MCP Server

You need a command palette for your app. You know shadcn/ui has one, but you cannot remember the exact component name, which dependencies it pulls in, or how to customize it for your project’s theme. So you open the docs, search for “command,” find the component, read the installation instructions, copy the install command, run it, read the usage docs, and start adapting the examples to your codebase. Fifteen minutes of docs browsing before you write a single line of application code.

The shadcn/ui MCP server brings the entire component registry into your AI’s context. The AI searches components, reads their documentation, checks examples, and generates the installation command — all in one conversation. You describe what you need, and the AI handles the rest.

  • Setup for the official shadcn/ui MCP server across all three tools
  • Prompts for component discovery, installation, and customization
  • Understanding of registry support (React, Svelte, Vue, React Native)
  • Strategies for combining shadcn/ui MCP with Figma MCP for design-to-code workflows

The official shadcn MCP server is maintained by the shadcn team and provides access to the component registry, documentation, and examples.

{
"mcpServers": {
"shadcn": {
"command": "npx",
"args": ["shadcn@latest", "mcp"]
}
}
}

The shadcn MCP server exposes tools for navigating and using the component ecosystem:

ToolWhat It Does
list_items_in_registriesLists all available components, blocks, and hooks
search_items_in_registriesSearches components by name or description
view_items_in_registriesShows full documentation for a specific component
get_item_examples_from_registriesRetrieves usage examples for a component
get_add_command_for_itemsGenerates the correct npx shadcn add command
get_audit_checklistReturns best practices checklist for shadcn/ui usage

The real value is not just installing components — it is having the AI build complete features using shadcn/ui patterns correctly.

The shadcn MCP server supports registries beyond React:

RegistryFrameworkComponents
shadcn/uiReact + TailwindFull component library
shadcn-svelteSvelte + TailwindSvelte port of shadcn components
shadcn-vueVue + TailwindVue port of shadcn components
react-native-reusablesReact NativeMobile-adapted components

When using multi-framework registries, specify the registry in your prompts: “Search the shadcn-svelte registry for a DatePicker component.”

The most powerful design-to-code workflow combines Figma MCP with shadcn/ui MCP. The AI reads the design from Figma, identifies which shadcn/ui components match the design patterns, and generates implementation code that uses the correct components with proper customization.

The shadcn MCP server includes a get_audit_checklist tool that returns best practices for using shadcn/ui in your project. This is useful for code review or when onboarding new team members to the design system.

“Command not found” for shadcn CLI. The MCP server generates npx shadcn add commands, which require the shadcn CLI. If you have not initialized shadcn in your project, run npx shadcn init first.

Components install but do not render. Check that your Tailwind CSS configuration includes the shadcn preset and that your components.json file points to the correct paths. The MCP server generates commands based on the default configuration.

Wrong framework detected. If the AI generates React code for a Svelte project, be explicit about your framework in the prompt: “I am using shadcn-svelte, not the React version.”

Outdated component examples. The MCP server fetches from the live registry, so examples are current. But if you installed a component months ago, your local version may be behind the registry. Run npx shadcn diff to check for updates.