Skip to content
← All MCP servers

Is the shadcn/ui MCP server safe? What it can reach

What the shadcn/ui MCP server can read, write and delete, how it signs in, and how to limit it in Claude Code and Codex.

Official serverChecked

The shadcn MCP server is part of the official shadcn CLI and runs locally with npx shadcn@latest mcp. It has no sign-in for the default registry and its tools only search registries and return commands. The main risk is the command the agent then runs, and the registries you add.

Who maintains it

ImplementationKindStatus
shadcn MCP server (shadcn CLI)Officialactive

It runs as a local process on your machine.

How it signs in

The default shadcn registry needs no credentials. Private registries in components.json can take a bearer token or API key through environment variables such as REGISTRY_TOKEN.

What its tools can do

KindTools
Readget_project_registries, list_items_in_registries, search_items_in_registries, view_items_in_registries, get_item_examples_from_registries, get_add_command_for_items, get_audit_checklist
Writenone documented
Can’t be undonenone documented

Tool names come from the server source in the shadcn-ui/ui repository, because the docs page does not list them. The tools return text. get_add_command_for_items returns an npx shadcn add command and does not run it, so any file writes happen when the agent runs that command in a shell.

Built-in limits

OptionWhat it does
registries in components.jsonThe server reads the registries you configure. Add only registries you trust.
Environment variables for registry authRegistry tokens such as REGISTRY_TOKEN go in .env.local, not in components.json.

The risks

  • Registry items are code, so a malicious or compromised third-party registry can hand the agent files that run in your project once they are added.
  • An injected instruction in registry content can steer the agent to run shadcn add or other shell commands through its own shell tool, which is where writes happen.
  • A private registry token set in the environment lets the server fetch everything that token can read.

Limit it in Claude Code

Add it from the documented launch settings, at local or user scope so a token never lands in a shared .mcp.json:

claude mcp add shadcn -- npx shadcn@latest mcp

Claude Code names MCP tools mcp__shadcn__<tool>. Once you know the tool names, deny the ones you won’t use and set the rest to ask in .claude/settings.json.

Limit it in Codex

Codex reads MCP servers from ~/.codex/config.toml. disabled_tools removes tools, and enabled_tools keeps only the ones you list:

[mcp_servers.shadcn]
command = "npx"
args = ["shadcn@latest", "mcp"]

Checklist

  • Add only registries you trust to components.json.
  • Review the diff after the agent runs shadcn add.
  • Keep registry tokens in .env.local and out of git.
  • Use a scoped read-only token for private registries.

Checked against the vendor documentation on November 25, 2026. shadcn/ui: MCP server docs · shadcn-ui/ui: MCP server source

What Excellent covers

Excellent doesn’t inspect MCP servers themselves. Its free scan reads supported logs on the Mac (Claude Code, Codex, Grok Build, GitHub Copilot CLI, Gemini CLI and Qwen Code) and reports findings for review, so you can see what an agent did after a session. Run the free scan · See a sample report · How to vet any MCP server

Excellent Pro adds checks before supported actions. Claude Code can display an ask prompt. With Codex, an Excellent “ask” refuses the action and tells the agent to ask you. Pro is US-only for now. Agent coverage · Pricing