home / mcp / shadcn ui mcp server
Provides an MCP server to manage shadcn/ui components and blocks with multi-package-manager support.
Configuration
View docs{
"mcpServers": {
"heilgar-shadcn-ui-mcp-server": {
"command": "npx",
"args": [
"@heilgar/shadcn-ui-mcp-server"
]
}
}
}You run a Shadcn UI MCP Server to manage and interact with shadcn/ui components through the Model Control Protocol. It lets you discover components and blocks, read their docs, and install them across multiple package managers, all via a unified MCP interface.
You interact with the server using an MCP client to list available components, view documentation, and install what you need. You can also query available blocks, read their docs, and install blocks just like components. The server automatically supports npm, pnpm, yarn, and bun, and it can detect your preferred package manager when performing installations.
Prerequisites: ensure you have Node.js v18 or higher and a package manager installed (npm or yarn is fine). You will run the MCP server via a standard Node-based CLI approach.
npm install
npm run buildYou can connect to the MCP server using standard JSON configuration snippets. The server is intended to run locally via a simple CLI invocation and can be configured for different environments by providing the MCP server entry under a unique name.
{
"mcpServers": {
"shadcn-ui-server": {
"command": "npx",
"args": ["@heilgar/shadcn-ui-mcp-server"]
}
}
}During development and debugging, you can run a dedicated inspector to monitor MCP traffic, tool calls, and logs. This helps you verify component and block operations and diagnose issues as you install or query resources.
npm run inspectorThe server provides a set of actions you can perform via MCP calls. These include listing components, retrieving component docs, installing components, listing blocks, getting block docs, and installing blocks.
- List available components to see what you can install. - Get documentation for a specific component to understand usage and props. - Install a component with your preferred package manager. - Do the same for blocks to extend UI capabilities.
Retrieve the list of available shadcn/ui components.
Fetch documentation for a specific component.
Install a shadcn/ui component into your project.
Retrieve the list of available shadcn/ui blocks.
Fetch documentation for a specific block.
Install blocks into your project.