Make your AI a shadcn expert

Shadcn MCP for Cursor

Connect Cursor into the shadcn.io registry with one MCP URL — access every block, icon, and example in the catalog.

One MCP URL gives Cursor live tools to search, preview, and install every block, component, and icon on shadcn.io — no hallucinated props, no broken installs.

Install

Open Settings → Cursor Settings → MCP → Add new global MCP server, or paste the config into ~/.cursor/mcp.json directly:

Paste it in once you're signed in with an active Pro subscription — the config carries your personal token, so treat the full URL like an API key. Pro starts at $19/mo and includes MCP access across every editor plus 6,000+ production-ready blocks. Not Pro yet? See what you unlock →

Since Cursor 1.0, clicking Add new global MCP server and pasting the JSON above also works as a one-click install — Cursor writes the file for you.

Pick the right scope

FileWhereShared with team
~/.cursor/mcp.jsonGlobal — every projectNo — your machine only
.cursor/mcp.jsonAt repo rootYes — commit it

For teams, commit .cursor/mcp.json with a ${SHADCNIO_TOKEN} placeholder so nobody commits their token:

{
"mcpServers": {
  "shadcnio": {
    "url": "https://www.shadcn.io/api/mcp?token=${SHADCNIO_TOKEN}"
  }
}
}

Each teammate exports SHADCNIO_TOKEN in their shell (or a git-ignored .env). A Team or Organization plan gives every workspace member their own Pro entitlement.

Install your first block

use shadcnio to install hero-announcement into my project

What Cursor actually does, in order:

  1. search_items({ query: "hero-announcement" }) to confirm the slug resolves.
  2. get_item({ name: "hero-announcement" }) for a cheap metadata peek.
  3. get_install_command({ name: "hero-announcement" }) — returns a shadcn add https://www.shadcn.io/r/hero-announcement.json?token=… URL with your token already in the query string.
  4. Runs it. Files land under components/ui/.

Name the server explicitly (use shadcnio…) when multiple MCPs are active. Without it, Cursor picks one at random or skips tools entirely.

The example above uses hero-announcement, a Pro block — the install runs once you're signed in with an active subscription.

Manage the connection

Cursor manages MCP servers in Settings → Cursor Settings → MCP. You'll see shadcnio listed with a live status dot — green when connected, red when failing. From that panel you can toggle the server off, edit its config, or restart it if it stops responding.

If your Pro subscription lapses, the next tool call returns 403 and Cursor marks shadcnio as failed. Resubscribing restores access on the following request — no reconfigure, no reinstall. The token itself stays valid across subscription gaps.

FAQ

Was this page helpful?

Sign in to leave feedback.