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
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.
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.
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
{
"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.
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