MCP
Connect the shadcn MCP server to the Silkware registry so a coding agent can browse, search and install components.
The shadcn MCP server works with any shadcn-compatible registry, so it needs nothing special from Silkware beyond the registry itself. Once it is connected, an agent in your editor can list the items in @silkware, search them, read their source and dependencies, and add them to your project through the CLI.
The server keeps shadcn's name, in .mcp.json and in /mcp, because it is shadcn's tool. What it serves in your project is Silkware. The CLI behind it can also install from shadcn's own registry; the agent rules say when that is allowed.
What the server needs
- The
@silkwarenamespace in yourcomponents.json. See Registry. - A registry index at
/r/registry.json.pnpm registry:buildwrites it together with every item.
Connect
Register the namespace
pnpm dlx shadcn@latest registry add "@silkware=http://localhost:3000/r/{name}.json"Add the server to your client
For Claude Code, the command writes
.mcp.jsonin the project:pnpm dlx shadcn@latest mcp init --client claudeThe file it writes:
{ "mcpServers": { "shadcn": { "command": "npx", "args": ["shadcn@latest", "mcp"] } }}Other clients use
--client cursor,--client vscodeor--client opencode. For Codex, add the same command to~/.codex/config.toml:[mcp_servers.shadcn]command = "npx"args = ["shadcn@latest", "mcp"]Restart the client
Restart Claude Code, then run
/mcpto confirm that theshadcnserver is connected. The same command helps when something fails.
What an agent can do
- List the items in the registry: "Show me the components in the silkware registry".
- Search by name or description: "Find a component for a conversation thread".
- Read an item before installing it: its files, its npm dependencies and the other items it needs.
- Install items, with their dependencies, into your project.
- Build a page from several items: "Create a settings page using items from the silkware registry".
The same lookups work from the command line, which is a quick way to check the registry without an agent:
pnpm dlx shadcn@latest search @silkware --query sidebarpnpm dlx shadcn@latest view @silkware/buttonThe agent installs what the registry lists. It does not know how Silkware expects components to be used. Give it the agent rules too: see Agents.