Connect shadcn/ui to OpenCode
Copy-in React components built on Radix and Tailwind. Its MCP server browses, searches and installs items from the default and any namespaced community registry.
MCP serverOfficialChecked 2026-11-16
Before you start
- OpenCode installed (see its MCP documentation (opens in a new tab)).
- shadcn/ui is available on macOS, Windows and Linux.
Step 1: Add shadcn/ui to OpenCode
Add it from the terminal
Run this in your project folder. It saves the server to the project's
opencode.json.Terminal opencode mcp add shadcn -- npx -y shadcn@latest mcpOr edit the config file
Add this to
opencode.jsonat the project root.opencode.json { "$schema": "https://opencode.ai/config.json", "mcp": { "shadcn": { "type": "local", "command": [ "npx", "-y", "shadcn@latest", "mcp" ], "enabled": true } } }Step 2: Check it's connected
Terminal opencode mcp listStart OpenCode in the project; the server's tools are available to the agent straight away.
Step 3: Try a first request
Ask OpenCode something that only works with shadcn/ui connected:
Say to OpenCode Search the shadcn registry for a date picker and give me the command to add it to this project.
If it doesn't work
- OpenCode reads
opencode.jsonfrom the project root, or~/.config/opencode/opencode.jsonfor every project. - Environment variables use the
{env:NAME}syntax inside the config file. - Servers that need a sign-in: run
opencode mcp auth <name>.





