Make your AI a shadcn expert

MCP Tools Reference

The 15 tools the shadcn.io MCP server exposes — discovery, retrieval, icons, installs, utilities. One page per tool with prompts, responses, and curl examples.

The shadcn.io MCP server ships 15 tools, auto-discovered by every MCP client on tools/list. Each tool has a dedicated page below with its signature, response shape, example prompts, and manual invocation.

Typical agent flow

                      ┌─ search_items(q, type) ──┐
list_popular(type) ───┤                          ├─▶ get_item ──▶ get_item_details  (curated FAQ + related + opening)
                      │                          │           ╲
list_block_categories │                          │            ╲▶ get_item_source    (full TSX)
   └─ list_blocks_in_category ─▶ slug ───────────┤

                                                 └─▶ get_install_command ─▶ `shadcn add` runs with your token embedded
                                                 └─▶ get_preview_url     ─▶ live iframe + docs page URLs

search_icons ─▶ get_icon

Agents browse cheaply with get_item (lite), escalate to get_item_details (curated JSDoc) or get_item_source (full code) only for the winner. get_install_command is the final handoff — a shadcn add URL with your token baked in, zero extra setup.

Discovery — find the right item

Start here when the user has keywords but no slug.

Retrieval — inspect, preview, install

Once you have a slug, these five tools turn it into metadata, source, preview URLs, or a ready-to-run install command.

Icons — 285,000 across 222 libraries

A separate DB with its own fuzzy search. Cross-library by default, typo-tolerant.

Utilities and introspection

Browser tools, caller identity, and registry stats.

Manual invocation basics

Every tool can be driven by hand via JSON-RPC. The envelope is always the same:

curl -s -X POST "https://www.shadcn.io/api/mcp?token=YOUR_TOKEN" \
-H "content-type: application/json" \
-d '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "tools/call",
  "params": {
    "name": "<tool-name>",
    "arguments": { }
  }
}'
  • tools/list with no arguments returns the full schema for all 15 tools — use this to introspect from a new client.
  • The Authorization: Bearer YOUR_TOKEN header works as a fallback to the query-param token.

FAQ

Was this page helpful?

Sign in to leave feedback.