返回市场
星风UI-MCP

星风UI-MCP

作者:starwind-ui28 星标更新:2025-07-06

项目介绍

Starwind UI MCP 服务器

smithery 徽章 在 MseeP 上验证

这是一个用于 Starwind UI 的 Model Context Protocol (MCP) 服务器的 TypeScript 实现,提供工具帮助开发者在使用如 Claude、Windsurf、Cursor 等 AI 工具时更好地处理 Starwind UI 组件。

快速开始

使用 npx

设置 IDE 使用本地 MCP 服务器的指令因 IDE 而异。以下是不同平台的示例:

Windsurf:

{
	"mcpServers": {
		"starwind-ui": {
			"command": "npx",
			"args": ["-y", "@starwind-ui/mcp"],
			"env": {}
		}
	}
}

Cursor:

{
	"mcpServers": {
		"starwind-ui": {
			"command": "npx",
			"args": ["-y", "@starwind-ui/mcp"],
			"env": {}
		}
	}
}

Claude Code:

{
	"mcpServers": {
		"starwind-ui": {
			"command": "npx",
			"args": ["-y", "@starwind-ui/mcp"],
			"env": {}
		}
	}
}

详细说明:

通过 Smithery 安装

要通过 Smithery 自动安装 Starwind UI MCP 服务器以供 Claude Desktop 使用:

npx -y @smithery/cli install @starwind-ui/starwind-ui-mcp --client claude

可用工具

工具名称描述
init_project初始化一个新的 Starwind UI 项目
install_component生成 Starwind UI 组件的安装命令
update_component生成 Starwind UI 组件的更新命令
get_documentation返回 Starwind UI 组件和指南的文档链接
fetch_llm_data从 starwind.dev 获取 LLM 数据(限速,带缓存)
get_package_manager检测并返回当前的包管理器信息

什么是 MCP?

Model Context Protocol (MCP) 是一种通过本地服务器扩展 AI 功能的协议。此实现提供了特定于 Starwind UI 的工具,以增强在使用 Starwind UI 时的 AI 助手功能。有关 MCP 的更多信息,请访问 官方文档

特性

  • 基于工具的架构 - 模块化设计,便于添加新工具
  • Starwind UI 文档工具 - 访问 Starwind UI 组件的文档链接
  • 包管理器检测 - 检测并使用适当的包管理器(npm、yarn、pnpm)
  • LLM 数据获取器 - 带缓存和限速的 LLM 数据检索
  • TypeScript 实现 - 使用 TypeScript 构建,以提高类型安全性和开发体验
  • 标准 I/O 传输 - 使用标准输入输出与 AI 助手通信

开发

本项目设置为使用 PNPM 作为包管理器进行开发。如果你不使用 pnpm,需要更新 package.json 文件中的相应包管理器命令。

项目结构

src/
  ├── config/         # 服务器配置
  │   └── settings.ts # 配置设置
  ├── tools/          # MCP 工具实现
  │   ├── index.ts    # 工具注册
  │   └── *.ts        # 单个工具实现
  ├── utils/          # 辅助函数
  └── server.ts       # 主 MCP 服务器实现

添加新工具

要向服务器添加自己的工具:

  1. src/tools/ 目录中创建一个新的工具文件
  2. src/tools/index.ts 中注册该工具
  3. src/config/settings.ts 中启用该工具
  4. 使用 pnpm build 重新构建服务器
  5. 使用 pnpm start 重启服务器

许可证

MIT 许可证 - 详情见 LICENSE 文件。

安全

MseeP.ai 安全评估徽章