shadcn-ui-mcp-server
by Jpisnice·★ 2,768·综合分 58
MCP 服务器为 AI 助手提供对 shadcn/ui 组件的全面访问,支持 React、Svelte、Vue 和 React Native。
概述
shadcn-ui-mcp-server 是一个全面的模型上下文协议服务器,为 AI 助手提供对 shadcn/ui v4 组件库的直接访问。它支持多种框架,包括 React(使用 Radix UI 或 Base UI)、Svelte 5、Vue 和 React Native,允许 AI 工具检索组件源代码、演示、块和元数据。该服务器具有 GitHub API 集成、智能缓存、服务器发送事件传输支持和 Docker 容器化功能,适用于生产环境部署。
试试问 AI
装完之后,这里有 5 个你可以让 AI 做的事:
什么时候选它
当您使用 shadcn/ui 组件并在多个框架上工作时,此服务器可提供 AI 辅助实现细节。
什么时候不要选它
如果您只需要单一框架的组件或需要超出 GitHub 令牌访问的身份验证,则不太适合。
此 server 暴露的工具
从 README 抽取出 10 个工具list_componentsList all available shadcn/ui components
get_componentRetrieve detailed information about a specific shadcn/ui component
get_blockRetrieve complete implementation of shadcn/ui blocks
search_componentsSearch components by name or keywords
get_component_codeGet the source code for a specific component
get_component_demosRetrieve usage demos and examples for a component
get_dependenciesGet the dependency information for a specific component
browse_repositoryBrowse the repository structure of shadcn/ui components
get_configurationGet configuration details for the shadcn/ui setup
compare_frameworksCompare component implementations across different frameworks
说明:Tool names inferred from documentation and features described. Actual tool names and signatures not explicitly documented in README.
可对比工具
安装
安装
命令行使用
# 基本用法
npx @jpisnice/shadcn-ui-mcp-server
# 使用 GitHub 令牌(推荐)
npx @jpisnice/shadcn-ui-mcp-server --github-api-key ghp_your_token_here
# 框架特定
npx @jpisnice/shadcn-ui-mcp-server --framework svelte
npx @jpisnice/shadcn-ui-mcp-server --framework vue
npx @jpisnice/shadcn-ui-mcp-server --framework react-nativeClaude Desktop
从 [Releases](https://github.com/Jpisnice/shadcn-ui-mcp-server/releases) 下载并双击 .mcpb 文件即可立即安装。
手动 Claude Desktop 配置
{
"mcpServers": {
"shadcn-ui": {
"command": "npx",
"args": ["@jpisnice/shadcn-ui-mcp-server", "--github-api-key", "YOUR_TOKEN"]
}
}
}FAQ
- 支持哪些 shadcn/ui 框架?
- 该服务器支持 React(默认)、Svelte 5、Vue 和 React Native 实现。对于 React,您可以选择 Radix UI(默认)或 Base UI。
- 如何提高 GitHub API 速率限制?
- 使用 GitHub 个人访问令牌并带上 --github-api-key 参数,可以将速率限制从每小时 60 次请求增加到每小时 5000 次请求。
shadcn-ui-mcp-server 对比
最后更新于 · 由 README + GitHub 公开数据自动生成。