Feedback

shadcn/ui MCP Server

@jpisnice Claim

Basic information

Runtime
TypeScript
Version
1.0.0
Category
License
MIT
Transports
stdio, streamable-http
Author
jpisnice
Submitted by
Community
Quality
50
Stars
2.8K

About shadcn/ui MCP Server

Access shadcn/ui v4 components, blocks, and demos for rapid React UI library development. Seamless integration and source code via GitHub API.

shadcn/ui is a MCP server in the Developer Tools category listed in the AddMCP.net directory, published by jpisnice. It exposes 7 tools, including get_component, get_component_demo, list_components, get_component_metadata and more. Supported transport: stdio, streamable-http. Runtime: TypeScript. License: MIT. The repository has 2,832 GitHub stars. Source code is hosted on github.com. Related topics: ai, community, design, developer-tools, expo.

Setup

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

shadcn/ui MCP Server config

Add this server to your MCP-compatible client using the configuration below.

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

shadcn/ui MCP Server tools

  • get_component — Get the source code for a specific shadcn/ui v4 component
  • get_component_demo — Get demo code illustrating how a shadcn/ui v4 component should be used
  • list_components — Get all available shadcn/ui v4 components
  • get_component_metadata — Get metadata for a specific shadcn/ui v4 component
  • get_directory_structure — Get the directory structure of the shadcn-ui v4 repository
  • get_block — Get source code for a specific shadcn/ui v4 block (e.g., calendar-01, dashboard-01)
  • list_blocks — Get all available shadcn/ui v4 blocks with categorization

Overview

What is shadcn/ui?

shadcn/ui MCP Server is a community shadcn MCP server that gives AI assistants the source code, demos, blocks and metadata of shadcn/ui v4 components, plus the Svelte, Vue and React Native ports. It is an unofficial open-source project by Janardhan Polle (Jpisnice), MIT licensed.

The server reads component code from the upstream GitHub repositories, so your assistant writes UI against the real, current shadcn ui MCP sources instead of guessing from training data. It runs locally over stdio by default and can also serve Streamable HTTP for multi-client setups.

How to use shadcn/ui?

You need Node.js 20 or newer. A GitHub personal access token is optional but recommended: without it the server is limited to 60 GitHub API requests per hour, with it 5,000. The token needs no scopes; create one at https://github.com/settings/tokens and pass it with --github-api-key or the GITHUB_PERSONAL_ACCESS_TOKEN environment variable.

Run it directly with npx:

npx @jpisnice/shadcn-ui-mcp-server --github-api-key ghp_your_token_here

# Other 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

# Base UI instead of Radix (React only)
npx @jpisnice/shadcn-ui-mcp-server --ui-library base

Claude Code

claude mcp add shadcn -- bunx -y @jpisnice/shadcn-ui-mcp-server --github-api-key YOUR_TOKEN

For a server running in HTTP mode:

node build/index.js --mode http --port 7423
claude mcp add --scope user --transport http shadcn-mcp-server http://localhost:7423/mcp

Claude Desktop

Download shadcn-ui-mcp-server.mcpb from the project's GitHub Releases and double-click it, or add this to claude_desktop_config.json:

{
  "mcpServers": {
    "shadcn-ui": {
      "command": "npx",
      "args": ["@jpisnice/shadcn-ui-mcp-server"],
      "env": {
        "GITHUB_PERSONAL_ACCESS_TOKEN": "ghp_your_token_here"
      }
    }
  }
}

Cursor

Open Cursor Settings, search for MCP, and add:

{
  "mcpServers": {
    "shadcn-ui": {
      "command": "npx",
      "args": [
        "@jpisnice/shadcn-ui-mcp-server",
        "--github-api-key",
        "ghp_your_token_here"
      ]
    }
  }
}

VS Code

Run "MCP: Add Server...", choose "NPM Package" and enter @jpisnice/shadcn-ui-mcp-server. The resulting mcp.json entry looks like this (works with Copilot Chat):

{
  "servers": {
    "shadcn-ui-mcp-server": {
      "command": "npx",
      "args": ["@jpisnice/shadcn-ui-mcp-server", "--framework", "react", "--ui-library", "radix"],
      "env": { "GITHUB_PERSONAL_ACCESS_TOKEN": "${input:github_token}" },
      "type": "stdio"
    }
  },
  "inputs": [
    { "id": "github_token", "type": "promptString", "description": "GitHub Personal Access Token" }
  ]
}

Key features of shadcn/ui

  • Four frameworks: React (shadcn/ui v4, default), Svelte (shadcn-svelte), Vue (shadcn-vue) and React Native (react-native-reusables), selected with --framework.
  • Radix UI or Base UI primitives for React via --ui-library or UI_LIBRARY.
  • Component source code, demo code and metadata such as dependencies.
  • Full block implementations, for example dashboard-01 and calendar-01.
  • tweakcn theme presets that can be listed, inspected and applied.
  • Caching and rate-limit handling for GitHub API calls.
  • Transports: stdio (default), http (stateless Streamable HTTP at /mcp, default port 7423) and dual; Docker and Docker Compose files included.
  • One-click .mcpb install for Claude Desktop.

shadcn/ui tools

  • Component tools: list_components returns every available component, get_component returns a component's source, get_component_demo returns example usage, and get_component_metadata returns dependencies and descriptions.
  • Block tools: list_blocks lists blocks by category and get_block returns the full code of a block such as dashboard-01.
  • Repository tool: get_directory_structure browses the upstream repository tree.
  • Theme tools: list_themes and get_theme read tweakcn themes; apply_theme writes a theme preset's CSS into your project and supports a dryRun option.

Use cases of shadcn/ui

  • Building a feature with real components: "Get the card component with usage examples and build a pricing card."
  • Starting a page from a block: "Get the dashboard-01 block implementation and adapt it to my analytics data."
  • Component discovery: "List all available shadcn/ui components and suggest which to use for a settings page."
  • Cross-framework work: "Compare the button component between React and Svelte" or "Show me the Vue version of the card component."
  • Theming: preview a tweakcn preset with apply_theme in dry-run mode before writing CSS.
  • Team setups: run one HTTP instance in Docker and point several clients at /mcp.

Frequently asked questions

1 Is shadcn/ui MCP Server the official shadcn MCP?

No. It is a community project by Jpisnice. The official shadcn MCP server is part of the shadcn CLI and is documented at ui.shadcn.com/docs/mcp.

2 Is shadcn/ui MCP Server free?

Yes. It is open source under the MIT license and runs locally via npx. The only external service it uses is the GitHub API.

3 Do I need an API key?

No key is required. A GitHub personal access token with no scopes is recommended to raise the GitHub rate limit from 60 to 5,000 requests per hour.

4 Does it work with Claude Code, Cursor and VS Code?

Yes. The project documents setup for Claude Code, Claude Desktop, Cursor, VS Code (including Copilot Chat) and Continue.dev.

5 Which frameworks does it support?

React (default), Svelte, Vue and React Native. Switch with --framework. For React you can choose Radix UI (default) or Base UI with --ui-library.

6 Can I run it remotely or in Docker?

Yes. Start it with --mode http to serve Streamable HTTP at /mcp on port 7423, or use the included Docker Compose file and check http://localhost:7423/health.

7 Does it change files in my project?

Most tools only read from GitHub. apply_theme writes theme CSS into your project; use its dryRun option to preview first.

8 What is the npm package name?

@jpisnice/shadcn-ui-mcp-server. The GitHub repository is now named Jpisnice/shadcn-ui-mcp-server.

Videos

Tutorials, guides, and showcases related to shadcn/ui MCP Server. The player loads when you press play.

Videos belong to their creators. Relevance is approximate; check the channel and description before following setup steps.

Comments

No comments yet

Be the first to share feedback about this listing. Sign in to leave a comment.

Sign In

Feedback 💬