Overview
What is shadcn-ui MCP Server?
It is a TypeScript-based MCP (Model Context Protocol) server that provides reference information for shadcn/ui components. It helps AI assistants access component documentation, installation instructions, usage examples, props, variants, and code samples by scraping the official shadcn/ui documentation site and GitHub repository.
How to use shadcn-ui MCP Server?
Install dependencies with npm install, build the server with npm run build, then configure it in your MCP client (Claude Desktop, Windsurf, or Cursor) using either the built index.js path or the npx command npx -y shadcn-ui-mcp-server. For development, use npm run watch for auto-rebuild.
Key features of shadcn-ui MCP Server
- Provides four tools:
list_shadcn_components,get_component_details,get_component_examples, andsearch_components - Scrapes and caches data from the official shadcn/ui website and GitHub repository
- Returns structured component descriptions, installation instructions, and usage examples
- Supports searching components by keyword
- Written in TypeScript for type safety
Use cases of shadcn-ui MCP Server
- An AI assistant retrieving detailed info about a specific shadcn/ui component
- A developer searching for components that match a keyword in their IDE
- Automated generation of component examples for documentation or tutorials
- Integrating shadcn/ui component references into a larger MCP‑enabled toolchain
FAQ from shadcn-ui MCP Server
What tools does the shadcn-ui MCP Server provide?
It provides four tools: list_shadcn_components, get_component_details, get_component_examples, and search_components.
How do I install and configure the shadcn-ui MCP Server?
Install dependencies with npm install, build with npm run build, then add the server configuration to Claude Desktop, Windsurf, or Cursor using either the local build path or the npx command npx -y shadcn-ui-mcp-server.
What data sources does it use?
It scrapes and caches information from the official shadcn/ui documentation site (https://ui.shadcn.com) and the shadcn/ui GitHub repository.
How can I debug the shadcn-ui MCP Server?
The recommended method is the MCP Inspector, which can be started via npm run inspector. It provides a URL to access debugging tools in your browser.
Is there a development mode with auto-rebuild?
Yes, run npm run watch to automatically rebuild the server when source files change.