The shadcn registry manager MCP server provides an interface for working with the shadcn/ui component registry remotely. It allows you to automate shadcn CLI operations like initializing projects and adding components through a Model Context Protocol server, which is especially useful for AI agents, containerized environments, or remote workflows.
To use the MCP server with Docker, add the following configuration to your mcp.json
file:
"shadcn-registry-manager": {
"command": "docker",
"args": [
"run",
"--rm",
"-i",
"--mount",
"type=bind,src=<your-project-path>,dst=/workspace",
"-e",
"REGISTRY_URL=https://ui.shadcn.com/r",
"-e",
"STYLE=new-york",
"reuvenaor/shadcn-registry-manager"
]
}
When using Docker, you need to:
<your-project-path>
with your actual project directory path/workspace
as the destination path inside the containerAs an alternative, you can run the MCP server using npx:
"shadcn-registry-manager": {
"command": "npx",
"args": [
"@reuvenorg/shadcn-registry-manager"
],
"env": {
"REGISTRY_URL": "https://ui.shadcn.com/r",
"WORKSPACE_DIR": "/your/project/path",
"STYLE": "new-york"
}
}
To use with Claude, you can add the MCP server using the Claude CLI:
claude mcp add --scope project shadcn-registry-manager npx @reuvenorg/shadcn-registry-manager -e REGISTRY_URL=https://ui.shadcn.com/r -e WORKSPACE_DIR=/your/project/path -e STYLE=new-york
Or configure it in your .mcp.json
file:
{
"shadcn-registry-manager": {
"type": "stdio",
"command": "npx",
"args": [
"@reuvenorg/shadcn-registry-manager"
],
"env": {
"REGISTRY_URL": "https://ui.shadcn.com/r",
"WORKSPACE_DIR": "/your/project/path",
"STYLE": "new-york"
}
}
}
For Docker:
REGISTRY_URL
: URL of the shadcn registry (official: https://ui.shadcn.com/r
or self-hosted: http://localhost:3000/r
)STYLE
: Style of the shadcn registry (e.g., new-york
)For NPX:
WORKSPACE_DIR
: Path to your project directoryREGISTRY_URL
: URL of the shadcn registrySTYLE
: Style of the shadcn registryThe MCP server exposes several tools for working with the shadcn registry:
get_init_instructions
: Get project initialization instructionsexecute_init
: Run full project initializationget_items
: List available registry itemsget_item
: Fetch a specific registry itemadd_item
: Add a registry item to your projectexecute_add
: Add multiple components to your projectget_blocks
: Get current blocks from the registryTo get blocks from the registry:
use the tool `get_blocks` to get the blocks from the registry
To add a specific component:
use the tool `add_item` - dashboard-01 to your project
The MCP server supports both:
To add this MCP server to Claude Code, run this command in your terminal:
claude mcp add-json "shadcn-registry-manager" '{"command":"npx","args":["@reuvenorg/shadcn-registry-manager"],"env":{"REGISTRY_URL":"https://ui.shadcn.com/r","WORKSPACE_DIR":"/path/to/your/project","STYLE":"new-york"}}'
See the official Claude Code MCP documentation for more details.
There are two ways to add an MCP server to Cursor. The most common way is to add the server globally in the ~/.cursor/mcp.json
file so that it is available in all of your projects.
If you only need the server in a single project, you can add it to the project instead by creating or adding it to the .cursor/mcp.json
file.
To add a global MCP server go to Cursor Settings > Tools & Integrations and click "New MCP Server".
When you click that button the ~/.cursor/mcp.json
file will be opened and you can add your server like this:
{
"mcpServers": {
"shadcn-registry-manager": {
"command": "npx",
"args": [
"@reuvenorg/shadcn-registry-manager"
],
"env": {
"REGISTRY_URL": "https://ui.shadcn.com/r",
"WORKSPACE_DIR": "/path/to/your/project",
"STYLE": "new-york"
}
}
}
}
To add an MCP server to a project you can create a new .cursor/mcp.json
file or add it to the existing one. This will look exactly the same as the global MCP server example above.
Once the server is installed, you might need to head back to Settings > MCP and click the refresh button.
The Cursor agent will then be able to see the available tools the added MCP server has available and will call them when it needs to.
You can also explicitly ask the agent to use the tool by mentioning the tool name and describing what the function does.
To add this MCP server to Claude Desktop:
1. Find your configuration file:
~/Library/Application Support/Claude/claude_desktop_config.json
%APPDATA%\Claude\claude_desktop_config.json
~/.config/Claude/claude_desktop_config.json
2. Add this to your configuration file:
{
"mcpServers": {
"shadcn-registry-manager": {
"command": "npx",
"args": [
"@reuvenorg/shadcn-registry-manager"
],
"env": {
"REGISTRY_URL": "https://ui.shadcn.com/r",
"WORKSPACE_DIR": "/path/to/your/project",
"STYLE": "new-york"
}
}
}
}
3. Restart Claude Desktop for the changes to take effect