local-only server
The server can only run on the client’s local machine because it depends on local resources.
Integrations
Provides integration with Windsurf (a Codeium product), allowing setup of the MCP server for enhanced AI capabilities when working with Starwind UI components
Detects and uses npm package manager for component installation and updates through the get_package_manager tool
Uses pnpm as the default package manager for the project, with built-in detection and support for handling Starwind UI components
Starwind UI MCP 服务器
Starwind UI 的模型上下文协议 (MCP) 服务器的 TypeScript 实现,提供帮助开发人员使用 Starwind UI 组件的工具。
快速入门
设置你的IDE
设置 IDE 以使用本地 MCP 服务器的说明因 IDE 而异。以下是 Windsurf 的示例:
详细说明:
什么是 MCP?
模型上下文协议 (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 助手进行通信
可用工具
工具名称 | 描述 |
---|---|
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 | 检测并返回当前包管理器信息 |
发展
该项目设置为使用 PNPM 作为包管理器进行开发。如果您不使用 pnpm,则需要使用所需的包管理器命令更新 package.json 文件。
项目结构
添加新工具
要将您自己的工具添加到服务器:
- 在
src/tools/
目录中创建一个新的工具文件 - 在
src/tools/index.ts
中注册该工具 - 在
src/config/settings.ts
中启用该工具 - 使用
pnpm build
重建服务器 - 使用
pnpm start
重新启动服务器
执照
MIT 许可证 - 有关详细信息,请参阅 LICENSE 文件。