shadcn MCP Server for Claude Code and Cursor

shadcn/ui ships an official MCP server inside its CLI. Run npx shadcn@latest mcp init --client claude for Claude Code or --client cursor for Cursor, and your agent can browse, search, and install components from the registries in your components.json.

Set it up

The server runs locally through the CLI (npx shadcn@latest mcp), so there is no URL or API key. Restart your editor after running the command.

EditorCommandWrites
Claude Codenpx shadcn@latest mcp init --client claude.mcp.json
Cursornpx shadcn@latest mcp init --client cursor.cursor/mcp.json
VS Codenpx shadcn@latest mcp init --client vscode.vscode/mcp.json

Give it more components to work with

The shadcn MCP server searches whatever registries your project has configured. Add Watermelon to components.json so your agent can find its blocks, dashboards, and animated components too:

"registries": { "@watermelon": "https://registry.watermelon.sh/r/{name}.json" }

Then ask your agent for something like "add a pricing section from @watermelon". More on this in the shadcn registry guide.

shadcn MCP vs Watermelon MCP

They work well together: use Watermelon MCP to find the right block, and the shadcn MCP server or CLI to install it.

shadcn MCPWatermelon MCP
RunsLocally, through the shadcn CLIHosted at https://mcp.watermelon.sh/mcp
CatalogRegistries in your components.jsonThe full Watermelon catalog, no setup
Good atInstalling from any registry you configureSearching and comparing options, composing multi-section pages
CostFreeFree, no API key

Add Watermelon MCP to Claude Code or Cursor

Full details are in the React component MCP server guide.

Frequently asked questions

Is the shadcn MCP server free?

Yes. It is part of the MIT licensed shadcn CLI and runs on your machine.

Does the shadcn MCP server work with third-party registries?

Yes. It reads the registries field in components.json, including private registries with auth headers.

Related

Open-source UI platform for developers

Watermelon UI is an open-source platform for browsing React components, animated interactions, dashboards, templates, and reusable page sections. The project is built for the community and helps developers move from inspiration to implementation faster by pairing visual previews with source-backed examples and documentation. The platform also includes full templates so people can see how individual blocks work together as realistic product pages instead of only as isolated snippets.

Important public pages include the main docs home, animated components, blocks, dashboards, templates, developer docs, about, contact, privacy, terms, copyright, llms.txt, and the sitemap. The repositories under WatermelonCorp are the source of truth for contributions, and the platform repository includes local MCP tooling for structured agent access to the catalog.