Skip to content

MCP server

Use the official shadcn MCP server with the @dga registry to browse, search and install components from an assistant.

Version 0.4.1 ·

Platform Code is a shadcn registry, so the official shadcn MCP server works with it as is. There is no custom server: the assistant asks the shadcn server, and the server reads @dga.

Register the registry

Add @dga to components.json. npx shadcn@latest init https://dga.omqkhafi.dev/r/dga.json already does this.

components.json
json
{
  "registries": {
    "@dga": "https://dga.omqkhafi.dev/r/{name}.json"
  }
}

Set up the server

The CLI writes the configuration for your client.

Terminal
bash
npx shadcn@latest mcp init --client claude

Configure by hand

Or add the server to the file your client reads. The command is npx with the arguments shadcn@latest and mcp.

.mcp.json
json
{
  "mcpServers": {
    "shadcn": {
      "command": "npx",
      "args": ["shadcn@latest", "mcp"]
    }
  }
}

Restart the client after you save the file.

Example prompts

  • "List the components in the @dga registry."
  • "Add @dga/button and @dga/field to this project."
  • "Build a citizen service request form with @dga components, in Arabic and English."