跳到正文
目录与搜索
⌘K

开始

MCP

通过 shadcn MCP server,在 AI 助手里浏览并添加 Animate UI 的图标、背景与带样式的组件。

shadcn MCP server 让 AI 助手搜索 Animate UI 的 registry,并把图标、背景与带样式的组件(Liquid、Flip、GitHub Stars、Theme Toggler 按钮,以及 Code Block)加入项目。

添加 registry

MCP server 会搜索 components.json 中列出的 registry。加上 Animate UI 的:

components.json
{
  "registries": {
    "@animate-ui": "https://animate-ui.com/r/{name}.json"
  }
}

配置 MCP server

按你的客户端运行对应命令:

Claude Code
bunx shadcn@latest mcp init --client claude
Cursor
bunx shadcn@latest mcp init --client cursor
VS Code
bunx shadcn@latest mcp init --client vscode

也可以手动写入客户端配置(Claude Code 用 .mcp.json,Cursor 用.cursor/mcp.json,VS Code 用 .vscode/mcp.json):

mcp 配置
{
  "mcpServers": {
    "shadcn": {
      "command": "npx",
      "args": ["shadcn@latest", "mcp"]
    }
  }
}

使用

可以对助手说:

  • “给我看看 Animate UI registry 里的动画图标。”
  • “添加 Animate UI 的 Lucide 铃铛图标。”
  • “把 Animate UI 的星空背景加到首屏。”
  • “添加 Animate UI 的液体按钮。”

要给现有的 shadcn/ui 组件接上动效,请使用 CLI 或Skill;MCP 负责把 registry 里的文件加入项目。

对应官方文档 2026-10-18 版本。