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.
{
"registries": {
"@dga": "https://dga.omqkhafi.dev/r/{name}.json"
}
}Set up the server
The CLI writes the configuration for your client.
npx shadcn@latest mcp init --client claudeConfigure by hand
Or add the server to the file your client reads. The command is npx with the arguments shadcn@latest and mcp.
{
"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."
Related
- Set up your agent: the rules the assistant follows once it can install components.
- Docs for agents: the Markdown and JSON the assistant can read.