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.
| Name | Required | Description | Default |
|---|---|---|---|
| id | Yes | ID do componente (ex: "button", "list") |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
No annotations provided, so description must disclose behavior. It only states what is returned, but does not mention potential errors, authentication, rate limits, or side effects. For a read operation, basic behavioral transparency is missing.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is a single sentence that efficiently conveys the tool's purpose and return value. It is front-loaded with the key action and resource.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
Given no output schema, the description adequately lists the types of details returned (inputs, outputs, usage examples, import). Missing error handling or scope details, but sufficient for a simple fetch tool.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
The input schema has 100% description coverage for the single parameter 'id'. The description does not add meaning beyond the schema example. Baseline 3 is appropriate as schema covers the parameter.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly states the verb 'retorna' and the resource 'detalhes completos de um componente', specifying the content: inputs, outputs, usage examples, and import. It distinguishes from sibling tools like list-components and search-components.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description implies use for fetching full details of a specific component, but lacks explicit guidance on when to use versus alternatives or when not to use. No exclusions or prerequisites are mentioned.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
get-component-usageB
Retorna exemplos de uso e instruções de import de um componente.
| Name | Required | Description | Default |
|---|---|---|---|
| id | Yes | ID do componente (ex: "button", "list") |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
No annotations are provided. The description only states what it returns, but does not disclose any behavioral traits such as whether it is safe, requires authentication, or has side effects.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
A single, concise sentence that efficiently communicates the tool's purpose with no extraneous information.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
The description is adequate for a simple tool with one parameter, but lacks details about the return format or structure of the usage examples and import instructions. Could be more complete given there is no output schema.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema description coverage is 100% (the 'id' parameter has a clear description in the schema). The tool description adds no additional meaning beyond the schema, earning the baseline score of 3.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly states it returns usage examples and import instructions for a component (specific verb and resource). It distinguishes from siblings like 'get-component' (which likely returns component details), 'list-components', and 'search-components'.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
No guidance on when to use this tool versus alternatives. It does not provide any context about prerequisites, scenarios, or exclusions.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
list-componentsA
Lista todos os componentes disponíveis no Design System, com filtro opcional por categoria.
| Name | Required | Description | Default |
|---|---|---|---|
| category | No | Filtrar componentes por categoria |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
No annotations are provided, so the description carries full burden. It discloses basic behavior (list components, filter) but does not mention return format, pagination, or potential side effects.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is a single concise sentence that front-loads the purpose and includes the optional filter, with no unnecessary words.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
For a simple list tool with one optional parameter and no output schema, the description is minimally adequate but does not describe return value structure or other contextual details.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
The description restates the category filter already documented in the schema, adding no extra meaning beyond what the schema provides. Schema coverage is 100%.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly states the tool lists all available components in the Design System with an optional category filter, distinguishing it from sibling tools like get-component (single component) and search-components (search).
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description implies use for listing with optional filtering but does not explicitly contrast with siblings or provide when-not-to-use guidance.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
search-componentsA
Busca componentes por nome, descrição ou tags.
| Name | Required | Description | Default |
|---|---|---|---|
| query | Yes | Termo de busca para encontrar componentes |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
No annotations are provided, so the description must disclose behavioral traits. It only states the search fields (name, description, tags) but omits details like case sensitivity, partial matching, pagination, or read-only nature. This is insufficient for a search tool.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is a single, front-loaded sentence that conveys the core purpose. It is appropriately sized for a simple tool with one parameter, though it could include brief behavioral notes.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
Given no output schema and simple parameters, the description is minimally adequate but lacks details on return format, pagination, or matching behavior. It covers the essential 'what' but not the 'how' of results.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
The schema covers the single parameter with a description ('search term'), and the description adds value by specifying the fields searched (name, description, tags). This extra context helps the agent understand what the query matches against.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly states the action (search) and the resource (components) with the scope (by name, description, or tags). It distinguishes from sibling tools like list-components (which lists all) and get-component (single component retrieval).
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description implies usage context: use this tool when searching components by specific terms. While it does not explicitly mention alternatives, the sibling tool names (list-components, get-component) naturally differentiate the use cases.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
4 tool updates
v1.0.2- First observed
get-component - First observed
get-component-usage - First observed
list-components - First observed
search-components
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