Skip to content

Instantly share code, notes, and snippets.

@possibilities
Created February 5, 2026 07:09
Show Gist options
  • Select an option

  • Save possibilities/ed5c0daadec9758defafc541c546a0ac to your computer and use it in GitHub Desktop.

Select an option

Save possibilities/ed5c0daadec9758defafc541c546a0ac to your computer and use it in GitHub Desktop.
shadcn MCP Server - Tool Metadata Reference

shadcn MCP Server Metadata

Source: https://github.com/shadcn-ui/ui (packages/shadcn/src/mcp/index.ts)

Server Info

Property Value
Name shadcn
Version 1.0.0
Transport stdio only
Command npx shadcn@latest mcp

Tools

Tool Name Description
get_project_registries Get configured registry names from components.json - Returns error if no components.json exists (use init_project to create one)
list_items_in_registries List items from registries (requires components.json - use init_project if missing)
search_items_in_registries Search for components in registries using fuzzy matching (requires components.json). After finding an item, use get_item_examples_from_registries to see usage examples.
view_items_in_registries View detailed information about specific registry items including the name, description, type and files content. For usage examples, use get_item_examples_from_registries instead.
get_item_examples_from_registries Find usage examples and demos with their complete code. Search for patterns like 'accordion-demo', 'button example', 'card-demo', etc. Returns full implementation code with dependencies.
get_add_command_for_items Get the shadcn CLI add command for specific items in a registry. This is useful for adding one or more components to your project.
get_audit_checklist After creating new components or generating new code files, use this tool for a quick checklist to verify that everything is working as expected.

Tool Input Schemas

get_project_registries

No arguments required.

{
  "type": "object",
  "properties": {}
}

list_items_in_registries

Argument Type Required Description
registries string[] Yes Array of registry names to search (e.g., ['@shadcn', '@acme'])
limit number No Maximum number of items to return
offset number No Number of items to skip for pagination
{
  "type": "object",
  "properties": {
    "registries": {
      "type": "array",
      "items": { "type": "string" },
      "description": "Array of registry names to search (e.g., ['@shadcn', '@acme'])"
    },
    "limit": {
      "type": "number",
      "description": "Maximum number of items to return"
    },
    "offset": {
      "type": "number",
      "description": "Number of items to skip for pagination"
    }
  },
  "required": ["registries"]
}

search_items_in_registries

Argument Type Required Description
registries string[] Yes Array of registry names to search (e.g., ['@shadcn', '@acme'])
query string Yes Search query string for fuzzy matching against item names and descriptions
limit number No Maximum number of items to return
offset number No Number of items to skip for pagination
{
  "type": "object",
  "properties": {
    "registries": {
      "type": "array",
      "items": { "type": "string" },
      "description": "Array of registry names to search (e.g., ['@shadcn', '@acme'])"
    },
    "query": {
      "type": "string",
      "description": "Search query string for fuzzy matching against item names and descriptions"
    },
    "limit": {
      "type": "number",
      "description": "Maximum number of items to return"
    },
    "offset": {
      "type": "number",
      "description": "Number of items to skip for pagination"
    }
  },
  "required": ["registries", "query"]
}

view_items_in_registries

Argument Type Required Description
items string[] Yes Array of item names with registry prefix (e.g., ['@shadcn/button', '@shadcn/card'])
{
  "type": "object",
  "properties": {
    "items": {
      "type": "array",
      "items": { "type": "string" },
      "description": "Array of item names with registry prefix (e.g., ['@shadcn/button', '@shadcn/card'])"
    }
  },
  "required": ["items"]
}

get_item_examples_from_registries

Argument Type Required Description
registries string[] Yes Array of registry names to search (e.g., ['@shadcn', '@acme'])
query string Yes Search query for examples (e.g., 'accordion-demo', 'button demo', 'card example')
{
  "type": "object",
  "properties": {
    "registries": {
      "type": "array",
      "items": { "type": "string" },
      "description": "Array of registry names to search (e.g., ['@shadcn', '@acme'])"
    },
    "query": {
      "type": "string",
      "description": "Search query for examples (e.g., 'accordion-demo', 'button demo', 'card example', 'tooltip-demo', 'example-booking-form', 'example-hero'). Common patterns: '{item-name}-demo', '{item-name} example', 'example {item-name}'"
    }
  },
  "required": ["registries", "query"]
}

get_add_command_for_items

Argument Type Required Description
items string[] Yes Array of items to get the add command for prefixed with the registry name (e.g., ['@shadcn/button', '@shadcn/card'])
{
  "type": "object",
  "properties": {
    "items": {
      "type": "array",
      "items": { "type": "string" },
      "description": "Array of items to get the add command for prefixed with the registry name (e.g., ['@shadcn/button', '@shadcn/card'])"
    }
  },
  "required": ["items"]
}

get_audit_checklist

No arguments required.

{
  "type": "object",
  "properties": {}
}

Supported MCP Clients

Client Config Path Config Format
Claude Code .mcp.json { "mcpServers": { "shadcn": { "command": "npx", "args": ["shadcn@latest", "mcp"] } } }
Cursor .cursor/mcp.json { "mcpServers": { "shadcn": { "command": "npx", "args": ["shadcn@latest", "mcp"] } } }
VS Code .vscode/mcp.json { "servers": { "shadcn": { "command": "npx", "args": ["shadcn@latest", "mcp"] } } }
Codex .codex/config.toml [mcp_servers.shadcn] with command = "npx", args = ["shadcn@latest", "mcp"]
OpenCode opencode.json { "mcp": { "shadcn": { "type": "local", "command": ["npx", "shadcn@latest", "mcp"], "enabled": true } } }
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment