dr-ui

MCP Server

shadcn provides its own MCP server that can be used to work with the registry. This enables browsing, installing, and using components through natural language interactions.

The instructions below explain how to set up the MCP server for VS Code and GitHub Copilot. Refer to the link to learn how to set up and use the MCP server with your IDE and AI assistant.

Prerequisites

  • Ensure the latest version of VS Code is installed
  • The GitHub Copilot extension is installed and enabled
  • Copilot Agent Mode is enabled

Setup Instructions

  1. Run the following command to configure the MCP server for your project:
pnpm dlx shadcn@latest mcp init --client vscode
  1. Start the MCP server by clicking the Start button above the shadcn property in mcp.json.

  2. Open the Copilot chat and start working 🎉

Be sure to specify the registry name in your prompts, as the agent can browse all available registries.

On this page