返回市场
星风界面MCP

星风界面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 获取 Starwind UI 信息,带缓存和速率限制
  • TypeScript 实现 - 使用 TypeScript 构建,提高类型安全性和开发体验
  • 标准 I/O 传输 - 使用 stdio 与 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 安全评估徽章