Integrate the shadcn/ui MCP Server with Claude Code terminal for command-line AI development.
For Claude Code terminal users, you can add the MCP server directly:
# Add the shadcn-ui MCP server with GitHub token
claude mcp add shadcn -- bunx -y @jpisnice/shadcn-ui-mcp-server --github-api-key YOUR_API_KEYAdd to your Claude Code configuration:
{
"mcpServers": {
"shadcn-ui": {
"command": "npx",
"args": [
"@jpisnice/shadcn-ui-mcp-server",
"--github-api-key",
"ghp_your_token_here"
]
}
}
}claude mcp add shadcn-react -- bunx -y @jpisnice/shadcn-ui-mcp-server --github-api-key YOUR_API_KEYclaude mcp add shadcn-svelte -- bunx -y @jpisnice/shadcn-ui-mcp-server --framework svelte --github-api-key YOUR_API_KEYclaude mcp add shadcn-vue -- bunx -y @jpisnice/shadcn-ui-mcp-server --framework vue --github-api-key YOUR_API_KEYclaude mcp add shadcn-react-native -- bunx -y @jpisnice/shadcn-ui-mcp-server --framework react-native --github-api-key YOUR_API_KEY"Show me the shadcn/ui button component source code"
"Get the card component with usage examples"
"List all available shadcn/ui components"
"Get the dashboard-01 block implementation"
"Show me the calendar-01 block with all components"
"List all available shadcn/ui blocks"
"Compare the button component between React and Svelte"
"Show me the Vue version of the card component"
"Get the React dialog component with TypeScript"
Use environment variables for better security:
# Set environment variable
export GITHUB_PERSONAL_ACCESS_TOKEN=ghp_your_token_here
# Add MCP server without hardcoding token
claude mcp add shadcn -- bunx -y @jpisnice/shadcn-ui-mcp-server-
Verify server runs standalone:
npx @jpisnice/shadcn-ui-mcp-server --help
-
Check command syntax:
- Ensure proper spacing and quotes
- Verify GitHub token is valid
-
Restart Claude Code after adding MCP server
-
Check Claude Code logs for error messages
"Command not found":
# Ensure npx is available
npx --version"Rate limit exceeded":
# Add GitHub token to command"MCP server not recognized":
- Restart Claude Code
- Check command syntax
- Verify token is valid
- Usage Examples - How to use after integration
- Troubleshooting - Common issues and solutions
- API Reference - Complete tool reference
- Other Integrations - Connect to other tools