shadcn MCP: install UI components from Claude Code and Cursor The shadcn CLI now ships a built-in MCP server that lets AI editors such as Claude Code, Cursor, VS Code, Codex and OpenCode browse, search and install UI components from any registry listed in a project's components.json. The server exposes seven tools and does not write files itself — the assistant runs the returned `shadcn add` command, so installs still go through the CLI. Setup is a single `npx shadcn@latest mcp init --client ` command plus an editor restart, with private registries configured via namespaced URL templates and environment-variable tokens. The shadcn CLI has an MCP server built in, so Claude Code, Cursor and VS Code can browse and install registry components for you. Here is the setup for each editor, how to add a private registry, and the errors you will hit and what they mean. shadcn’s MCP server is built into the shadcn CLI. Run npx shadcn@latest mcp init --client claude, or --client cursor, and your AI editor can browse, search and install items from every registry in components.json. mebius.design adds a hosted MCP server that returns each item’s full source and usage docs. Checked in shadcn’s docs and source on 17 Nov 2026. The shadcn MCP server is part of the shadcn CLI, the MIT-licensed shadcn package on npm 4.23.0 when we checked . Your editor starts it on your own machine with npx shadcn@latest mcp , and the AI can then browse, search and install items from any registry in your components.json : shadcn/ui’s own no setup needed , third-party registries, private ones behind a token, and namespaced ones such as @acme https://dev.to/acme . See shadcn’s MCP docs https://ui.shadcn.com/docs/mcp . Under the hood it has seven tools source https://github.com/shadcn-ui/ui/blob/main/packages/shadcn/src/mcp/index.ts : list the registries in components.json; list, search and view registry items with their files; find usage examples; return the shadcn add command for chosen items; and a checklist to run after new code is written. The server doesn’t write files itself. The assistant runs the add command it gets back, so every install still goes through the CLI. One command per editor, then a restart. Run init in your project with the name of your editor. It adds the shadcn server to that editor’s MCP config: Terminal : npx shadcn@latest mcp init --client claude or --client cursor, vscode, codex or opencode Restart the editor afterwards. In Claude Code, run /mcp and check that shadcn shows as connected; in Cursor, turn the server on in Cursor Settings; in VS Code, open .vscode/mcp.json and click Start. Codex is the exception: the CLI can’t edit ~/.codex/config.toml , so you add the server there by hand. Written by hand for Claude Code, the server is this file: .mcp.json : { "mcpServers": { "shadcn": { "command": "npx", "args": "shadcn@latest", "mcp" } } } Cursor takes the same block in .cursor/mcp.json ; VS Code puts it under "servers" in .vscode/mcp.json . If the editor lists no tools, shadcn’s troubleshooting notes suggest clearing the npx cache npx clear-npx-cache and switching the server off and on again. Once per project. The example is the @mebius registry. A private registry is a namespace in components.json: a URL template the CLI fills with the item name and, when the registry needs one, a header that reads a token from your environment shadcn’s authentication docs https://ui.shadcn.com/docs/registry/authentication . The CLI and its MCP server both read it. For mebius.design, create a token in Settings › Tokens https://www.mebius.design/settings/tokens?utm source=devto&utm medium=referral&utm campaign=guide-install-shadcn-components-cli-mcp&utm content=crosspost a free account works and add: components.json : { "registries": { "@mebius": { "url": "https://www.mebius.design/r/{name}.json", "headers": { "Authorization": "Bearer ${MEBIUS TOKEN}" } } } } .env.local : MEBIUS TOKEN=mbs your token Keep the token out of git. The CLI reads .env.local and .env. Check that .env.local is in your .gitignore, and revoke a token in Settings › Tokens if it leaks. Each mebius kit has a theme item. Add it on its own first, then items with --overwrite so shared parts take the kit’s version. Item names start with their kit: npx shadcn@latest add @mebius/charts-theme npx shadcn@latest add @mebius/charts-revenue-growth --overwrite No token yet? The 20 open starter items install from their URL with no account, like the Revenue Overview chart https://www.mebius.design/freebies/charts/revenue-overview?utm source=devto&utm medium=referral&utm campaign=guide-install-shadcn-components-cli-mcp&utm content=crosspost : npx shadcn@latest add https://www.mebius.design/r/charts-revenue-overview.json . What the MCP server asks for, and what you can run yourself. When an agent gets stuck, the same work runs in a terminal. From shadcn’s CLI docs https://ui.shadcn.com/docs/cli , the commands that matter for registries: init : creates components.json, adds the cn helper and sets up CSS variables. Once per project. add : installs items by name, @namespace/name or URL. --overwrite replaces files that already exist, --dry-run previews the changes. view : prints an item’s files before you install it. search alias list : searches one or more registries, with -q for a query. info : shows your project’s setup as the CLI sees it, handy when an install lands in the wrong folder. With the @mebius registry set up, you can find, read and install a chart without leaving the terminal: npx shadcn@latest search @mebius -q "candlestick" npx shadcn@latest view @mebius/charts-ethereum npx shadcn@latest add @mebius/charts-ethereum --overwrite A hosted server with browser sign-in and usage docs per item. mebius.design runs its own MCP server at https://www.mebius.design/api/mcp . Nothing runs on your machine and it doesn’t need a components.json: it reads the kits your account has and returns each item’s source files with their target paths, its npm and registry dependencies, and the usage docs written for that component or block props, examples, notes . As of 17 Nov 2026, a free account gets all 62 free charts https://www.mebius.design/freebies/charts?utm source=devto&utm medium=referral&utm campaign=guide-install-shadcn-components-cli-mcp&utm content=crosspost and 128 free forms https://www.mebius.design/freebies/forms?utm source=devto&utm medium=referral&utm campaign=guide-install-shadcn-components-cli-mcp&utm content=crosspost ; buying a kit adds that kit, and All items adds every kit. In Claude Code, add it with one command, with no token to copy: claude mcp add --transport http mebius https://www.mebius.design/api/mcp Then run /mcp , pick mebius, choose Authenticate, log in to mebius.design in the browser and click Approve. Cursor and VS Code ask you to log in the first time they connect: .cursor/mcp.json : { "mcpServers": { "mebius": { "url": "https://www.mebius.design/api/mcp" } } } VS Code takes the same URL under "servers" with "type": "http" . Tools that can’t open a browser, like CI or a remote machine, send a token from Settings › Tokens https://www.mebius.design/settings/tokens?utm source=devto&utm medium=referral&utm campaign=guide-install-shadcn-components-cli-mcp&utm content=crosspost as the header Authorization: Bearer