Shadcn UI v4 MCP Server
以下摘录自该仓库的 README(片段) · 在 GitHub 读完整 README →
> **🚀 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 /mcp endpoint for multi-client deployments (MCP spec 2026-07-28)
- **🐳 Docker Ready** - Production-ready containerization with Docker Compose
🚀 Quick Start
**🎯 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:
1. Download shadcn-ui-mcp-server.mcpb from Releases
2. Double-click the file - Claude Desktop opens automatically
3. Enter your GitHub token (optional, for higher rate limits)
4. 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
Transport Modes
- **stdio** (default) - Standard input/output for CLI usage
- **http** - Streamable HTTP at /mcp
- **dual** - Both stdio and HTTP simultaneously
> The legacy SSE transport (/sse + /message) was removed. --mode sse is still accepted as a deprecated alias for http.
Docker Examples
Environment 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) or modern (2026-07-28 only). CLI: --protocol
- GITHUB_PERSONAL_ACCESS_TOKEN - GitHub API token
- UI_LIBRARY - UI primitive library: radix (default) or base (React only)
📚 Documentation
| Section | Description |
|---------|-------------|
| 🚀 Getting Started | Installation, setup, and first steps |
| ⚙️ Configuration | Framework selection, tokens, and options |
| 🔌 Integration | Editor and tool integrations |