@jpisnice/shadcn-ui-mcp-server
This MCP server gives AI assistants full access to shadcn/ui v4 components, blocks, and themes across React, Svelte, Vue, and React Native.
Retrieve component source code for any shadcn/ui v4 component (
get_component)Get usage demos showing how components should be implemented (
get_component_demo)List all available components in the registry (
list_components)Fetch component metadata such as dependencies, descriptions, and config (
get_component_metadata)Browse the repository directory structure by repo, owner, branch, and path (
get_directory_structure)Get full block source code like dashboards, calendars, and login pages, optionally including nested component files (
get_block)List blocks by category (calendar, dashboard, login, sidebar, products) (
list_blocks)Apply TweakCN theme presets to your project, with dry-run preview support (
apply_theme)List and inspect available TweakCN themes (
list_themes,get_theme)Switch frameworks via CLI/ENV: React (default), Svelte, Vue, or React Native
Choose UI primitives for React: Radix (default) or Base UI
Run flexibly over stdio, Streamable HTTP (
/mcp), or dual transport, including Docker/Docker Compose deploymentBenefit from smart caching, GitHub token rate-limit boosts, and argument autocompletion
Integrates with GitHub API for efficient caching and rate limit handling, enabling the server to access and retrieve shadcn/ui component resources from the GitHub repository.
Provides comprehensive access to shadcn/ui v4 components, blocks, demos, and metadata, allowing AI assistants to retrieve component source code, example implementations, block implementations, dependencies, and repository structure information.
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., "@@jpisnice/shadcn-ui-mcp-server show me the code for a button component in React"
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, plus protocol cache hints (
ttlMs/cacheScope) on list and read results⌨️ Argument Completion - Autocomplete for prompt and resource-template arguments (component names, package managers, build tools, and more)
🌐 Streamable HTTP Transport - Stateless
/mcpendpoint for multi-client deployments (MCP spec 2026-07-28)🐳 Docker Ready - Production-ready containerization with Docker Compose
Related MCP server: shadcn-ui 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
# Use Base UI instead of Radix (React only)
npx @jpisnice/shadcn-ui-mcp-server --ui-library base🎯 Get your GitHub token in 2 minutes: docs/getting-started/github-token.md
📦 One-Click Installation (Claude Desktop)
Download and double-click the .mcpb file for instant installation:
Download
shadcn-ui-mcp-server.mcpbfrom ReleasesDouble-click the file - Claude Desktop opens automatically
Enter your GitHub token (optional, for higher rate limits)
Click Install - tools are available immediately
Manual install: Claude Desktop → Settings → MCP → Add Server → Browse → Select .mcpb file
References: Anthropic Desktop Extensions | Building MCPB
🌐 HTTP Transport & Docker Deployment
The server implements the 2026-07-28 MCP specification (via MCP TypeScript SDK v2) and stays compatible with 2025-era clients. To make your client use the modern protocol, or to require it, see the Modern Protocol Guide. Besides stdio, it can serve Streamable HTTP at a single stateless /mcp endpoint for multi-client and production deployments:
Quick Start with HTTP
# HTTP mode (stateless, supports many concurrent clients)
node build/index.js --mode http --port 7423
# Docker Compose (production ready)
docker-compose up -d
# Connect with Claude Code
claude mcp add --scope user --transport http shadcn-mcp-server http://localhost:7423/mcpTransport Modes
stdio(default) - Standard input/output for CLI usagehttp- Streamable HTTP at/mcpdual- Both stdio and HTTP simultaneously
The legacy SSE transport (
/sse+/message) was removed.--mode sseis still accepted as a deprecated alias forhttp.
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|http|dual)MCP_PORT- HTTP server port (default: 7423 - SHADCN on keypad!)MCP_HOST- Host binding (default: 0.0.0.0)MCP_CORS_ORIGINS- CORS origins (comma-separated)MCP_PROTOCOL- Protocol eras to accept:any(default; 2026-07-28 plus 2025-era fallback) ormodern(2026-07-28 only). CLI:--protocolGITHUB_PERSONAL_ACCESS_TOKEN- GitHub API tokenUI_LIBRARY- UI primitive library:radix(default) orbase(React only)
📚 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 |
UI Library (React only)
shadcn/ui v4 supports two primitive libraries for React: Radix UI (default) and Base UI.
# Radix UI (default)
npx @jpisnice/shadcn-ui-mcp-server --framework react --ui-library radix
# Base UI
npx @jpisnice/shadcn-ui-mcp-server --framework react --ui-library base
# Or via environment variable
UI_LIBRARY=base npx @jpisnice/shadcn-ui-mcp-serverClaude Desktop config example:
{
"args": ["--framework", "react", "--ui-library", "base"]
}🛠️ 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
Autohand Code: See Autohand Code Integration below
Claude Code: See Claude Code Integration below
VS Code: docs/integration/vscode.md
Cursor: docs/integration/cursor.md
Claude Desktop: docs/integration/claude-desktop.md
Continue.dev: docs/integration/continue.md
💻 Autohand Code Integration
Use the Autohand Code CLI to add the shadcn/ui MCP server:
autohand mcp add shadcn bunx -y @jpisnice/shadcn-ui-mcp-server --github-api-key YOUR_TOKENAdd --scope project before shadcn to save the server in the current project's .autohand configuration instead of your user configuration.
💻 Claude Code Integration
Quick Add (CLI)
# Add the shadcn-ui MCP server
claude mcp add shadcn -- bunx -y @jpisnice/shadcn-ui-mcp-server --github-api-key YOUR_TOKENHTTP Transport
For production deployments with the Streamable HTTP transport:
# Start server in HTTP mode
node build/index.js --mode http --port 7423
# Connect with Claude Code
claude mcp add --scope user --transport http shadcn-mcp-server http://localhost:7423/mcpFramework-Specific Commands
See Claude Code Integration Guide for framework-specific commands (React, Svelte, Vue, React Native).
Reference: Claude Code MCP Documentation
🎯 Use Cases
AI-Powered Development - Let AI assistants build UIs with shadcn/ui
Multi-Client Deployments - Stateless HTTP transport scales horizontally without sticky sessions
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🔨 Building from Source
Prerequisites
Node.js >= 20.0.0
npm or pnpm
Build Steps
# Clone the repository
git clone https://github.com/Jpisnice/shadcn-ui-mcp-server.git
cd shadcn-ui-mcp-server
# Install dependencies
npm install
# Build the project
npm run build
# Run the server
node build/index.js --github-api-key YOUR_TOKENRun Locally
# After building, run with options
node build/index.js --github-api-key YOUR_TOKEN
node build/index.js --framework svelteBuilding MCPB Package
The project includes a manifest.json following the MCPB specification. The .mcpb file is a ZIP archive containing the server, dependencies, and configuration.
See CONTRIBUTING.md for detailed packaging instructions.
Reference: Building Desktop Extensions with MCPB
🔗 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
Inputs: query, presetId, tailwindVersion, dryRun.
get_blockARead-only
Get source code for a specific shadcn/ui v4 block (e.g., calendar-01, dashboard-01)
Inputs: blockName (required), includeComponents.
get_componentARead-only
Get the source code for a specific shadcn/ui v4 component
Inputs: componentName (required).
get_component_demoARead-only
Get demo code illustrating how a shadcn/ui v4 component should be used
Inputs: componentName (required).
get_component_metadataARead-only
Get metadata for a specific shadcn/ui v4 component
Inputs: componentName (required).
get_directory_structureBRead-only
Get the directory structure of the shadcn-ui v4 repository
Inputs: path, owner, repo, branch.
get_themeBRead-only
Get details of a specific tweakcn theme
Inputs: themeName (required).
list_blocksBRead-only
Get all available shadcn/ui v4 blocks with categorization
Inputs: category.
list_componentsBRead-only
Get all available shadcn/ui v4 components
Inputs: no named parameters.
list_themesARead-only
List available tweakcn themes
Inputs: no named parameters.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 10 tools
Each tool targets a distinct resource: theme, block, component, or directory structure. The get_component, get_component_demo, and get_component_metadata are clearly differentiated by what they return (source, demo, metadata). No tools overlap in purpose.
All tool names follow a consistent verb_noun pattern with snake_case: apply_theme, get_block, get_component, get_component_demo, get_component_metadata, get_directory_structure, get_theme, list_blocks, list_components, list_themes. No deviations or mixed conventions.
10 tools is well-scoped for a shadcn/ui reference server. It covers listing and retrieving components, blocks, and themes, plus applying a theme and fetching directory structure. Neither too sparse nor too heavy.
The tool surface fully covers the intended domain: components (list, get source, get demo, get metadata), blocks (list, get), themes (list, apply), and repository structure. There are no obvious gaps for a reference and theme-application server.
Maintenance
Related MCP Connectors
An MCP server that gives your AI access to the source code and docs of all public github repos
Shared memory MCP server for Claude Code, Codex, Gemini CLI and Cursor. Cited, editable.
Related MCP Servers
- AlicenseAqualityDmaintenanceHelps AI assistants access shadcn/ui component documentation and examples through a TypeScript-based MCP server that provides reference information for component details, usage examples, and search capabilities.4739 npm60MIT
- AlicenseAqualityDmaintenanceProvides reference information for shadcn/ui components through a Model Context Protocol server that helps AI assistants access component documentation and examples.4MIT
- AlicenseNot gradedqualityDmaintenanceA comprehensive template for building MCP servers that expose UI component registries and design systems to AI assistants. It enables users to browse, fetch, and retrieve implementation details from registries following the shadcn/ui format.2MIT
- AlicenseNot gradedqualityDmaintenanceThis MCP server provides tools to install and manage shadcn/ui components directly from AI coding agents.2MIT