魔法组件协议

@magicuidesign/mcp
Hosted
6 Stars 1.0k 次浏览 magicuidesign 更新于 2026-08-23

ModelContextProtocol服务器适用于Magic UI,它通过提供诸如跑马灯、动画、特效和互动背景等组件的代码,使AI助手能够轻松为Web应用程序实现UI组件。

MCP 服务配置

复制以下 JSON 到 OPClaw 或其他 MCP 客户端的配置文件中即可使用

{
  "mcpServers": {
    "@magicuidesign/mcp": {
      "args": [
        "-y",
        "@magicuidesign/mcp@latest"
      ],
      "command": "npx"
    }
  }
}

服务介绍

@magicuidesign/mcp

npm version

适用于 Magic UI 的官方 ModelContextProtocol (MCP) 服务器。

安装 MCP 配置

npx @magicuidesign/cli@latest install <client>

支持的客户端

  • cursor
  • windsurf
  • claude
  • cline
  • roo-cline

手动安装

将以下内容添加到您的 IDE 的 MCP 配置中:

{
  "mcpServers": {
    "@magicuidesign/mcp": {
      "command": "npx",
      "args": ["-y", "@magicuidesign/mcp@latest"]
    }
  }
}

使用示例

配置完成后,您可以提出如下问题:

"制作一个滚动显示的标志"

"添加模糊淡出文本动画"

"添加网格背景"

可用工具

服务器通过 MCP 提供了以下可调用工具:

Tool Name Description
getUIComponents Provides a comprehensive list of all Magic UI components.
getLayout Provides implementation details for bento-grid, dock, file-tree, grid-pattern, interactive-grid-pattern, dot-pattern components.
getMedia Provides implementation details for hero-video-dialog, terminal, marquee, script-copy-btn, code-comparison components.
getMotion Provides implementation details for blur-fade, scroll-progress, scroll-based-velocity, orbiting-circles, animated-circular-progress-bar components.
getTextReveal Provides implementation details for text-animate, line-shadow-text, aurora-text, animated-shiny-text, animated-gradient-text, text-reveal, typing-animation, box-reveal, number-ticker components.
getTextEffects Provides implementation details for word-rotate, flip-text, hyper-text, morphing-text, spinning-text, sparkles-text components.
getButtons Provides implementation details for rainbow-button, shimmer-button, shiny-button, interactive-hover-button, animated-subscribe-button, pulsating-button, ripple-button components.
getEffects Provides implementation details for animated-beam, border-beam, shine-border, magic-card, meteors, neon-gradient-card, confetti, particles, cool-mode, scratch-to-reveal components.
getWidgets Provides implementation details for animated-list, tweet-card, client-tweet-card, lens, pointer, avatar-circles, icon-cloud, globe components.
getBackgrounds Provides implementation details for warp-background, flickering-grid, animated-grid-pattern, retro-grid, ripple components.
getDevices Provides implementation details for safari, iphone-15-pro, android components.

MCP 限制

某些客户端对可以调用的工具数量有限制。这就是为什么我们选择将这些工具按类别分组的原因。注意:要获取每个组件的具体上下文,请本地运行MCP并修改用于分组组件的逻辑。

致谢

非常感谢@beaubhp创建了MCP服务器 🙏

MIT

相关 MCP 服务