Data as of

Shadcn UI v4 MCP Server for Cursor: Setup & Config

Cursor: This MCP server gives coding assistants shadcn-related implementation material, from individual components to larger UI blocks.

What you can do with Shadcn UI v4 in Cursor

Match retrieved UI implementations to the framework and React primitives your project actually uses.

  • Choose code for the project's framework and, for React, its primitive library.
  • Inspect a TweakCN preset before asking the supplied theme operation to apply it.

Before you start: Shadcn UI v4 in Cursor

  • Node.js version 18 or above in the source-build prerequisites
  • npm tooling for npx; npm or pnpm for source builds
  • Client with MCP support

The basic npx command appears directly in the README. The GitHub environment entry is optional and documented separately. Initial defaults are React with Radix and stdio. Use --framework for another implementation; React can select Base UI with --ui-library base. Network examples use SSE or dual mode.

Shadcn UI v4 Cursor configuration

  1. Choose Cursor configuration scope

    For Shadcn UI v4 MCP Server, open Project: .cursor/mcp.json User: ~/.cursor/mcp.json. Merge into mcpServers at project or user scope.

  2. Add Shadcn UI v4 MCP Server to Cursor

    Use the shadcn-ui-mcp-unofficial entry below in mcpServers. Keep Shadcn UI v4 MCP Server's documented stdio connection fields and your other Cursor entries.

  3. Check Shadcn UI v4 MCP Server in Cursor

    Shadcn UI v4 MCP Server: Enable in Cursor’s MCP settings; inspect tools.

Config file · Project: .cursor/mcp.json

User: ~/.cursor/mcp.json

JSON
{
  "mcpServers": {
    "shadcn-ui-mcp-unofficial": {
      "command": "npx",
      "args": [
        "@jpisnice/shadcn-ui-mcp-server"
      ],
      "env": {
        "GITHUB_PERSONAL_ACCESS_TOKEN": "<optional GitHub credential for a higher request allowance>"
      }
    }
  }
}

Shadcn UI v4 tools available to Cursor

Shadcn UI v4's stored tool list documents 10 tools; compare it with Cursor's connected tool list, because the stored list is not a live check.

list_blocks

Find list_blocks under Shadcn UI v4 in Cursor's MCP settings; inspect its arguments when the agent requests a call.

get_block

Find get_block under Shadcn UI v4 in Cursor's MCP settings; inspect its arguments when the agent requests a call.

list_components

Find list_components under Shadcn UI v4 in Cursor's MCP settings; inspect its arguments when the agent requests a call.

get_component_metadata

Find get_component_metadata under Shadcn UI v4 in Cursor's MCP settings; inspect its arguments when the agent requests a call.

get_component_demo

Find get_component_demo under Shadcn UI v4 in Cursor's MCP settings; inspect its arguments when the agent requests a call.

get_component

Find get_component under Shadcn UI v4 in Cursor's MCP settings; inspect its arguments when the agent requests a call.

Fetch the selected component's implementation source.

get_directory_structure

Find get_directory_structure under Shadcn UI v4 in Cursor's MCP settings; inspect its arguments when the agent requests a call.

Inspect how directories are arranged in the source repository.

list_themes

Find list_themes under Shadcn UI v4 in Cursor's MCP settings; inspect its arguments when the agent requests a call.

Browse the available TweakCN preset choices.

get_theme

Find get_theme under Shadcn UI v4 in Cursor's MCP settings; inspect its arguments when the agent requests a call.

Inspect the details behind one TweakCN preset.

apply_theme

Find apply_theme under Shadcn UI v4 in Cursor's MCP settings; inspect its arguments when the agent requests a call.

Use a chosen TweakCN preset to update the project's theme.

Shadcn UI v4: full stored tool descriptions

Troubleshooting Shadcn UI v4 in Cursor

  • Cursor must find npx @jpisnice/shadcn-ui-mcp-server (Node.js/npm) for Shadcn UI v4 MCP Server. Enable the project/user entry in MCP settings and inspect its tools.
  • Review GITHUB_PERSONAL_ACCESS_TOKEN for Shadcn UI v4 MCP Server before sharing project .cursor/mcp.json; project scope travels with the repository.
  • Shadcn UI v4 MCP Server uses stdio here: Cursor must keep the configured process running; protocol output belongs on stdout and diagnostics on stderr.
  • Known limitation: Omitting a GitHub token leaves the lower documented request allowance.
  • Known limitation: Base UI is not an alternative for the non-React framework modes.
  • General Cursor troubleshooting lives in the /clients/cursor guide.

Shadcn UI v4 MCP Server — details. Cursor guide

Frequently asked questions

Cursor's Shadcn UI v4 MCP Server entry belongs under mcpServers in .cursor/mcp.json (project) or ~/.cursor/mcp.json (user). Confirm the active scope in MCP settings.

Cursor's shadcn-ui-mcp-unofficial example uses stdio.

Shadcn UI v4 MCP Server's Cursor configuration invokes npx @jpisnice/shadcn-ui-mcp-server (Node.js/npm).

Cursor's Shadcn UI v4 MCP Server example references GITHUB_PERSONAL_ACCESS_TOKEN. Check these names if startup or authentication fails; the example alone does not distinguish required from optional values.

Shadcn UI v4 MCP Server's stored list contains 10 tools, including list_blocks, get_block, list_components. Compare those names with Cursor's connected tool list; the stored list is not a live check.

The stated hourly request allowance rises from 60 without a token to 5,000 with one. The token is recommended rather than mandatory.

The SSE deployment is documented for concurrent clients. The project also supports dual transport, while the default local CLI connection uses stdio.