@openanysi/electronic-component-sourcing-mcp 0.0.0-stage → 0.1.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CONTRIBUTING.md +50 -0
- package/LICENSE +201 -0
- package/README.md +225 -2
- package/bin/server.js +18 -0
- package/docs/README.zh-CN.md +226 -0
- package/package.json +65 -4
- package/skills/electronic-component-sourcing/SKILL.md +27 -0
- package/skills/electronic-component-sourcing/references/common.en.md +3 -0
- package/skills/electronic-component-sourcing/references/common.zh.md +3 -0
- package/skills/electronic-component-sourcing/references/evidence-brief.en.md +19 -0
- package/skills/electronic-component-sourcing/references/evidence-brief.zh.md +19 -0
- package/skills/electronic-component-sourcing/references/research.en.md +30 -0
- package/skills/electronic-component-sourcing/references/research.zh.md +30 -0
- package/src/config.js +37 -0
- package/src/server.js +18 -0
- package/vertical.config.json +136 -0
- package/workflows/common.en.md +3 -0
- package/workflows/common.zh.md +3 -0
- package/workflows/evidence-brief.en.md +19 -0
- package/workflows/evidence-brief.zh.md +19 -0
- package/workflows/research.en.md +30 -0
- package/workflows/research.zh.md +30 -0
|
@@ -0,0 +1,226 @@
|
|
|
1
|
+
# electronic-component-sourcing-mcp:电子元件与 BOM 采购调研 MCP
|
|
2
|
+
|
|
3
|
+
通过 OpenAny 为 Claude、Cursor 等客户端提供电子元件与 BOM 采购调研。本地 `stdio` 运行,客户端负责分析、写作与导出。
|
|
4
|
+
|
|
5
|
+
[](https://www.npmjs.com/package/@openanysi/electronic-component-sourcing-mcp)
|
|
6
|
+
[](../LICENSE)
|
|
7
|
+
[](https://nodejs.org/)
|
|
8
|
+
|
|
9
|
+
[English](../README.md) | 简体中文
|
|
10
|
+
|
|
11
|
+
## 概览
|
|
12
|
+
|
|
13
|
+
本包面向 BOM 与元件寻源团队。研究范围包括搜索电子元件、读取元件详情。
|
|
14
|
+
|
|
15
|
+
可交付的成果包括:含身份、阶梯价背景与工程问题的元件清单。
|
|
16
|
+
|
|
17
|
+
**适合 / 不适合**
|
|
18
|
+
|
|
19
|
+
- **适合:**搜索电子元件,用于发现精确与更广泛料号候选。
|
|
20
|
+
- **适合:**读取元件详情,用于解读单价前核对制造商和包装。
|
|
21
|
+
- **适合:**比较已收集记录的对象、时间和字段覆盖,明确缺失信息。
|
|
22
|
+
- **适合:**仅分析用户提供的已有材料,不为写报告新增采集。
|
|
23
|
+
- **不适合:**使用工具未开放的操作或筛选,或将样本当作完整覆盖;具体范围见 FAQ。
|
|
24
|
+
|
|
25
|
+
## 目录
|
|
26
|
+
|
|
27
|
+
- [快速开始](#快速开始)
|
|
28
|
+
- [核心特性](#核心特性)
|
|
29
|
+
- [示例提示词](#示例提示词)
|
|
30
|
+
- [为什么选择本 MCP](#为什么选择本-mcp)
|
|
31
|
+
- [可以构建与交付什么](#可以构建与交付什么)
|
|
32
|
+
- [工具参考](#工具参考)
|
|
33
|
+
- [内置工作流指南](#内置工作流指南)
|
|
34
|
+
- [完整示例](#完整示例)
|
|
35
|
+
- [常见问题](#常见问题)
|
|
36
|
+
- [错误处理与重试](#错误处理与重试)
|
|
37
|
+
- [范围、数据与计费](#范围数据与计费)
|
|
38
|
+
- [开发](#开发)
|
|
39
|
+
- [关于 OpenAny](#关于-openany)
|
|
40
|
+
- [许可证](#许可证)
|
|
41
|
+
|
|
42
|
+
## 快速开始
|
|
43
|
+
|
|
44
|
+
### 前置条件
|
|
45
|
+
|
|
46
|
+
- Node.js 22+ 和支持本地 `stdio` MCP 的客户端。
|
|
47
|
+
- 数据调用需要 OpenAny Key:[API Keys](https://openany.si/dashboard/?page=api-keys)、[配置指南](https://openany.si/setup.md)、[用量和费用](https://openany.si/dashboard/?page=usage)。
|
|
48
|
+
- 三个辅助工具免 Key。
|
|
49
|
+
|
|
50
|
+
### 配置客户端
|
|
51
|
+
|
|
52
|
+
支持 `mcpServers` 的客户端可复制以下配置;其他宿主通过自身设置注册相同命令、参数和环境变量。
|
|
53
|
+
|
|
54
|
+
```json
|
|
55
|
+
{
|
|
56
|
+
"mcpServers": {
|
|
57
|
+
"electronic-component-sourcing-mcp": {
|
|
58
|
+
"command": "npx",
|
|
59
|
+
"args": [
|
|
60
|
+
"-y",
|
|
61
|
+
"@openanysi/electronic-component-sourcing-mcp"
|
|
62
|
+
],
|
|
63
|
+
"env": {
|
|
64
|
+
"OPENANY_API_KEY": "YOUR_OPENANY_API_KEY"
|
|
65
|
+
}
|
|
66
|
+
}
|
|
67
|
+
}
|
|
68
|
+
}
|
|
69
|
+
```
|
|
70
|
+
|
|
71
|
+
将 `OPENANY_API_KEY` 保存在私密客户端设置或继承环境中。仅试用辅助工具时可省略 `env`;不要将真实 Key 写入聊天或仓库。
|
|
72
|
+
|
|
73
|
+
### 验证连接
|
|
74
|
+
|
|
75
|
+
- **无 Key:**通过 `get_tool_info` 查看工具参数和价格,再通过 `get_workflow` 加载 `research`;英文指南显式传 `language: "en"`。
|
|
76
|
+
- **有 Key:**先检查目标工具,再按问题采集一个受控样本,保留来源和缺失字段。
|
|
77
|
+
|
|
78
|
+
## 核心特性
|
|
79
|
+
|
|
80
|
+
- **搜索电子元件:**通过 `search_components` 独立读取;输入和可用字段见工具参考。
|
|
81
|
+
- **读取元件详情:**通过 `get_component` 独立读取;输入和可用字段见工具参考。
|
|
82
|
+
- **保留比较口径:**记录制造商 / MPN、分销料号 / URL、包装 / MOQ,缺失字段标未知。
|
|
83
|
+
- **一次一决策:**先查当前参数和费用,再决定每个请求;超时或未知状态不自动重放。
|
|
84
|
+
- **双语任务指南:**内置采集和简报指南;客户端使用自己的模型完成分析和可用的本地导出。
|
|
85
|
+
- **相关能力发现:**当本领域需要其他操作时查看 OpenAny 目录;发现结果不会自动调用或安装。
|
|
86
|
+
|
|
87
|
+
## 示例提示词
|
|
88
|
+
|
|
89
|
+
- “研究电子元件候选与分销商料号记录。”
|
|
90
|
+
- “搜索我的元件料号,区分制造商并查看一个已确认商品标识。”
|
|
91
|
+
- “按相同包装和数量条件比较价格,不提供电气替代认证。”
|
|
92
|
+
- “只使用我提供的记录,不新增数据调用。按下方证据列整理表格,标记缺失字段并提出后续核对问题。”
|
|
93
|
+
|
|
94
|
+
## 为什么选择本 MCP
|
|
95
|
+
|
|
96
|
+
| 关注点 | 处理方式 | 用户价值 |
|
|
97
|
+
| --- | --- | --- |
|
|
98
|
+
| 搜索电子元件 | 使用 `search_components`,按当前契约提供 `query` | 发现精确与更广泛料号候选 |
|
|
99
|
+
| 读取元件详情 | 使用 `get_component`,按当前契约提供 | 解读单价前核对制造商和包装 |
|
|
100
|
+
|
|
101
|
+
## 可以构建与交付什么
|
|
102
|
+
|
|
103
|
+
| 场景 | 客户端执行方式 | 交付物 |
|
|
104
|
+
| --- | --- | --- |
|
|
105
|
+
| 搜索电子元件 | 选择 `search_components`,按当前契约提供所需标识和输入。 | 用于发现精确与更广泛料号候选的来源证据表。 |
|
|
106
|
+
| 读取元件详情 | 选择 `get_component`,按当前契约提供所需标识和输入。 | 用于解读单价前核对制造商和包装的来源证据表。 |
|
|
107
|
+
| 领域比较简报 | 对齐已采集记录的对象、日期和单位,再解释差异。 | 有来源的观察、未解决差异和后续核查问题。 |
|
|
108
|
+
|
|
109
|
+
## 工具参考
|
|
110
|
+
|
|
111
|
+
共 **5 个工具**:2 个数据工具和 3 个免费辅助工具。每次数据工具调用对应一个请求,后续页面和调用由客户端控制。
|
|
112
|
+
|
|
113
|
+
### 数据工具
|
|
114
|
+
|
|
115
|
+
参数表保留英文名称及 required/optional 标记,便于与客户端 Schema 对照。
|
|
116
|
+
|
|
117
|
+
| 工具 | 参数 | 行为 | 返回数据概览 |
|
|
118
|
+
| --- | --- | --- | --- |
|
|
119
|
+
| `search_components` | `query` (string, required) | 搜索电子元件 | `exact_matches`, `products`, `manufacturer`, `manufacturer_part_number`, `url`;字段取决于接口,部分字段可能缺失。 |
|
|
120
|
+
| `get_component` | `url` (string, optional); `distributor_part_number` (string, optional); `manufacturer_part_number` (string, optional); `manufacturer` (string, optional) | 读取元件详情 | `manufacturer`, `manufacturer_part_number`, `digikey_part_number`, `packaging`, `pricing`, `currency`, `stock_quantity`;字段取决于接口,部分字段可能缺失。 |
|
|
121
|
+
|
|
122
|
+
响应按原接口透传,未编造统一业务 Schema。提取字段或串联标识前先检查真实结果;可选字段可能缺失。只有参数表中存在的工具才接受输入游标。
|
|
123
|
+
|
|
124
|
+
仅研究当前分销目录中的元件。核对制造商、MPN、分销料号和包装,保留实际返回的 MOQ、币种与数量阶梯。不承诺跨分销商最低价,不下单,也不认证替代料工程兼容性。
|
|
125
|
+
|
|
126
|
+
`get_component` 要求 url、`distributor_part_number`,或 `manufacturer_part_number` 与 manufacturer。搜索可能在 products 为空时仍返回 `exact_matches`,需同时检查两者再判无结果。核对选定制造商和产品 URL,结合包装与最低数量比较价格阶梯。
|
|
127
|
+
|
|
128
|
+
### 免费辅助工具
|
|
129
|
+
|
|
130
|
+
| 工具 | 参数 | 行为 |
|
|
131
|
+
| --- | --- | --- |
|
|
132
|
+
| `get_tool_info` | 必填 `tool_name`,取数据工具名 | 查看参数、价格与限制 |
|
|
133
|
+
| `get_workflow` | 必填 `workflow`;可选 `language`,zh/en,默认 zh | 读取指南;英文传 `language: "en"` |
|
|
134
|
+
| `search_openany_capabilities` | 必填 `query`,1–256 字符;可选 `limit`,1–10,默认 5 | 查找候选能力,不执行 |
|
|
135
|
+
|
|
136
|
+
## 内置工作流指南
|
|
137
|
+
|
|
138
|
+
`get_workflow` 返回供客户端使用的说明,本身不调用数据或模型;英文指南传 `language: "en"`。
|
|
139
|
+
|
|
140
|
+
| 指南 ID | 适用任务 | 内容 |
|
|
141
|
+
| --- | --- | --- |
|
|
142
|
+
| `research` | 选择本领域采集路径 | 核对可用工具、输入标识和采样边界。 |
|
|
143
|
+
| `evidence_brief` | 根据已有材料撰写简报 | 保留来源、比较口径、缺失信息与后续问题。 |
|
|
144
|
+
|
|
145
|
+
### 可选 companion Skill
|
|
146
|
+
|
|
147
|
+
[领域 Skill](../skills/electronic-component-sourcing/SKILL.md) 包含相同双语指南。仅在客户端支持 Skill 时安装;不安装仍可使用 MCP 指南。
|
|
148
|
+
|
|
149
|
+
## 完整示例
|
|
150
|
+
|
|
151
|
+
**提示词:**“搜索我的元件料号,区分制造商并查看一个已确认商品标识。”
|
|
152
|
+
|
|
153
|
+
**客户端执行方式:**
|
|
154
|
+
|
|
155
|
+
1. 加载 `research`,明确对象、范围和预算,选择实际需要的工具:`search_components`, `get_component`。
|
|
156
|
+
2. 通过 `get_tool_info` 核对当前 Schema 和价格。只有标识与必填字段齐全时才发起已获授权的调用;不要编造标识或自动追加页面。
|
|
157
|
+
3. 搜索料号,同时检查 `exact_matches` 和 products,选择详情前确认制造商与 MPN,保留包装、MOQ、数量阶梯与币种。
|
|
158
|
+
4. 按以下列保留证据:制造商 / MPN | 分销料号 / URL | 包装 / MOQ | 数量阶梯 / 币种 | 来源日期 | 缺口。缺失字段标未知。
|
|
159
|
+
5. 加载 `evidence_brief`,写出有证据支持的发现与后续问题;有文件工具时再导出 Markdown / CSV。
|
|
160
|
+
|
|
161
|
+
## 常见问题
|
|
162
|
+
|
|
163
|
+
### 开始前需要确认哪些输入?
|
|
164
|
+
|
|
165
|
+
`search_components` 需要 `query`;`get_component` 需要 按具体任务选择已支持的输入。先按工具表选择查询或已知记录读取;缺少标识时向用户补充,不按相似名称猜测。
|
|
166
|
+
|
|
167
|
+
### 如何比较本领域的记录?
|
|
168
|
+
|
|
169
|
+
比较前对齐制造商 / MPN、分销料号 / URL、包装 / MOQ。将可比观察与未知字段分别记录,所需证据不足时明确列出后续核查项。
|
|
170
|
+
|
|
171
|
+
### 有哪些领域范围限制?
|
|
172
|
+
|
|
173
|
+
仅研究当前分销目录中的元件。核对制造商、MPN、分销料号和包装,保留实际返回的 MOQ、币种与数量阶梯。不承诺跨分销商最低价,不下单,也不认证替代料工程兼容性。
|
|
174
|
+
|
|
175
|
+
### 使用费用是多少?
|
|
176
|
+
|
|
177
|
+
Apache-2.0 软件包没有 MCP 订阅费。3 个辅助工具免费免 Key;2 个数据工具按 OpenAny 当前价格计费,调用前通过 `get_tool_info` 查看。客户端模型费用另计。
|
|
178
|
+
|
|
179
|
+
### 需要目标平台账号或 Cookie 吗?
|
|
180
|
+
|
|
181
|
+
本包的数据调用使用 `OPENANY_API_KEY`,不要求在 MCP 配置中保存个人平台账号或浏览器 Cookie。它不能借此访问未提供的私密账号数据。
|
|
182
|
+
|
|
183
|
+
### 支持哪些客户端,无 Key 能做什么?
|
|
184
|
+
|
|
185
|
+
支持标准本地 `stdio` MCP。配置 JSON 适用于采用 `mcpServers` 的宿主;其他客户端注册相同命令。无 Key 时可查看工具信息、读取指南和发现相关能力。
|
|
186
|
+
|
|
187
|
+
### 可以把缺失字段当作零,或推断全量结果吗?
|
|
188
|
+
|
|
189
|
+
不能。保留对象、来源、筛选和采样范围;缺失值标未知,结果不代表未采集到的记录。
|
|
190
|
+
|
|
191
|
+
### 谁负责报告与文件导出?
|
|
192
|
+
|
|
193
|
+
客户端 Agent 负责分析和写作,导出 Markdown / CSV 需要其文件工具。MCP 返回数据和指南,不直接生成报告。包外能力可通过 `search_openany_capabilities` 或 OpenAny 通用 MCP 查找。
|
|
194
|
+
|
|
195
|
+
### 超时或执行状态不明怎么办?
|
|
196
|
+
|
|
197
|
+
保留原请求 ID,先核查结果再决定后续调用;未收到最终结果不代表未收费,不自动重放未知请求。
|
|
198
|
+
|
|
199
|
+
## 错误处理与重试
|
|
200
|
+
|
|
201
|
+
| 执行状态 | 常见情况 | 收费情况 | 是否可重试 |
|
|
202
|
+
| --- | --- | --- | --- |
|
|
203
|
+
| 失败 | 发送前参数或凭据被拒绝 | 不收费 | 修正输入后再决定 |
|
|
204
|
+
| 成功 | 返回业务数据 | 按接口计费规则 | 不要重复提交同一请求 |
|
|
205
|
+
| 不确定 / 超时 | 未收到最终结果 | 未知 | 先核对原请求 |
|
|
206
|
+
|
|
207
|
+
## 范围、数据与计费
|
|
208
|
+
|
|
209
|
+
- **执行和计费:**逐次检查并执行;空结果也可能按所选规则收费。
|
|
210
|
+
- **采样边界:**仅研究当前分销目录中的元件。核对制造商、MPN、分销料号和包装,保留实际返回的 MOQ、币种与数量阶梯。不承诺跨分销商最低价,不下单,也不认证替代料工程兼容性。
|
|
211
|
+
- **报告规范:**区分原始数据、观察、假设与草稿;缺失事实标未知。
|
|
212
|
+
- **网络和隐私:**服务在本地运行,目录查询和业务输入会发送到 OpenAny。
|
|
213
|
+
|
|
214
|
+
## 开发
|
|
215
|
+
|
|
216
|
+
见英文 [CONTRIBUTING.md](../CONTRIBUTING.md),包含安装、验证及指南维护说明。
|
|
217
|
+
|
|
218
|
+
## 关于 OpenAny
|
|
219
|
+
|
|
220
|
+
[OpenAny](https://openany.si/) 是 B2A(Business-to-Agent)市场,提供 AI 模型、数据和业务 API、MCP 工具以及 ready-to-call Runs。一枚 Key 按调用付费,无需强制月费订阅。
|
|
221
|
+
|
|
222
|
+
使用 `search_openany_capabilities` 或连接 [OpenAny 通用 MCP](https://mcp.openany.si/) 扩展能力。
|
|
223
|
+
|
|
224
|
+
## 许可证
|
|
225
|
+
|
|
226
|
+
[Apache-2.0](../LICENSE)
|
package/package.json
CHANGED
|
@@ -1,6 +1,67 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@openanysi/electronic-component-sourcing-mcp",
|
|
3
|
-
"version": "0.
|
|
4
|
-
"
|
|
5
|
-
"
|
|
6
|
-
|
|
3
|
+
"version": "0.1.1",
|
|
4
|
+
"description": "Search electronic component catalogues and inspect distributor part details for BOM sourcing research. Bilingual MCP guides for BOM and component-sourcing teams; your client analyzes the returned evidence. Powered by OpenAny.",
|
|
5
|
+
"type": "module",
|
|
6
|
+
"engines": {
|
|
7
|
+
"node": ">=22"
|
|
8
|
+
},
|
|
9
|
+
"license": "Apache-2.0",
|
|
10
|
+
"bin": {
|
|
11
|
+
"electronic-component-sourcing-mcp": "./bin/server.js"
|
|
12
|
+
},
|
|
13
|
+
"files": [
|
|
14
|
+
"bin",
|
|
15
|
+
"src",
|
|
16
|
+
"vertical.config.json",
|
|
17
|
+
"workflows",
|
|
18
|
+
"README.md",
|
|
19
|
+
"docs/README.zh-CN.md",
|
|
20
|
+
"CONTRIBUTING.md",
|
|
21
|
+
"LICENSE",
|
|
22
|
+
"skills"
|
|
23
|
+
],
|
|
24
|
+
"scripts": {
|
|
25
|
+
"test": "node --test test/*.test.mjs",
|
|
26
|
+
"check": "node scripts/check.mjs && node scripts/sync-skill.mjs --check",
|
|
27
|
+
"smoke:package": "node scripts/smoke-package.mjs",
|
|
28
|
+
"sync:skill": "node scripts/sync-skill.mjs"
|
|
29
|
+
},
|
|
30
|
+
"keywords": [
|
|
31
|
+
"mcp",
|
|
32
|
+
"mcp-server",
|
|
33
|
+
"model-context-protocol",
|
|
34
|
+
"openany",
|
|
35
|
+
"ai-agents",
|
|
36
|
+
"digikey",
|
|
37
|
+
"electronic-components",
|
|
38
|
+
"bom",
|
|
39
|
+
"part-number",
|
|
40
|
+
"component-sourcing",
|
|
41
|
+
"claude",
|
|
42
|
+
"cursor",
|
|
43
|
+
"digikey-parts",
|
|
44
|
+
"bom-research",
|
|
45
|
+
"mpn",
|
|
46
|
+
"bom-sourcing",
|
|
47
|
+
"distributor-parts",
|
|
48
|
+
"component-research"
|
|
49
|
+
],
|
|
50
|
+
"repository": {
|
|
51
|
+
"type": "git",
|
|
52
|
+
"url": "git+https://github.com/siopenany/just-mcps.git",
|
|
53
|
+
"directory": "packages/electronic-component-sourcing-mcp"
|
|
54
|
+
},
|
|
55
|
+
"homepage": "https://github.com/siopenany/just-mcps/tree/main/packages/electronic-component-sourcing-mcp#readme",
|
|
56
|
+
"bugs": {
|
|
57
|
+
"url": "https://github.com/siopenany/just-mcps/issues"
|
|
58
|
+
},
|
|
59
|
+
"dependencies": {
|
|
60
|
+
"@openanysi/openany-core": "0.1.2"
|
|
61
|
+
},
|
|
62
|
+
"devDependencies": {
|
|
63
|
+
"@modelcontextprotocol/client": "2.4.0"
|
|
64
|
+
},
|
|
65
|
+
"readme": "# electronic-component-sourcing-mcp: Electronic Component Sourcing Research MCP\n\nMCP server to search electronic component catalogues and inspect distributor part details for BOM sourcing research. Built for Claude, Cursor and other AI agents. Powered by [OpenAny](https://openany.si/).\n\n[](https://www.npmjs.com/package/@openanysi/electronic-component-sourcing-mcp)\n[](LICENSE)\n[](https://nodejs.org/)\n\nEnglish | [简体中文](docs/README.zh-CN.md)\n\n## Overview\n\nUse this MCP to search electronic component catalogues and inspect distributor part details for BOM sourcing research.\n\nDesigned for BOM and component-sourcing teams, it supplies evidence your agent can turn into a part shortlist with identity, price-tier context and engineering questions.\n\n**Best For / Not For**\n\n- **Best For:** Search electronic components to find exact and broader part candidates.\n- **Best For:** Get component details to verify manufacturer and packaging before interpreting unit price.\n- **Best For:** comparing collected records with their object, time and field-coverage context.\n- **Best For:** analyzing supplied material without collecting again merely to write a report.\n- **Not For:** operations or filters absent from Tools Reference, or treating samples as complete coverage; see the scope FAQ.\n\n## Table of Contents\n\n- [Quick Start](#quick-start)\n- [Key Features](#key-features)\n- [Example Prompts](#example-prompts)\n- [Why electronic-component-sourcing-mcp?](#why-electronic-component-sourcing-mcp)\n- [What You Can Build & Deliver](#what-you-can-build--deliver)\n- [Tools Reference](#tools-reference)\n- [Built-in Workflow Guides](#built-in-workflow-guides)\n- [End-to-End Example](#end-to-end-example)\n- [FAQ](#faq)\n- [Error Handling & Retries](#error-handling--retries)\n- [Scope, Data & Billing Notes](#scope-data--billing-notes)\n- [Development](#development)\n- [About OpenAny](#about-openany)\n- [License](#license)\n\n## Quick Start\n\n### Prerequisites\n\n- Node.js 22+ and a client supporting local `stdio` MCP servers.\n- An OpenAny API key for data tools: [API Keys](https://openany.si/dashboard/?page=api-keys), [setup guide](https://openany.si/setup.md), [usage and costs](https://openany.si/dashboard/?page=usage).\n- Utility tools work without a key.\n\n### Configure Your Client\n\nFor clients using `mcpServers`, add this to private settings. Other hosts register the same command, arguments and environment through their MCP settings or CLI.\n\n```json\n{\n \"mcpServers\": {\n \"electronic-component-sourcing-mcp\": {\n \"command\": \"npx\",\n \"args\": [\n \"-y\",\n \"@openanysi/electronic-component-sourcing-mcp\"\n ],\n \"env\": {\n \"OPENANY_API_KEY\": \"YOUR_OPENANY_API_KEY\"\n }\n }\n }\n}\n```\n\nStore `OPENANY_API_KEY` in private client settings or the inherited environment. Omit `env` for utility-only use. Keep real keys out of chat and repositories.\n\n### Verify It Works\n\n- **Without an API key:** Inspect `search_components` with `get_tool_info`, then load `get_workflow` with `workflow: \"research\", language: \"en\"`. Explain inputs and pricing without fetching data.\n- **With an API key:** Ask the agent to inspect the relevant tool, request one scoped sample for your question, and preserve sources and missing fields in a research table.\n\n## Key Features\n\n- **Search electronic components:** use `search_components` as an independent operation; inspect its inputs and available fields below.\n- **Get component details:** use `get_component` as an independent operation; inspect its inputs and available fields below.\n- **Comparable evidence:** retain Manufacturer / MPN; Distributor part / URL; Packaging / MOQ; mark missing fields unknown.\n- **Inspect before collection:** read current parameters and pricing before each request; uncertain outcomes are not automatically replayed.\n- **Bilingual task guidance:** collection and reporting guides support analysis and available local exports with your own client model.\n- **Related capability discovery:** inspect the OpenAny catalog when this domain needs another operation; discovery does not execute or install it.\n\n## Example Prompts\n\n- \"Research electronic-component candidates and distributor part records.\"\n- \"Search my component number, distinguish manufacturers, and inspect one confirmed product reference.\"\n- \"Compare prices only with matching packaging and quantity conditions; do not certify electrical substitution.\"\n- \"Use only the records I provide. Make no new data calls. Organize the evidence columns below, mark missing fields and list follow-up questions.\"\n\n## Why electronic-component-sourcing-mcp?\n\n| What You Care About | How We Handle It | Value to You |\n| --- | --- | --- |\n| Search electronic components | Use `search_components` with `query` | Find exact and broader part candidates |\n| Get component details | Use `get_component` with | Verify manufacturer and packaging before interpreting unit price |\n\n## What You Can Build & Deliver\n\n| Use Case | How the Agent Runs It | Typical Deliverables |\n| --- | --- | --- |\n| Search electronic components | Choose `search_components` with the identifiers and inputs required by its current contract. | Sourced evidence to help find exact and broader part candidates. |\n| Get component details | Choose `get_component` with the identifiers and inputs required by its current contract. | Sourced evidence to help verify manufacturer and packaging before interpreting unit price. |\n| Electronic Component Sourcing brief | Align object identity, dates and units before interpreting collected records. | Sourced observations, unresolved differences and follow-up checks. |\n\n## Tools Reference\n\nThe server exposes **5 tools**: 2 data tools and 3 free keyless utilities. Each data tool maps to one request. The client decides subsequent calls and pages.\n\n### Data Tools\n\n| Tool | Parameters | Behavior | Typical Returned Fields |\n| --- | --- | --- | --- |\n| `search_components` | `query` (string, required) | Search electronic components | `exact_matches`, `products`, `manufacturer`, `manufacturer_part_number`, `url`; provider-dependent; optional fields may be absent. |\n| `get_component` | `url` (string, optional); `distributor_part_number` (string, optional); `manufacturer_part_number` (string, optional); `manufacturer` (string, optional) | Get component details | `manufacturer`, `manufacturer_part_number`, `digikey_part_number`, `packaging`, `pricing`, `currency`, `stock_quantity`; provider-dependent; optional fields may be absent. |\n\nResponses are passed through rather than normalized into an invented common business schema. Inspect the returned payload before extracting fields or chaining identifiers. Optional fields may be missing. An input cursor is available only where listed above.\n\nResearch components within the available distributor catalogue. Match manufacturer, MPN, distributor part number and packaging. Keep MOQ, currency and quantity tiers when returned. No cross-distributor price guarantee, ordering or engineering substitution certification is included.\n\nSupply `url`, `distributor_part_number`, or both `manufacturer_part_number` and `manufacturer`.\n\n`get_component` requires `url`, `distributor_part_number`, or both `manufacturer_part_number` and `manufacturer`. Search can return `exact_matches` even when `products` is empty; inspect both before concluding there are no results. Match the selected manufacturer and part URL, and compare price tiers with their packaging and minimum quantities.\n\n### Utility Tools (Free, No API Key Required)\n\n| Tool | Parameters | Behavior |\n| --- | --- | --- |\n| `get_tool_info` | Required `tool_name` from the data-tool names above | Read current parameters, pricing and limits |\n| `get_workflow` | Required `workflow`; optional `language` (`zh` or `en`, default `zh`) | Return a guide; use `language: \"en\"` for English |\n| `search_openany_capabilities` | Required `query` (1-256 characters); optional `limit` (1-10, default 5) | Search related capabilities without executing them |\n\n## Built-in Workflow Guides\n\n`get_workflow` returns instructions for your client without calling data tools or a model. Select `language: \"en\"` for English.\n\n| Guide ID | Best For | What It Provides |\n| --- | --- | --- |\n| `research` | Planning electronic component sourcing research | A tool/identifier checklist and a scoped collection method. |\n| `evidence_brief` | Reporting from collected electronic component sourcing research records | Source attribution, comparison context, missing information and follow-up questions. |\n\n### Companion Skill (Optional)\n\nThe [companion Skill](skills/electronic-component-sourcing/SKILL.md) contains the same bilingual guides. Install it only if your client supports Skills; MCP guides work independently.\n\n## End-to-End Example\n\n**Prompt:** \"Search my component number, distinguish manufacturers, and inspect one confirmed product reference.\"\n\n**How the Agent Executes:**\n\n1. Load `research`, establish identifiers, scope and budget, and select the needed tools: `search_components`, `get_component`.\n2. Inspect `get_tool_info` for current schemas and pricing. Make authorized calls only with confirmed identifiers and required inputs; do not fabricate IDs or append pages automatically.\n3. Search part numbers, inspect both `exact_matches` and products, and confirm manufacturer/MPN before selecting details. Preserve packaging, MOQ, quantity tiers and currency.\n4. Retain evidence using these columns: Manufacturer / MPN | Distributor part / URL | Packaging / MOQ | Quantity tier / currency | Source date | Gaps. Mark absent fields unknown.\n5. Load `evidence_brief`, write evidence-linked findings and open questions, and export Markdown/CSV only when client file tools are available.\n\n## FAQ\n\n### Which inputs should I confirm before starting?\n\n`search_components` requires `query`; `get_component` requires a deliberate choice of the supported inputs. Choose the operation that matches the supplied query or known record; ask for missing identifiers rather than guessing from names.\n\n### How should I compare the returned records?\n\nAlign Manufacturer / MPN; Distributor part / URL; Packaging / MOQ before comparing. Keep supported observations separate from unavailable fields and list the specific follow-up evidence needed.\n\n### What are the domain-specific scope limits?\n\nResearch components within the available distributor catalogue. Match manufacturer, MPN, distributor part number and packaging. Keep MOQ, currency and quantity tiers when returned. No cross-distributor price guarantee, ordering or engineering substitution certification is included.\n\n### How much does this MCP cost?\n\nThe Apache-2.0 package has no MCP subscription fee. Three utilities are free and keyless; 2 data tools follow current OpenAny pricing. Inspect `get_tool_info` before calling. Client model costs are separate.\n\n### Do I need a platform account or browser cookies?\n\nData calls use `OPENANY_API_KEY`. The MCP configuration does not require a personal platform account or browser cookies, and does not grant access to unprovided private account data.\n\n### Which clients work, and what can I try without a key?\n\nUse a standard local `stdio` MCP client. The configuration JSON applies to hosts using `mcpServers`; other clients register the same command. Without a key, inspect tools, read guides and discover related capabilities.\n\n### Can I treat missing fields as zero or infer complete coverage?\n\nNo. Preserve object identity, source, filters and sample scope. Mark missing values unknown; the returned sample does not represent uncollected records.\n\n### Who writes the report and exports files?\n\nYour client agent analyzes and writes; Markdown/CSV export requires its file tools. The MCP returns data and guides rather than generating a report. Discover missing capabilities with `search_openany_capabilities` or the general OpenAny MCP.\n\n### What should I do after a timeout or uncertain result?\n\nPreserve the original request ID and inspect its outcome before another call. A missing final response does not prove that it was uncharged; do not automatically replay an uncertain request.\n\n## Error Handling & Retries\n\n| Execution State | Typical Indicators | Billed? | Safe to Retry? |\n| --- | --- | --- | --- |\n| **Failed** | Input or credential rejection before dispatch | No | After correcting the input |\n| **Succeeded** | Returned business data | According to the selected API's billing rule | Do not resubmit the same request |\n| **Uncertain / Timeout** | Final result was not received | Unknown | Check the original request first |\n\n## Scope, Data & Billing Notes\n\n- **Execution & Billing:** Each call is inspected and executed separately. Empty results may incur a charge when the selected rule applies.\n- **Sampling & Data Boundaries:** Research components within the available distributor catalogue. Match manufacturer, MPN, distributor part number and packaging. Keep MOQ, currency and quantity tiers when returned. No cross-distributor price guarantee, ordering or engineering substitution certification is included.\n- **Reporting Standards:** Separate source data, observations, hypotheses and drafts. Mark unavailable facts as unknown.\n- **Network & Privacy:** The server runs locally; catalog queries and business inputs are sent to OpenAny.\n\n## Development\n\nSee [CONTRIBUTING.md](CONTRIBUTING.md) for setup, verification and guide maintenance.\n\n## About OpenAny\n\n[OpenAny](https://openany.si/) is a **B2A (Business-to-Agent) marketplace** for AI models, data and business APIs, tools/MCP servers and ready-to-call Runs. One OpenAny key provides pay-per-call access without a required monthly subscription.\n\nDiscover additional capabilities with `search_openany_capabilities` or connect the general [OpenAny MCP](https://mcp.openany.si/).\n\n## License\n\n[Apache-2.0](LICENSE)\n",
|
|
66
|
+
"readmeFilename": "README.md"
|
|
67
|
+
}
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: electronic-component-sourcing
|
|
3
|
+
description: "Search electronic component catalogues and inspect distributor part details for BOM sourcing research. Use with this MCP for sourced research and evidence briefs; it does not build servers or perform account operations."
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# Electronic Component Sourcing
|
|
7
|
+
|
|
8
|
+
Use the installed `@openanysi/electronic-component-sourcing-mcp` MCP for this task. This Skill supplies client-side research instructions; it does not install or start the server.
|
|
9
|
+
|
|
10
|
+
## Choose a guide
|
|
11
|
+
|
|
12
|
+
- Read [common rules](references/common.en.md) before collecting data, or [中文规则](references/common.zh.md).
|
|
13
|
+
- For question framing, tool selection, identifiers and sample collection, read [research](references/research.en.md) or [中文调研指南](references/research.zh.md).
|
|
14
|
+
- For a report based on existing outputs, read [evidence brief](references/evidence-brief.en.md) or [中文简报指南](references/evidence-brief.zh.md). No new data calls are required merely to write a report.
|
|
15
|
+
|
|
16
|
+
The same guides are available through `get_workflow` with `workflow: "research"` or `workflow: "evidence_brief"`; use `language: "en"` for English.
|
|
17
|
+
|
|
18
|
+
## Available data tools
|
|
19
|
+
|
|
20
|
+
- `search_components`: Search electronic components.
|
|
21
|
+
- `get_component`: Get component details.
|
|
22
|
+
|
|
23
|
+
Inspect `get_tool_info` before each chosen call and follow its actual input schema. Do not invent filters, fields, IDs, cursors or account access. Client-side analysis and supported CSV/Markdown exports use the client's own model and file tools.
|
|
24
|
+
|
|
25
|
+
## Boundaries
|
|
26
|
+
|
|
27
|
+
Keep source links, dates, sample counts and missing values. Separate observations, hypotheses and drafts. Do not infer sales, demand, demographics, safety or financial outcomes from unrelated fields. Stop after uncertain execution or billing and preserve the request ID. Use `search_openany_capabilities` or https://mcp.openany.si/ for capabilities outside this package.
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
# Research rules
|
|
2
|
+
|
|
3
|
+
Inspect get_tool_info before every data tool. Stay within the user's budget. Each tool performs one request; the client chooses subsequent pages. Keep original links, identifiers, collection time, sample size and missing fields. Separate source data, observations, hypotheses and drafts. An empty page is not evidence of zero demand. Stop after an uncertain request; preserve its request ID and inspect the original outcome before another call. Use https://mcp.openany.si/ for unmet capabilities.
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
# Electronic Component Sourcing Research: evidence brief
|
|
2
|
+
|
|
3
|
+
Write from existing outputs of `search_components`, `get_component` or supplied material. Do not collect again merely to write.
|
|
4
|
+
|
|
5
|
+
## Research scope
|
|
6
|
+
|
|
7
|
+
Search electronic component catalogues and inspect distributor part details for BOM sourcing research. State the user's question, the checks actually performed and the remaining coverage gaps.
|
|
8
|
+
|
|
9
|
+
## Contents
|
|
10
|
+
|
|
11
|
+
1. Identify the question, objects, sources and collection dates.
|
|
12
|
+
2. Organize records using these evidence columns: Manufacturer / MPN | Distributor part / URL | Packaging / MOQ | Quantity tier / currency | Source date | Gaps.
|
|
13
|
+
3. Align identities and comparison context before linking observations to sources.
|
|
14
|
+
4. Separate hypotheses, counterexamples, missing fields and the specific follow-up evidence needed.
|
|
15
|
+
5. Use the client's model for original writing; export Markdown/CSV only with its file tools.
|
|
16
|
+
|
|
17
|
+
## Domain scope
|
|
18
|
+
|
|
19
|
+
Research components within the available distributor catalogue. Match manufacturer, MPN, distributor part number and packaging. Keep MOQ, currency and quantity tiers when returned. No cross-distributor price guarantee, ordering or engineering substitution certification is included.
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
# electronic-component-sourcing-mcp:证据简报
|
|
2
|
+
|
|
3
|
+
根据 `search_components`, `get_component` 的已有结果或用户提供材料撰写,不为写简报新增取数。
|
|
4
|
+
|
|
5
|
+
## 研究范围
|
|
6
|
+
|
|
7
|
+
研究范围包括搜索电子元件、读取元件详情。说明用户本次要解决的问题、实际执行的检查和未覆盖项。
|
|
8
|
+
|
|
9
|
+
## 内容
|
|
10
|
+
|
|
11
|
+
1. 标明问题、记录对象、来源和采集日期。
|
|
12
|
+
2. 按以下证据列整理记录:制造商 / MPN | 分销料号 / URL | 包装 / MOQ | 数量阶梯 / 币种 | 来源日期 | 缺口。
|
|
13
|
+
3. 对齐对象和比较口径后撰写观察,并逐项关联到来源。
|
|
14
|
+
4. 分别列出假设、反例、缺失字段及需要补充核查的信息。
|
|
15
|
+
5. 使用客户端模型完成原创写作;有文件工具时再导出 Markdown / CSV。
|
|
16
|
+
|
|
17
|
+
## 领域范围
|
|
18
|
+
|
|
19
|
+
仅研究当前分销目录中的元件。核对制造商、MPN、分销料号和包装,保留实际返回的 MOQ、币种与数量阶梯。不承诺跨分销商最低价,不下单,也不认证替代料工程兼容性。
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
# Electronic Component Sourcing Research: research guide
|
|
2
|
+
|
|
3
|
+
## Task
|
|
4
|
+
|
|
5
|
+
Search electronic component catalogues and inspect distributor part details for BOM sourcing research. Select the tools and scope needed for the user's actual question.
|
|
6
|
+
|
|
7
|
+
## Method
|
|
8
|
+
|
|
9
|
+
Search part numbers, inspect both `exact_matches` and products, and confirm manufacturer/MPN before selecting details. Preserve packaging, MOQ, quantity tiers and currency.
|
|
10
|
+
|
|
11
|
+
1. Establish identifiers, comparison context, sample scope and budget. Available tools: `search_components`, `get_component`; not every question needs all of them.
|
|
12
|
+
2. Use `get_tool_info` for current parameters, nested inputs and prices. Choose follow-up steps from actual records or user-confirmed identifiers.
|
|
13
|
+
3. Execute only needed, authorized requests. Continue with an original-query cursor only when that tool accepts it.
|
|
14
|
+
4. Check object identity, units and timing; retain source records, unknown fields and analysis separately.
|
|
15
|
+
|
|
16
|
+
## Evidence columns
|
|
17
|
+
|
|
18
|
+
Manufacturer / MPN | Distributor part / URL | Packaging / MOQ | Quantity tier / currency | Source date | Gaps
|
|
19
|
+
|
|
20
|
+
## Deliverable
|
|
21
|
+
|
|
22
|
+
Your agent can prepare a part shortlist with identity, price-tier context and engineering questions.
|
|
23
|
+
|
|
24
|
+
## Stop conditions
|
|
25
|
+
|
|
26
|
+
Stop on missing required inputs, mismatched identity, unaffordable cost or uncertain execution/billing. Preserve the original request ID rather than replaying an empty or uncertain result.
|
|
27
|
+
|
|
28
|
+
## Domain scope
|
|
29
|
+
|
|
30
|
+
Research components within the available distributor catalogue. Match manufacturer, MPN, distributor part number and packaging. Keep MOQ, currency and quantity tiers when returned. No cross-distributor price guarantee, ordering or engineering substitution certification is included.
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
# electronic-component-sourcing-mcp:领域调研
|
|
2
|
+
|
|
3
|
+
## 任务
|
|
4
|
+
|
|
5
|
+
研究范围包括搜索电子元件、读取元件详情。根据用户实际问题选择需要的工具和范围。
|
|
6
|
+
|
|
7
|
+
## 方法
|
|
8
|
+
|
|
9
|
+
搜索料号,同时检查 `exact_matches` 和 products,选择详情前确认制造商与 MPN,保留包装、MOQ、数量阶梯与币种。
|
|
10
|
+
|
|
11
|
+
1. 先明确对象标识、比较口径、采样范围与预算,可选工具为 `search_components`, `get_component`,不要求每次全部调用。
|
|
12
|
+
2. 使用 `get_tool_info` 查看当前参数、嵌套输入和价格;按真实结果或用户确认的标识选择后续步骤。
|
|
13
|
+
3. 仅执行本任务需要且已获授权的请求;只有对应工具接受游标时才沿原查询的真实游标继续。
|
|
14
|
+
4. 核对对象、单位和时间背景,将来源记录、未知字段与分析分别保留。
|
|
15
|
+
|
|
16
|
+
## 证据列
|
|
17
|
+
|
|
18
|
+
制造商 / MPN | 分销料号 / URL | 包装 / MOQ | 数量阶梯 / 币种 | 来源日期 | 缺口
|
|
19
|
+
|
|
20
|
+
## 交付
|
|
21
|
+
|
|
22
|
+
可交付的成果包括:含身份、阶梯价背景与工程问题的元件清单。
|
|
23
|
+
|
|
24
|
+
## 停止条件
|
|
25
|
+
|
|
26
|
+
缺少必填输入、对象不匹配、费用超出预算,或执行/收费状态不明时停止;保留原请求标识,不重试来掩盖空结果。
|
|
27
|
+
|
|
28
|
+
## 领域范围
|
|
29
|
+
|
|
30
|
+
仅研究当前分销目录中的元件。核对制造商、MPN、分销料号和包装,保留实际返回的 MOQ、币种与数量阶梯。不承诺跨分销商最低价,不下单,也不认证替代料工程兼容性。
|
package/src/config.js
ADDED
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
import { readFile } from 'node:fs/promises';
|
|
2
|
+
|
|
3
|
+
export async function loadDefinition(root = new URL('../', import.meta.url)) {
|
|
4
|
+
const read = async path => {
|
|
5
|
+
const text = await readFile(new URL(path, root), 'utf8');
|
|
6
|
+
if (!text.trim()) throw new Error(`Empty bundled asset: ${path}`);
|
|
7
|
+
return text;
|
|
8
|
+
};
|
|
9
|
+
const manifest = JSON.parse(await read('package.json'));
|
|
10
|
+
const config = JSON.parse(await read('vertical.config.json'));
|
|
11
|
+
if (config.packageName !== manifest.name || !manifest.version || !config.instructions?.trim() ||
|
|
12
|
+
!Array.isArray(config.bindings) || !config.bindings.length ||
|
|
13
|
+
new Set(config.bindings.map(x => x.name)).size !== config.bindings.length ||
|
|
14
|
+
!Array.isArray(config.workflows) || !config.workflows.length) throw new Error('Invalid bundled configuration.');
|
|
15
|
+
const commonRules = {};
|
|
16
|
+
for (const language of ['zh', 'en']) {
|
|
17
|
+
const path = `workflows/common.${language}.md`;
|
|
18
|
+
if (config.commonRules?.[language] !== path) throw new Error('Invalid common guide path.');
|
|
19
|
+
commonRules[language] = await read(path);
|
|
20
|
+
}
|
|
21
|
+
const ids = new Set(), filenames = new Set(['common']), workflows = [];
|
|
22
|
+
for (const item of config.workflows) {
|
|
23
|
+
const filename = String(item.id).replaceAll('_', '-');
|
|
24
|
+
if (!/^[a-z][a-z0-9_-]{0,63}$/.test(item.id) || filenames.has(filename) || ids.has(item.id) || !item.version) throw new Error('Invalid workflow.');
|
|
25
|
+
ids.add(item.id);
|
|
26
|
+
filenames.add(filename);
|
|
27
|
+
const instructions = {};
|
|
28
|
+
for (const language of ['zh', 'en']) {
|
|
29
|
+
const path = `workflows/${filename}.${language}.md`;
|
|
30
|
+
if (item.files?.[language] !== path) throw new Error('Invalid workflow path.');
|
|
31
|
+
instructions[language] = await read(path);
|
|
32
|
+
}
|
|
33
|
+
workflows.push({ id: item.id, version: item.version, instructions });
|
|
34
|
+
}
|
|
35
|
+
return { bindings: config.bindings, workflows, commonRules, instructions: config.instructions,
|
|
36
|
+
serverInfo: { name: manifest.name, version: manifest.version } };
|
|
37
|
+
}
|
package/src/server.js
ADDED
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { createClient } from '@openanysi/openany-core';
|
|
2
|
+
import { createMcpServer, startStdioServer } from '@openanysi/openany-core/mcp';
|
|
3
|
+
import { loadDefinition } from './config.js';
|
|
4
|
+
|
|
5
|
+
export async function createServer({ clientOptions = {}, stdio = false } = {}) {
|
|
6
|
+
const { bindings, serverInfo, instructions, workflows, commonRules } = await loadDefinition();
|
|
7
|
+
const client = createClient({ ...clientOptions, bindings });
|
|
8
|
+
let server;
|
|
9
|
+
try {
|
|
10
|
+
const options = { ...serverInfo, instructions, workflows, commonRules };
|
|
11
|
+
server = stdio ? await startStdioServer(client, options) : createMcpServer(client, options);
|
|
12
|
+
} catch (error) { await client.close(); throw error; }
|
|
13
|
+
let closing;
|
|
14
|
+
const close = () => closing ??= Promise.resolve().then(async () => {
|
|
15
|
+
try { await server.close(); } finally { await client.close(); }
|
|
16
|
+
});
|
|
17
|
+
return { client, server, close };
|
|
18
|
+
}
|