mcp command starts the shadcn MCP server or helps you configure MCP clients.
Usage
Start the MCP server:Options
The MCP client to configure. Available options:
claude- Claude Codecursor- Cursorvscode- VS Codecodex- Codexopencode- OpenCode
The working directory. Defaults to the current directory.
Examples
Start MCP server
Initialize for Claude Code
.mcp.json with configuration for Claude Code.
Initialize for Cursor
.cursor/mcp.json with configuration for Cursor.
Initialize for VS Code
.vscode/mcp.json with configuration for VS Code with GitHub Copilot.
What it does
When you runmcp init:
- Detects configuration - Checks for existing MCP configuration
- Creates config file - Adds shadcn MCP server configuration
- Installs dependencies - Optionally installs shadcn package
- Provides instructions - Shows next steps for your specific client
mcp without arguments:
- Starts MCP server - Launches the Model Context Protocol server
- Loads registries - Reads component registries from
components.json - Exposes tools - Makes browsing, searching, and installation tools available to AI assistants
Configuration
The MCP server reads registry configuration fromcomponents.json:
components.json
Learn more
- MCP Integration Guide - Complete guide to using MCP with shadcn/ui
- Registry Documentation - Learn about component registries
- Model Context Protocol - Official MCP specification