Skip to main content
Glama
Shadcn UI MCP Server

Shadcn UI MCP Server

by heilgar

Shadcn UI MCP Server

A powerful and flexible MCP (Model Control Protocol) server designed to enhance the development experience with Shadcn UI components. This server provides a robust foundation for building and managing UI components with advanced tooling and functionality.

Features

Tools

The MCP server provides a set of tools that can be used through the Model Control Protocol:

  • list-components: Get the list of available shadcn/ui components

  • get-component-docs: Get documentation for a specific component

  • install-component: Install a shadcn/ui component

  • list-blocks: Get the list of available shadcn/ui blocks

  • get-block-docs: Get documentation for a specific block

  • install-blocks: Install a shadcn/ui block

Functionality

  • Component Management

    • List available shadcn/ui components

    • Get detailed documentation for specific components

    • Install components with support for multiple package managers (npm, pnpm, yarn, bun)

  • Block Management

    • List available shadcn/ui blocks

    • Get documentation and code for specific blocks

    • Install blocks with support for multiple package managers

  • Package Manager Support

    • Flexible runtime support for npm, pnpm, yarn, and bun

    • Automatic detection of user's preferred package manager

Related MCP server: aceternityui-mcp

Installation

Prerequisites

  • Node.js (v18 or higher)

  • npm or yarn package manager

Claude Desktop Configuration

To use with Claude Desktop, add the server config:

On MacOS: ~/Library/Application Support/Claude/claude_desktop_config.json On Windows: %APPDATA%/Claude/claude_desktop_config.json

{
  "mcpServers": {
    "shadcn-ui-server": {
      "command": "npx",
      "args": ["@heilgar/shadcn-ui-mcp-server"]
    }
  }
}

Windsurf Configuration

Add this to your ./codeium/windsurf/model_config.json:

{
  "mcpServers": {
    "shadcn-ui-server": {
      "command": "npx",
      "args": ["@heilgar/shadcn-ui-mcp-server"]
    }
  }
}

Cursor Configuration

Add this to your .cursor/mcp.json:

{
  "mcpServers": {
    "shadcn-ui-server": {
      "command": "npx",
      "args": ["@heilgar/shadcn-ui-mcp-server"]
    }
  }
}

Development and Debugging

Local Development

  1. Install dependencies:

npm install
  1. Build the server:

npm run build

Debugging

Since MCP servers communicate over stdio, debugging can be challenging. We recommend using the MCP Inspector for debugging:

npm run inspector

The Inspector will provide a URL to access debugging tools in your browser, allowing you to:

  • Monitor MCP communication

  • Inspect tool calls and responses

  • Debug server behavior

  • View real-time logs

This project is built using the following tools and libraries:

License

MIT License - feel free to use this project for your own purposes.

Contributing

Contributions are welcome! Please feel free to submit a Pull Request.

Available Tools

6 tools
get-block-docsD

Inputs: block (required).

get-component-docsD

Inputs: component (required).

install-blocksD

Inputs: block (required), runtime.

install-componentD

Inputs: component (required), runtime.

list-blocksD

Inputs: no named parameters.

list-componentsD

Inputs: no named parameters.

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections.

Loading tool schema changelog…

    TDQS

    C2.1/5.0

    Scored across 6 tools

    Disambiguation5/5

    Each tool has a clearly distinct purpose with no overlap: get-block-docs and get-component-docs retrieve documentation, install-blocks and install-component handle installation, and list-blocks and list-components provide listings. The block/component distinction and action types (get, install, list) create unambiguous boundaries.

    Naming Consistency5/5

    All tools follow a perfect verb-noun pattern with consistent kebab-case formatting: get-block-docs, get-component-docs, install-blocks, install-component, list-blocks, list-components. The naming is completely predictable and follows the same structural convention throughout.

    Tool Count4/5

    Six tools is reasonable for a Shadcn UI server, covering documentation retrieval, installation, and listing for both blocks and components. While slightly minimal, it provides core functionality without being overwhelming. A few additional tools like update or search might enhance it but aren't essential.

    Completeness4/5

    The toolset covers the main workflows for Shadcn UI: discovering components/blocks (list), accessing documentation (get), and installation (install). Minor gaps exist, such as no update/uninstall tools or search functionality, but the core CRUD-like operations for this domain are well-represented.

    Related MCP Connectors

    Related MCP Servers