Shadcn UI v4 MCP Server
Provides access to shadcn/ui v4 components, blocks, demos, and metadata, enabling retrieval of React, Svelte, Vue, and React Native implementations for AI-powered development.
Click on "Deploy Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@Shadcn UI v4 MCP Serverget me the source code for the shadcn button component"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
Shadcn UI v4 MCP Server
🚀 The fastest way to integrate shadcn/ui components into your AI workflow
A Model Context Protocol (MCP) server that provides AI assistants with comprehensive access to shadcn/ui v4 components, blocks, demos, and metadata. Seamlessly retrieve React, Svelte, Vue, and React Native implementations for your AI-powered development workflow.
✨ Key Features
🎯 Multi-Framework Support - React, Svelte, Vue, and React Native implementations
📦 Component Source Code - Latest shadcn/ui v4 TypeScript source
🎨 Component Demos - Example implementations and usage patterns
🏗️ Blocks Support - Complete block implementations (dashboards, calendars, forms)
📋 Metadata Access - Dependencies, descriptions, and configuration details
🔍 Directory Browsing - Explore repository structures
⚡ Smart Caching - Efficient GitHub API integration with rate limit handling
🌐 SSE Transport - Server-Sent Events support for multi-client deployments
🐳 Docker Ready - Production-ready containerization with Docker Compose
Related MCP server: CDS Components MCP Server
🚀 Quick Start
# Basic usage (60 requests/hour)
npx @jpisnice/shadcn-ui-mcp-server
# With GitHub token (5000 requests/hour) - Recommended
npx @jpisnice/shadcn-ui-mcp-server --github-api-key ghp_your_token_here
# Switch frameworks
npx @jpisnice/shadcn-ui-mcp-server --framework svelte
npx @jpisnice/shadcn-ui-mcp-server --framework vue
npx @jpisnice/shadcn-ui-mcp-server --framework react-native🎯 Get your GitHub token in 2 minutes: docs/getting-started/github-token.md
🌐 SSE Transport & Docker Deployment
Run the server with Server-Sent Events (SSE) transport for multi-client support and production deployments:
Quick Start with SSE
# SSE mode (supports multiple concurrent connections)
node build/index.js --mode sse --port 7423
# Docker Compose (production ready)
docker-compose up -d
# Connect with Claude Code
claude mcp add --scope user --transport sse shadcn-mcp-server http://localhost:7423/sseTransport Modes
stdio(default) - Standard input/output for CLI usagesse- Server-Sent Events for HTTP-based connectionsdual- Both stdio and SSE simultaneously
Docker Examples
# Basic container
docker run -p 7423:7423 shadcn-ui-mcp-server
# With GitHub API token
docker run -p 7423:7423 -e GITHUB_PERSONAL_ACCESS_TOKEN=ghp_your_token shadcn-ui-mcp-server
# Docker Compose (recommended)
docker-compose up -d
curl http://localhost:7423/healthEnvironment Variables
MCP_TRANSPORT_MODE- Transport mode (stdio|sse|dual)MCP_PORT- SSE server port (default: 7423 - SHADCN on keypad!)MCP_HOST- Host binding (default: 0.0.0.0)MCP_CORS_ORIGINS- CORS origins (comma-separated)GITHUB_PERSONAL_ACCESS_TOKEN- GitHub API token
📚 Documentation
Section | Description |
Installation, setup, and first steps | |
Framework selection, tokens, and options | |
Editor and tool integrations | |
Examples, tutorials, and use cases | |
Framework-specific documentation | |
Common issues and solutions | |
Tool reference and technical details |
🎨 Framework Support
This MCP server supports four popular shadcn implementations:
Framework | Repository | Maintainer | Description |
React (default) | React components from shadcn/ui v4 | ||
Svelte | Svelte components from shadcn-svelte | ||
Vue | Vue components from shadcn-vue | ||
React Native | React Native components from react-native-reusables |
🛠️ Essential Setup
1. Get GitHub Token (Recommended)
# Visit: https://github.com/settings/tokens
# Generate token with no scopes needed
export GITHUB_PERSONAL_ACCESS_TOKEN=ghp_your_token_here2. Run Server
# React (default)
npx @jpisnice/shadcn-ui-mcp-server
# Svelte
npx @jpisnice/shadcn-ui-mcp-server --framework svelte
# Vue
npx @jpisnice/shadcn-ui-mcp-server --framework vue
# React Native
npx @jpisnice/shadcn-ui-mcp-server --framework react-native3. Integrate with Your Editor
Claude Code: SSE transport integration (see above)
VS Code: docs/integration/vscode.md
Cursor: docs/integration/cursor.md
Claude Desktop: docs/integration/claude-desktop.md
Continue.dev: docs/integration/continue.md
🎯 Use Cases
AI-Powered Development - Let AI assistants build UIs with shadcn/ui
Multi-Client Deployments - SSE transport supports multiple concurrent connections
Production Environments - Docker Compose ready with health checks and monitoring
Component Discovery - Explore available components and their usage
Multi-Framework Learning - Compare React, Svelte, Vue, and React Native implementations
Rapid Prototyping - Get complete block implementations for dashboards, forms, etc.
Code Generation - Generate component code with proper dependencies
📦 Installation
# Global installation (optional)
npm install -g @jpisnice/shadcn-ui-mcp-server
# Or use npx (recommended)
npx @jpisnice/shadcn-ui-mcp-server🔗 Quick Links
📄 License
MIT License - see LICENSE for details.
🙏 Acknowledgments
shadcn - For the amazing React UI component library
huntabyte - For the excellent Svelte implementation
unovue - For the comprehensive Vue implementation
Founded Labs - For the React Native implementation
Anthropic - For the Model Context Protocol specification
Made with ❤️ by Janardhan Polle
Star ⭐ this repo if you find it helpful!
Available Tools
10 toolsapply_themeCDestructive
Apply a TweakCN theme preset to the project
| Name | Required | Description | Default |
|---|---|---|---|
| query | No | Search query for theme (e.g., 'cyberpunk', 'modern') | |
| dryRun | No | If true, returns preview instead of writing files | |
| presetId | No | Specific preset ID if known | |
| tailwindVersion | No | Tailwind CSS version (default: '4') |
get_blockARead-only
Get source code for a specific shadcn/ui v4 block (e.g., calendar-01, dashboard-01)
| Name | Required | Description | Default |
|---|---|---|---|
| blockName | Yes | Name of the block (e.g., "calendar-01", "dashboard-01", "login-02") | |
| includeComponents | No | Whether to include component files for complex blocks (default: true) |
get_componentARead-only
Get the source code for a specific shadcn/ui v4 component
| Name | Required | Description | Default |
|---|---|---|---|
| componentName | Yes | Name of the shadcn/ui component (e.g., "accordion", "button") |
get_component_demoARead-only
Get demo code illustrating how a shadcn/ui v4 component should be used
| Name | Required | Description | Default |
|---|---|---|---|
| componentName | Yes | Name of the shadcn/ui component (e.g., "accordion", "button") |
get_component_metadataARead-only
Get metadata for a specific shadcn/ui v4 component
| Name | Required | Description | Default |
|---|---|---|---|
| componentName | Yes | Name of the shadcn/ui component (e.g., "accordion", "button") |
get_directory_structureBRead-only
Get the directory structure of the shadcn-ui v4 repository
| Name | Required | Description | Default |
|---|---|---|---|
| path | No | Path within the repository (default: v4 registry) | |
| repo | No | Repository name (default: "ui") | |
| owner | No | Repository owner (default: "shadcn-ui") | |
| branch | No | Branch name (default: "main") |
get_themeBRead-only
Get details of a specific tweakcn theme
| Name | Required | Description | Default |
|---|---|---|---|
| themeName | Yes | Name or ID of the theme to retrieve |
list_blocksBRead-only
Get all available shadcn/ui v4 blocks with categorization
| Name | Required | Description | Default |
|---|---|---|---|
| category | No | Filter by category (calendar, dashboard, login, sidebar, products) |
list_componentsBRead-only
Get all available shadcn/ui v4 components
| Name | Required | Description | Default |
|---|---|---|---|
No parameters | |||
list_themesARead-only
List available tweakcn themes
| Name | Required | Description | Default |
|---|---|---|---|
No parameters | |||
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
10 tool updates
v1.1.4- First observed
apply_theme - First observed
get_block - First observed
get_component - First observed
get_component_demo - First observed
get_component_metadata - First observed
get_directory_structure - First observed
get_theme - First observed
list_blocks - First observed
list_components - First observed
list_themes
TDQS
Scored across 10 tools
Most tools target distinct resources (component, block, theme, repo structure) and actions (get, list, apply). However, get_component, get_component_demo, and get_component_metadata all relate to component details, which could cause slight confusion for an agent deciding which one to call.
Every tool name follows a consistent snake_case verb_noun pattern: get_component, list_components, apply_theme, etc. The prefixes (get_, list_, apply_) are used uniformly, making the set highly predictable.
With 10 tools, the surface is well-scoped for a UI component reference service. Each tool covers a distinct resource or operation without redundancy, fitting comfortably within the ideal 3–15 range.
The tools cover the core lifecycle: listing and fetching components, blocks, themes, demos, metadata, and applying themes. Minor gaps exist, such as no search/filter for components or blocks and no demo retrieval for blocks, but agents can work around these for the stated purpose.
Maintenance
Related MCP Connectors
Find UI components and themes, retrieve code, and generate with hosted 21st AI when enabled.
React + Tailwind UI components and recipes your AI coding tool can search and install.
React + Tailwind UI components and recipes your AI coding tool can search and install.
101Search, read and install agent-ready React components, screens and blocks for AI products.
Related MCP Servers
- FlicenseAqualityDmaintenanceProvides AI assistants with direct access to shadcn/ui components and blocks, enabling real-time fetching of component source code, documentation, and implementation examples.415 npm4-
- AlicenseNot gradedqualityDmaintenanceEnables AI assistants to search, understand, and generate code for design system components by syncing and indexing a component library.ISC
- AlicenseAqualityDmaintenanceProvides AI assistants with comprehensive access to shadcn/ui v4 components, blocks, demos, and metadata across React, Svelte, Vue, and React Native, enabling efficient component integration and code generation.106,797 npmMIT
- AlicenseNot gradedqualityBmaintenanceEnables AI coding agents to search across 340+ React UI registries, inspect component code and quality scores, compare options, detect a project's stack, and generate or execute safe transactional install plans. It provides read and write safeguards with dry-run planning and rollback.1MIT