Shadcn UI v4 MCP Server

Fetches shadcn/ui component source, demos, blocks and themes for React, Svelte, Vue and React Native

By Janardhan Polle (individual) TypeScript Local · stdio Developer toolsDesign

82 popularity score ★ 3.1k ↓ 7.5k/wk

Connect your client

Local (npm)

Add in one click

Opens the app, which asks before it adds the server.

Or add it by command or config

Claude CodeTerminal
claude mcp add shadcn-ui-v4 -- npx @jpisnice/shadcn-ui-mcp-server
Claude Desktopclaude_desktop_config.json
{
  "mcpServers": {
    "shadcn-ui-v4": {
      "command": "npx",
      "args": [
        "@jpisnice/shadcn-ui-mcp-server"
      ]
    }
  }
}
Cursor~/.cursor/mcp.json
{
  "mcpServers": {
    "shadcn-ui-v4": {
      "command": "npx",
      "args": [
        "@jpisnice/shadcn-ui-mcp-server"
      ]
    }
  }
}
VS Code.vscode/mcp.json
{
  "servers": {
    "shadcn-ui-v4": {
      "type": "stdio",
      "command": "npx",
      "args": [
        "@jpisnice/shadcn-ui-mcp-server"
      ]
    }
  }
}
Codex~/.codex/config.toml
[mcp_servers.shadcn-ui-v4]
command = "npx"
args = ["@jpisnice/shadcn-ui-mcp-server"]
Gemini CLITerminal
gemini mcp add --scope user shadcn-ui-v4 npx -- @jpisnice/shadcn-ui-mcp-server
Local (from source)

Add in one click

Opens the app, which asks before it adds the server.

Or add it by command or config

FirstTerminal
git clone https://github.com/Jpisnice/shadcn-ui-mcp-server.git
cd shadcn-ui-mcp-server
npm install
npm run build
Claude CodeTerminal
claude mcp add shadcn-ui-v4 -- node build/index.js
Claude Desktopclaude_desktop_config.json
{
  "mcpServers": {
    "shadcn-ui-v4": {
      "command": "node",
      "args": [
        "build/index.js"
      ]
    }
  }
}
Cursor~/.cursor/mcp.json
{
  "mcpServers": {
    "shadcn-ui-v4": {
      "command": "node",
      "args": [
        "build/index.js"
      ]
    }
  }
}
VS Code.vscode/mcp.json
{
  "servers": {
    "shadcn-ui-v4": {
      "type": "stdio",
      "command": "node",
      "args": [
        "build/index.js"
      ]
    }
  }
}
Codex~/.codex/config.toml
[mcp_servers.shadcn-ui-v4]
command = "node"
args = ["build/index.js"]
Gemini CLITerminal
gemini mcp add --scope user shadcn-ui-v4 node -- build/index.js

Settings 7

GITHUB_PERSONAL_ACCESS_TOKEN Optional: GitHub token (no scopes needed) that raises the GitHub API limit from 60 to 5,000 requests an hour; can also be passed as --github-api-key.
UI_LIBRARY Optional: Primitive library for React: radix (default) or base.
MCP_TRANSPORT_MODE Optional: Transport: stdio (default), http or dual.
MCP_PORT Optional: Port for HTTP mode (default 7423).
MCP_HOST Optional: Address the HTTP server binds to (default 0.0.0.0).
MCP_CORS_ORIGINS Optional: Comma-separated CORS origins allowed in HTTP mode.
MCP_PROTOCOL Optional: Protocol versions accepted: any (default) or modern (2026-07-28 only).

What it does

This server gives a coding assistant direct access to the shadcn/ui v4 component library and its ports to other frameworks. It pulls component source code, example usage, dependency metadata and full blocks (multi-component layouts such as dashboards, calendars and forms) from the libraries' GitHub repositories, so the assistant writes UI code against the current components instead of guessing from memory.

One framework is served per running instance, picked with the --framework flag: React (shadcn/ui, the default), Svelte (shadcn-svelte), Vue (shadcn-vue) or React Native (react-native-reusables). For React you can also choose Radix UI (default) or Base UI as the primitive library with --ui-library or UI_LIBRARY.

Beyond lookups it carries three theme tools built on tweakcn presets: list the presets, inspect one, and apply one, which writes Tailwind/CSS theme code into your project (a dryRun option previews the change first, and a backup of the overwritten file may be made).

It runs over stdio by default, and can also serve stateless Streamable HTTP at a /mcp endpoint (or both at once) for shared or containerised setups; the repository includes Docker Compose files and a .mcpb bundle for one-click install in Claude Desktop. The old SSE transport has been removed; --mode sse is kept only as a deprecated alias for http.

What it needs

RuntimeNode.js 20+

Node.js 20 or later (run through npx or bunx, or built from source with npm or pnpm). Network access to GitHub. A GitHub personal access token is optional but recommended: without one the server is held to GitHub's 60 requests an hour, with one it gets 5,000; the token needs no scopes. Docker is needed only for the container route, which builds its image locally.

Limits

Without a GitHub token it is limited to about 60 GitHub API requests an hour, which a few component lookups can use up. Each instance serves one framework at a time; switching means restarting with a different --framework value. The Base UI option applies to React only. Content comes from the upstream community repositories, so what is available for Svelte, Vue and React Native depends on those projects. The SSE transport is gone; clients must use stdio or Streamable HTTP.

Who it suits

Suits developers building with shadcn/ui or one of its Svelte, Vue or React Native ports who want an assistant to work from the real component code and examples. It runs on your own machine, needs no account, and apart from apply_theme only reads public GitHub content. It is a community project, not published by shadcn; anyone wanting the library makers' own tooling should look at what shadcn/ui ships itself. Teams wanting one shared instance can use the HTTP mode with Docker. Skip it if you do not use shadcn-style components.

Tools 10

get_component
Returns the source code of one component for the selected framework
get_component_demo
Returns example code showing how a component is used
list_components
Lists every component available for the selected framework
get_component_metadata
Gives a component's dependencies, description and configuration details
get_block
Returns the full code of a block such as a dashboard, calendar or form layout
list_blocks
Lists available blocks grouped by category
get_directory_structure
Browses the folder layout of the upstream component repository
list_themes
Lists the tweakcn theme presets
get_theme
Shows the details of one tweakcn theme preset
apply_theme
Writes a tweakcn theme preset's CSS into the project, with a dryRun preview option

Similar servers