bunge-ds-mcp
bunge-ds-mcp
MCP (Model Context Protocol) 服务器,用于公开 @bunge/ds-components 设计系统的组件目录。它允许 AI 助手列出、搜索并获取组件的完整详情,包括输入、输出、使用示例和导入说明。
该服务器通过 stdio 进行通信(不公开 HTTP 端口)。通信通过进程本身进行,直接集成到 MCP 客户端(例如:VS Code Copilot)。
工具 (Tools)
工具 | 描述 |
| 列出所有可用组件,支持按类别筛选 ( |
| 按 ID 返回组件的完整详情(输入、输出、用法、导入) |
| 按名称、描述或标签搜索组件 |
| 返回组件的使用示例和导入说明 |
如何开始
前置要求
Node.js 18+
npm 9+
安装与构建
npm install
npm run build本地运行
npm start服务器通过 stdio 启动 — 没有 HTTP 端口。它由直接连接到该进程的 MCP 客户端使用。
MCP 客户端配置(例如:VS Code)
{
"mcpServers": {
"bunge-ds-mcp": {
"command": "npx",
"args": ["bunge-ds-mcp"]
}
}
}或者指向本地构建版本:
{
"mcpServers": {
"bunge-ds-mcp": {
"command": "node",
"args": ["dist/index.js"]
}
}
}package.json 脚本
脚本 | 命令 | 描述 |
|
| 将 TypeScript 编译为 |
|
| 启动 MCP 服务器(需要先构建) |
|
| 以监视模式编译 — 每次更改时自动重新编译 |
|
| 编译并打开 MCP Inspector 以交互方式测试工具 |
|
| 运行一次单元测试 |
|
| 以监视模式运行测试 |
|
| 在 4873 端口启动 Verdaccio(私有 npm 注册表) |
|
| 停止并移除 Verdaccio 容器 |
|
| 登录到本地私有注册表 (Verdaccio) |
|
| 增加版本号 (patch) 并发布到本地私有注册表 |
本地基础设施 (Docker)
docker-compose.yaml 会在 4873 端口 (http://localhost:4873) 启动一个 Verdaccio(私有 npm 注册表)。用于在不发送到公共 npm 的情况下模拟包发布。
npm run docker:infra:up # sobe o Verdaccio
npm run registry:login:private # autentica no registry local
npm run release:private # publica o pacote localmente项目结构
src/
├── index.ts # Entrada: cria o McpServer e conecta ao transport
├── tools/ # Registro das tools (uma por arquivo)
│ ├── index.ts # Barrel — registra todas as tools
│ ├── list-components.ts
│ ├── get-component.ts
│ ├── search-components.ts
│ └── get-component-usage.ts
├── data/
│ └── components.ts # Catálogo de componentes do DS
├── models/
│ └── mcp-server.model.ts # Interfaces e tipos
└── tests/
├── data.spec.ts
└── tools.spec.tsAvailable Tools
4 toolsget-componentA
Retorna detalhes completos de um componente: inputs, outputs, exemplos de uso e import.
Inputs: id (required).
get-component-usageB
Retorna exemplos de uso e instruções de import de um componente.
Inputs: id (required).
list-componentsA
Lista todos os componentes disponíveis no Design System, com filtro opcional por categoria.
Inputs: category.
search-componentsA
Busca componentes por nome, descrição ou tags.
Inputs: query (required).
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 4 tools
The tools have distinct purposes, but get-component-usage is a subset of get-component, potentially causing minor confusion. Descriptions help differentiate, so overall good.
All tools follow a consistent verb_noun snake_case pattern (get-, list-, search-), making them predictable and easy to understand.
With 4 tools, the set is well-scoped for browsing a design system, covering listing, searching, and retrieving details without being excessive.
The tools provide full coverage for component browsing: list with filter, search, full details, and usage info. No obvious gaps in this domain.
Related MCP Connectors
An MCP server that provides an API to LLMs to manage their JumpCloud resources.
MCP server exposing the Backtest360 engine API as tools for AI agents.
MCP server that lets AI assistants use all OneSchema features exposed via the public API.
MCP server for querying Forkast documentation