apps/v4/content/docs/changelog/2025-08-cli-3-mcp.mdx
We just shipped shadcn CLI 3.0 with support for namespaced registries, advanced authentication, new commands and a completely rewritten registry engine.
@registry/name format.The biggest change in 3.0 is namespaced registries. You can now install components from registries: a community registry, your company's private registry or internal registry, using the @registry/name format.
This makes it easier to distribute code across teams and projects.
Configure registries in your components.json:
{
"registries": {
"@acme": "https://acme.com/r/{name}.json",
"@internal": {
"url": "https://registry.company.com/{name}",
"headers": {
"Authorization": "Bearer ${REGISTRY_TOKEN}"
}
}
}
}
Then use the @registry/name format to install components:
npx shadcn add @acme/button @internal/auth-system
It's completely decentralized. There's no central registrar. Create any namespace you want and organize components however makes sense for your team.
{
"registries": {
"@design": "https://registry.company.com/create/{name}.json",
"@engineering": "https://registry.company.com/eng/{name}.json",
"@marketing": "https://registry.company.com/marketing/{name}.json"
}
}
Components can even depend on resources from different registries. Everything gets resolved and installed automatically from the right sources.
{
"name": "dashboard",
"type": "registry:block",
"registryDependencies": [
"@shadcn/card", // From default registry
"@v0/chart", // From v0 registry
"@acme/data-table", // From acme registry
"@lib/data-fetcher", // Utility library
"@ai/analytics-prompt" // AI prompt resource
]
}
Need to keep your components private? We've got you covered. Configure authentication with tokens, API keys, or custom headers:
{
"registries": {
"@private": {
"url": "https://registry.company.com/{name}.json",
"headers": {
"Authorization": "Bearer ${REGISTRY_TOKEN}"
}
}
}
}
Your private components stay private. Perfect for enterprise teams with proprietary UI libraries.
We support all major authentication methods: basic auth, bearer token, API key query params and custom headers.
See the authentication docs for more details.
Three new commands make it easy to find exactly what you need:
npx shadcn view @acme/auth-system
npx shadcn search @tweakcn -q "dark"
npx shadcn list @acme
Preview components before installing them. Search across multiple registries. See the code and all dependencies upfront.
<Image src="/images/mcp.jpeg" width="1432" height="1050" alt="MCP Server" className="mt-6 w-full overflow-hidden rounded-lg border" />
Back in April, we introduced the first version of the MCP server. Since then, we've taken everything we learned and built a better MCP server.
Here's what's new:
Add the MCP server to your project:
npx shadcn@latest mcp init
See the docs for more details.
We completely rewrote the registry resolution engine from scratch. It's faster, smarter, and handles even the trickiest dependency trees.
build command for registry authorsRegistry developers can now provide custom error messages to help guide users (and LLMs) when things go wrong. The CLI displays helpful, actionable errors for common issues:
Unknown registry "@acme". Make sure it is defined in components.json as follows:
{
"registries": {
"@acme": "[URL_TO_REGISTRY]"
}
}
Missing environment variables? The CLI tells you exactly what's needed:
Registry "@private" requires the following environment variables:
• REGISTRY_TOKEN
Set the required environment variables in your .env or .env.local file.
Registry authors can provide custom error messages in their responses to help users and AI agents understand and fix issues quickly.
Error:
You are not authorized to access the item at http://example.com/r/component.
Message:
[Unauthorized] Your API key has expired. Renew it at https://example.com/api/renew-key.
Here's the best part: there are no breaking changes for users. Your existing components.json works exactly the same. All your installed components work exactly the same.
For developers, if you're using the programmatic APIs directly, we've deprecated a few functions in favor of better ones:
fetchRegistry → getRegistryresolveRegistryTree → resolveRegistryItemsshadcn/registry to shadcn/schema package- import { registryItemSchema } from "shadcn/registry"
+ import { registryItemSchema } from "shadcn/schema"
That's it. Seriously. Everything else just works.