Skip to content
Download Longwave

shadcn/ui

shadcn/ui is an MCP server for working with shadcn/ui components. The connected implementation exposes 10 tools, 4 resources and 5 prompts.

Add to Longwave Source

Install elsewhere

Install shadcn/ui

Choose a harness. These instructions start the same local MCP server shown on this page.

Claude Code

Run this in your terminal. It adds a user-scoped server; use --scope project instead if it should apply only to the current project.

terminal
claude mcp add --scope user --transport stdio shadcn-ui -- npx -y @jpisnice/shadcn-ui-mcp-server

What it does

shadcn MCP exposes component information through MCP tools, resources and prompts. An agent can use those server-provided definitions while working on a shadcn/ui project.

  • Search and inspect the component registry.
  • Read component resources exposed by the server.
  • Use prompts supplied by the connected implementation.
  • Inspect the exact source and usage information returned for a component.
  • See every supported argument instead of guessing at a function signature.

Available functions

apply_theme Apply a TweakCN theme preset to the project

Arguments

dryRun
boolean If true, returns preview instead of writing files
presetId
string Specific preset ID if known
query
string Search query for theme (e.g., 'cyberpunk', 'modern')
tailwindVersion
string Tailwind CSS version (default: '4') Allowed values: 3, 4
get_block Get source code for a specific shadcn/ui v4 block (e.g., dashboard-01, login-02, sidebar-01)

Arguments

blockName required
string Name of the block (e.g., "dashboard-01", "login-02", "sidebar-01")
includeComponents
boolean Whether to include component files for complex blocks (default: true)
get_component Get the source code for a specific shadcn/ui v4 component

Arguments

componentName required
string Name of the shadcn/ui component (e.g., "accordion", "button")
get_component_demo Get demo code illustrating how a shadcn/ui v4 component should be used

Arguments

componentName required
string Name of the shadcn/ui component (e.g., "accordion", "button")
get_component_metadata Get metadata for a specific shadcn/ui v4 component

Arguments

componentName required
string Name of the shadcn/ui component (e.g., "accordion", "button")
get_directory_structure Get the directory structure of the shadcn-ui v4 repository

Arguments

branch
string Branch name (default: "main")
owner
string Repository owner (default: "shadcn-ui")
path
string Path within the repository (default: v4 registry)
repo
string Repository name (default: "ui")
get_theme Get details of a specific tweakcn theme

Arguments

themeName required
string Name or ID of the theme to retrieve
list_blocks Get all available shadcn/ui v4 blocks with categorization

Arguments

category
string Filter by category (calendar, dashboard, login, sidebar, products)
list_components Get all available shadcn/ui v4 components
list_themes List available tweakcn themes

Resources

get_components

resource:get_components

List of available shadcn/ui components that can be used in the project

get_theme_metadata

resource:get_theme_metadata

Returns metadata about the currently configured theme

get_install_script_for_component

resource-template:get_install_script_for_component?packageManager={packageManager}&component={component}

Generate installation script for a specific shadcn/ui component based on package manager

get_installation_guide

resource-template:get_installation_guide?buildTool={buildTool}&packageManager={packageManager}

Get the installation guide for shadcn/ui based on build tool and package manager

Prompts

build-shadcn-page

Generate a complete shadcn/ui page using v4 components and blocks

Arguments

features
Specific features or components needed (comma-separated)
layout
Layout preference (sidebar, header, full-width, centered)
pageType required
Type of page to build (dashboard, login, calendar, sidebar, products, custom)
style
Design style (minimal, modern, enterprise, creative)
create-auth-flow

Generate authentication pages using shadcn/ui v4 login blocks

Arguments

authType required
Authentication type (login, register, forgot-password, two-factor)
features
Additional features (remember-me, social-login, validation)
providers
Auth providers (email, google, github, apple)
create-dashboard

Create a comprehensive dashboard using shadcn/ui v4 blocks and components

Arguments

dashboardType required
Type of dashboard (analytics, admin, user, project, sales)
navigation
Navigation style (sidebar, top-nav, breadcrumbs)
widgets
Dashboard widgets needed (charts, tables, cards, metrics)
create-data-table

Create advanced data tables with shadcn/ui components

Arguments

actions
Row actions (edit, delete, view, custom)
dataType required
Type of data to display (users, products, orders, analytics)
features
Table features (sorting, filtering, pagination, search, selection)
optimize-shadcn-component

Optimize or enhance existing shadcn/ui components with best practices

Arguments

component required
Component name to optimize
optimization
Type of optimization (performance, accessibility, responsive, animations)
useCase
Specific use case or context for the component

Questions people ask

How do I install shadcn MCP?

Add the catalog-backed `@jpisnice/shadcn-ui-mcp-server` package to the MCP client that will use it, then start the local server.

How do I use shadcn MCP in Cursor?

Add the server to Cursor's MCP configuration and connect it from the project where shadcn/ui is installed. Cursor can then request the registry data exposed by the server.

Can Claude Code use shadcn MCP?

Yes. Claude Code can connect to the local shadcn MCP package and use the resources, prompts and functions returned by that process.

Does shadcn MCP install components automatically?

Only if the connected version advertises an installation function. The page separates the server's actual functions from the component files that remain part of your project.

Does shadcn MCP support React 19?

The server supplies shadcn/ui component information. React 19 compatibility still depends on the component version and the project where you install it, so check the returned component metadata before adding it.

Can shadcn MCP search the component registry?

Yes. Registry lookup is the reason to connect this server. Use the live function and resource descriptions below to see the supported search inputs.

Stop making the agent guess the component API.

Give it the registry, resources and prompts that the project actually uses.