shadcn-ui
MCP server for shadcn/ui component references
claude mcp add --transport stdio ymadd-shadcn-ui-mcp-server node /path/to/shadcn-ui-server/build/index.js
How to use
The shadcn-ui MCP Server provides a structured interface to access and reference shadcn/ui components. It exposes tools to list all available components, fetch detailed information for a specific component, retrieve usage examples, and search components by keyword. This enables AI assistants and developers to quickly gather component descriptions, installation instructions, usage samples, props, variants, and code samples directly from the MCP server. Use the list_shadcn_components tool to get the full catalog, then call get_component_details for in-depth info on a chosen component. If you need practical usage guidance, get_component_examples returns example usage snippets you can copy into your projects. The search_components tool helps you find components by keyword when you’re exploring the library.
How to install
Prerequisites:
- Node.js (v14+ recommended) and npm/yarn installed
- Access to the MCP server source or published package (shadcn-ui-mcp-server)
Option A: Install and run from source
- Clone the repository or download the source for the MCP server.
- Install dependencies:
npm install
- Build the server (TypeScript project):
npm run build
- Run in development/watch mode (auto-rebuild on changes):
npm run watch
- If you want to use the local build with Claude or other clients, point your config to the built entry:
{
"mcpServers": {
"shadcn-ui-server": {
"command": "node",
"args": ["/path/to/shadcn-ui-server/build/index.js"]
}
}
}
Option B: Use the published npm package (npx)
- Ensure you have access to the MCP server package (shadcn-ui-mcp-server) on npm.
- Configure the server via npx when starting:
{
"mcpServers": {
"shadcn-ui-server": {
"command": "npx",
"args": ["-y", "shadcn-ui-mcp-server"]
}
}
}
- Start the server according to your environment (Claude Desktop, Windsurf, etc.).
Additional notes
Notes:
- The MCP server scrapes and caches data from https://ui.shadcn.com and the shadcn/ui GitHub repository to provide component descriptions, installation instructions, usage examples, props, and variants.
- If you modify the server or run locally, ensure the built entry point (build/index.js) is up to date.
- For debugging, use the MCP Inspector tool; run npm run inspector to get a debugging URL.
- The configuration examples assume a single shadcn-ui-server instance; you can adapt the server name and path to your environment.
- Environment variables can be added under env in the MCP config to customize behavior (e.g., CACHE_DIR, API_BASE_URL, LOG_LEVEL).
Related MCP Servers
bitbucket
Bitbucket MCP - A Model Context Protocol (MCP) server for integrating with Bitbucket Cloud and Server APIs
time
⏰ Time MCP Server: Giving LLMs Time Awareness Capabilities
advanced-homeassistant
An advanced MCP server for Home Assistant. 🔋 Batteries included.
unity-editor
An MCP server and client for LLMs to interact with Unity Projects
website-publisher
AI Website builder and publisher MCP. Quickly publish and deploy your AI generated code as real website URL. Support html, css, js, python etc.
pega-dx
Pega DX MCP Server - Enabling conversational interaction with Pega Infinity™ applications. This MCP Server transforms Pega Infinity™ interactions into intuitive, conversational experiences through the Model Context Protocol.