@openanysi/electronic-component-sourcing-mcp 0.0.0-stage → 0.1.0
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 +217 -2
- package/bin/server.js +18 -0
- package/docs/README.zh-CN.md +216 -0
- package/package.json +62 -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 +23 -0
- package/skills/electronic-component-sourcing/references/evidence-brief.zh.md +23 -0
- package/skills/electronic-component-sourcing/references/research.en.md +31 -0
- package/skills/electronic-component-sourcing/references/research.zh.md +29 -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 +23 -0
- package/workflows/evidence-brief.zh.md +23 -0
- package/workflows/research.en.md +31 -0
- package/workflows/research.zh.md +29 -0
package/CONTRIBUTING.md
ADDED
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
# Contributing
|
|
2
|
+
|
|
3
|
+
Use Node.js 22 or later. In the monorepo, install dependencies from the repository root and select the relevant workspace:
|
|
4
|
+
|
|
5
|
+
```sh
|
|
6
|
+
npm ci --ignore-scripts
|
|
7
|
+
npm test --workspace @openanysi/<slug>
|
|
8
|
+
npm run check --workspace @openanysi/<slug>
|
|
9
|
+
npm run smoke:package --workspace @openanysi/<slug>
|
|
10
|
+
```
|
|
11
|
+
|
|
12
|
+
Replace `<slug>` with the package's actual name. The monorepo uses `packages/*` and a shared root lockfile; do not generate a child lockfile or initialize Git inside each package. For a standalone checkout, run the package's scripts without `--workspace`. Package smoke verifies the governing lockfile and manifest files remain unchanged.
|
|
13
|
+
|
|
14
|
+
## Runtime and tool changes
|
|
15
|
+
|
|
16
|
+
The package maps atomic tools to current OpenAny API contracts through the shared SDK. Keep credentials, contract versions, transport, error handling and referrals in that SDK. Read the installed SDK's exports and types before changing integration code; inspect its installed version with `npm ls @openanysi/openany-core`.
|
|
17
|
+
|
|
18
|
+
Update the tool configuration, contract fixtures, relevant guides and public tool table together. Preserve required inputs and input mappings. The client controls combinations, sampling, each page, analysis and export. A replacement API with a different output scope needs an explicit tool/guide change.
|
|
19
|
+
|
|
20
|
+
## Guides and optional companion Skills
|
|
21
|
+
|
|
22
|
+
Maintain both English and Chinese task guides. When a companion Skill is included, keep its references and generated MCP guides synchronized using the package's declared commands; otherwise edit the bundled guides directly. Do not document a command that the package does not provide. A bundled Skill is optional and does not automatically connect an MCP.
|
|
23
|
+
|
|
24
|
+
Check the current runtime's actual workflow-language default. English examples should explicitly select `language: "en"`. Updating prose does not change a runtime default.
|
|
25
|
+
|
|
26
|
+
## Public documentation
|
|
27
|
+
|
|
28
|
+
Keep the README focused on tasks, setup, tool parameters and one short Limitations & Billing section. Use supplier-neutral copy. Put implementation instructions here and private test results outside public-facing documentation. Keep genuine source and billing evidence available for maintainers without presenting it as marketing copy.
|
|
29
|
+
|
|
30
|
+
Use unversioned scoped npx examples and credential placeholders. Link to OpenAny key setup and current pricing. Separate utility-only no-key trials from paid data prompts. README relative links must exist in the npm tarball; use absolute public URLs for repository-only material.
|
|
31
|
+
|
|
32
|
+
## Verification and packaging
|
|
33
|
+
|
|
34
|
+
Local tests use captured contracts and clearly synthetic business responses. They verify protocol behavior and mapping; they do not establish supplier availability. Real calls require the task's existing authorization and private credentials. Preserve unknown outcomes and check original request IDs before another paid request. Do not replay calls for timing samples.
|
|
35
|
+
|
|
36
|
+
Package smoke installs a temporary tarball outside the checkout. It checks assets, documentation links, startup and guides without making paid business calls. If offline dependency metadata is missing, prepare an isolated npm cache rather than changing the user's default cache or bypassing checks.
|
|
37
|
+
|
|
38
|
+
Run anonymous live or public-release checks only when the package provides the relevant command or the authoring toolkit is available. Record exact versions and results privately. A local tarball test, registry check, npm-page render and real provider read are separate evidence.
|
|
39
|
+
|
|
40
|
+
## Release
|
|
41
|
+
|
|
42
|
+
Review package name, version, bin, dependency source, license, tarball contents and README. Preserve fixed dependency versions in package metadata without repeating them in public copy. npm README content changes with a new published version; a Git push alone does not refresh it.
|
|
43
|
+
|
|
44
|
+
Complete local checks and obtain approval for the specific package and version before publishing. Keep publishing credentials in private process configuration, outside the repository and tarball. After publishing, verify the exact public registry version, packaged documentation and a clean public installation, then update the release tracker with actual results. A staged version or an incomplete registry verification remains pending. If tracker writeback fails, retry that step without publishing the package again.
|
|
45
|
+
|
|
46
|
+
From the monorepo root, publish only the approved package with `npm publish --workspace @openanysi/<slug> --access public`. The private root package is not a release artifact. Keep `repository.directory` set to `packages/<slug>` and avoid publishing unrelated workspaces.
|
|
47
|
+
|
|
48
|
+
## Companion Skill
|
|
49
|
+
|
|
50
|
+
Edit the canonical files in `workflows/`, then run `npm run sync:skill` in this workspace. `npm run check` verifies that the packaged companion references match those canonical files. Keep user keys and business verification records outside the package.
|
package/LICENSE
ADDED
|
@@ -0,0 +1,201 @@
|
|
|
1
|
+
Apache License
|
|
2
|
+
Version 2.0, January 2004
|
|
3
|
+
http://www.apache.org/licenses/
|
|
4
|
+
|
|
5
|
+
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
|
|
6
|
+
|
|
7
|
+
1. Definitions.
|
|
8
|
+
|
|
9
|
+
"License" shall mean the terms and conditions for use, reproduction,
|
|
10
|
+
and distribution as defined by Sections 1 through 9 of this document.
|
|
11
|
+
|
|
12
|
+
"Licensor" shall mean the copyright owner or entity authorized by
|
|
13
|
+
the copyright owner that is granting the License.
|
|
14
|
+
|
|
15
|
+
"Legal Entity" shall mean the union of the acting entity and all
|
|
16
|
+
other entities that control, are controlled by, or are under common
|
|
17
|
+
control with that entity. For the purposes of this definition,
|
|
18
|
+
"control" means (i) the power, direct or indirect, to cause the
|
|
19
|
+
direction or management of such entity, whether by contract or
|
|
20
|
+
otherwise, or (ii) ownership of fifty percent (50%) or more of the
|
|
21
|
+
outstanding shares, or (iii) beneficial ownership of such entity.
|
|
22
|
+
|
|
23
|
+
"You" (or "Your") shall mean an individual or Legal Entity
|
|
24
|
+
exercising permissions granted by this License.
|
|
25
|
+
|
|
26
|
+
"Source" form shall mean the preferred form for making modifications,
|
|
27
|
+
including but not limited to software source code, documentation
|
|
28
|
+
source, and configuration files.
|
|
29
|
+
|
|
30
|
+
"Object" form shall mean any form resulting from mechanical
|
|
31
|
+
transformation or translation of a Source form, including but
|
|
32
|
+
not limited to compiled object code, generated documentation,
|
|
33
|
+
and conversions to other media types.
|
|
34
|
+
|
|
35
|
+
"Work" shall mean the work of authorship, whether in Source or
|
|
36
|
+
Object form, made available under the License, as indicated by a
|
|
37
|
+
copyright notice that is included in or attached to the work
|
|
38
|
+
(an example is provided in the Appendix below).
|
|
39
|
+
|
|
40
|
+
"Derivative Works" shall mean any work, whether in Source or Object
|
|
41
|
+
form, that is based on (or derived from) the Work and for which the
|
|
42
|
+
editorial revisions, annotations, elaborations, or other modifications
|
|
43
|
+
represent, as a whole, an original work of authorship. For the purposes
|
|
44
|
+
of this License, Derivative Works shall not include works that remain
|
|
45
|
+
separable from, or merely link (or bind by name) to the interfaces of,
|
|
46
|
+
the Work and Derivative Works thereof.
|
|
47
|
+
|
|
48
|
+
"Contribution" shall mean any work of authorship, including
|
|
49
|
+
the original version of the Work and any modifications or additions
|
|
50
|
+
to that Work or Derivative Works thereof, that is intentionally
|
|
51
|
+
submitted to Licensor for inclusion in the Work by the copyright owner
|
|
52
|
+
or by an individual or Legal Entity authorized to submit on behalf of
|
|
53
|
+
the copyright owner. For the purposes of this definition, "submitted"
|
|
54
|
+
means any form of electronic, verbal, or written communication sent
|
|
55
|
+
to the Licensor or its representatives, including but not limited to
|
|
56
|
+
communication on electronic mailing lists, source code control systems,
|
|
57
|
+
and issue tracking systems that are managed by, or on behalf of, the
|
|
58
|
+
Licensor for the purpose of discussing and improving the Work, but
|
|
59
|
+
excluding communication that is conspicuously marked or otherwise
|
|
60
|
+
designated in writing by the copyright owner as "Not a Contribution."
|
|
61
|
+
|
|
62
|
+
"Contributor" shall mean Licensor and any individual or Legal Entity
|
|
63
|
+
on behalf of whom a Contribution has been received by Licensor and
|
|
64
|
+
subsequently incorporated within the Work.
|
|
65
|
+
|
|
66
|
+
2. Grant of Copyright License. Subject to the terms and conditions of
|
|
67
|
+
this License, each Contributor hereby grants to You a perpetual,
|
|
68
|
+
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
|
69
|
+
copyright license to reproduce, prepare Derivative Works of,
|
|
70
|
+
publicly display, publicly perform, sublicense, and distribute the
|
|
71
|
+
Work and such Derivative Works in Source or Object form.
|
|
72
|
+
|
|
73
|
+
3. Grant of Patent License. Subject to the terms and conditions of
|
|
74
|
+
this License, each Contributor hereby grants to You a perpetual,
|
|
75
|
+
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
|
76
|
+
(except as stated in this section) patent license to make, have made,
|
|
77
|
+
use, offer to sell, sell, import, and otherwise transfer the Work,
|
|
78
|
+
where such license applies only to those patent claims licensable
|
|
79
|
+
by such Contributor that are necessarily infringed by their
|
|
80
|
+
Contribution(s) alone or by combination of their Contribution(s)
|
|
81
|
+
with the Work to which such Contribution(s) was submitted. If You
|
|
82
|
+
institute patent litigation against any entity (including a
|
|
83
|
+
cross-claim or counterclaim in a lawsuit) alleging that the Work
|
|
84
|
+
or a Contribution incorporated within the Work constitutes direct
|
|
85
|
+
or contributory patent infringement, then any patent licenses
|
|
86
|
+
granted to You under this License for that Work shall terminate
|
|
87
|
+
as of the date such litigation is filed.
|
|
88
|
+
|
|
89
|
+
4. Redistribution. You may reproduce and distribute copies of the
|
|
90
|
+
Work or Derivative Works thereof in any medium, with or without
|
|
91
|
+
modifications, and in Source or Object form, provided that You
|
|
92
|
+
meet the following conditions:
|
|
93
|
+
|
|
94
|
+
(a) You must give any other recipients of the Work or
|
|
95
|
+
Derivative Works a copy of this License; and
|
|
96
|
+
|
|
97
|
+
(b) You must cause any modified files to carry prominent notices
|
|
98
|
+
stating that You changed the files; and
|
|
99
|
+
|
|
100
|
+
(c) You must retain, in the Source form of any Derivative Works
|
|
101
|
+
that You distribute, all copyright, patent, trademark, and
|
|
102
|
+
attribution notices from the Source form of the Work,
|
|
103
|
+
excluding those notices that do not pertain to any part of
|
|
104
|
+
the Derivative Works; and
|
|
105
|
+
|
|
106
|
+
(d) If the Work includes a "NOTICE" text file as part of its
|
|
107
|
+
distribution, then any Derivative Works that You distribute must
|
|
108
|
+
include a readable copy of the attribution notices contained
|
|
109
|
+
within such NOTICE file, excluding those notices that do not
|
|
110
|
+
pertain to any part of the Derivative Works, in at least one
|
|
111
|
+
of the following places: within a NOTICE text file distributed
|
|
112
|
+
as part of the Derivative Works; within the Source form or
|
|
113
|
+
documentation, if provided along with the Derivative Works; or,
|
|
114
|
+
within a display generated by the Derivative Works, if and
|
|
115
|
+
wherever such third-party notices normally appear. The contents
|
|
116
|
+
of the NOTICE file are for informational purposes only and
|
|
117
|
+
do not modify the License. You may add Your own attribution
|
|
118
|
+
notices within Derivative Works that You distribute, alongside
|
|
119
|
+
or as an addendum to the NOTICE text from the Work, provided
|
|
120
|
+
that such additional attribution notices cannot be construed
|
|
121
|
+
as modifying the License.
|
|
122
|
+
|
|
123
|
+
You may add Your own copyright statement to Your modifications and
|
|
124
|
+
may provide additional or different license terms and conditions
|
|
125
|
+
for use, reproduction, or distribution of Your modifications, or
|
|
126
|
+
for any such Derivative Works as a whole, provided Your use,
|
|
127
|
+
reproduction, and distribution of the Work otherwise complies with
|
|
128
|
+
the conditions stated in this License.
|
|
129
|
+
|
|
130
|
+
5. Submission of Contributions. Unless You explicitly state otherwise,
|
|
131
|
+
any Contribution intentionally submitted for inclusion in the Work
|
|
132
|
+
by You to the Licensor shall be under the terms and conditions of
|
|
133
|
+
this License, without any additional terms or conditions.
|
|
134
|
+
Notwithstanding the above, nothing herein shall supersede or modify
|
|
135
|
+
the terms of any separate license agreement you may have executed
|
|
136
|
+
with Licensor regarding such Contributions.
|
|
137
|
+
|
|
138
|
+
6. Trademarks. This License does not grant permission to use the trade
|
|
139
|
+
names, trademarks, service marks, or product names of the Licensor,
|
|
140
|
+
except as required for reasonable and customary use in describing the
|
|
141
|
+
origin of the Work and reproducing the content of the NOTICE file.
|
|
142
|
+
|
|
143
|
+
7. Disclaimer of Warranty. Unless required by applicable law or
|
|
144
|
+
agreed to in writing, Licensor provides the Work (and each
|
|
145
|
+
Contributor provides its Contributions) on an "AS IS" BASIS,
|
|
146
|
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
|
|
147
|
+
implied, including, without limitation, any warranties or conditions
|
|
148
|
+
of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
|
|
149
|
+
PARTICULAR PURPOSE. You are solely responsible for determining the
|
|
150
|
+
appropriateness of using or redistributing the Work and assume any
|
|
151
|
+
risks associated with Your exercise of permissions under this License.
|
|
152
|
+
|
|
153
|
+
8. Limitation of Liability. In no event and under no legal theory,
|
|
154
|
+
whether in tort (including negligence), contract, or otherwise,
|
|
155
|
+
unless required by applicable law (such as deliberate and grossly
|
|
156
|
+
negligent acts) or agreed to in writing, shall any Contributor be
|
|
157
|
+
liable to You for damages, including any direct, indirect, special,
|
|
158
|
+
incidental, or consequential damages of any character arising as a
|
|
159
|
+
result of this License or out of the use or inability to use the
|
|
160
|
+
Work (including but not limited to damages for loss of goodwill,
|
|
161
|
+
work stoppage, computer failure or malfunction, or any and all
|
|
162
|
+
other commercial damages or losses), even if such Contributor
|
|
163
|
+
has been advised of the possibility of such damages.
|
|
164
|
+
|
|
165
|
+
9. Accepting Warranty or Additional Liability. While redistributing
|
|
166
|
+
the Work or Derivative Works thereof, You may choose to offer,
|
|
167
|
+
and charge a fee for, acceptance of support, warranty, indemnity,
|
|
168
|
+
or other liability obligations and/or rights consistent with this
|
|
169
|
+
License. However, in accepting such obligations, You may act only
|
|
170
|
+
on Your own behalf and on Your sole responsibility, not on behalf
|
|
171
|
+
of any other Contributor, and only if You agree to indemnify,
|
|
172
|
+
defend, and hold each Contributor harmless for any liability
|
|
173
|
+
incurred by, or claims asserted against, such Contributor by reason
|
|
174
|
+
of your accepting any such warranty or additional liability.
|
|
175
|
+
|
|
176
|
+
END OF TERMS AND CONDITIONS
|
|
177
|
+
|
|
178
|
+
APPENDIX: How to apply the Apache License to your work.
|
|
179
|
+
|
|
180
|
+
To apply the Apache License to your work, attach the following
|
|
181
|
+
boilerplate notice, with the fields enclosed by brackets "[]"
|
|
182
|
+
replaced with your own identifying information. (Don't include
|
|
183
|
+
the brackets!) The text should be enclosed in the appropriate
|
|
184
|
+
comment syntax for the file format. We also recommend that a
|
|
185
|
+
file or class name and description of purpose be included on the
|
|
186
|
+
same "printed page" as the copyright notice for easier
|
|
187
|
+
identification within third-party archives.
|
|
188
|
+
|
|
189
|
+
Copyright [yyyy] [name of copyright owner]
|
|
190
|
+
|
|
191
|
+
Licensed under the Apache License, Version 2.0 (the "License");
|
|
192
|
+
you may not use this file except in compliance with the License.
|
|
193
|
+
You may obtain a copy of the License at
|
|
194
|
+
|
|
195
|
+
http://www.apache.org/licenses/LICENSE-2.0
|
|
196
|
+
|
|
197
|
+
Unless required by applicable law or agreed to in writing, software
|
|
198
|
+
distributed under the License is distributed on an "AS IS" BASIS,
|
|
199
|
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
200
|
+
See the License for the specific language governing permissions and
|
|
201
|
+
limitations under the License.
|
package/README.md
CHANGED
|
@@ -1,3 +1,218 @@
|
|
|
1
|
-
#
|
|
1
|
+
# electronic-component-sourcing-mcp: Electronic Component Sourcing Research MCP
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
MCP 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/).
|
|
4
|
+
|
|
5
|
+
[](https://www.npmjs.com/package/@openanysi/electronic-component-sourcing-mcp)
|
|
6
|
+
[](LICENSE)
|
|
7
|
+
[](https://nodejs.org/)
|
|
8
|
+
|
|
9
|
+
English | [简体中文](docs/README.zh-CN.md)
|
|
10
|
+
|
|
11
|
+
## Overview
|
|
12
|
+
|
|
13
|
+
Search electronic component catalogues and inspect distributor part details for BOM sourcing research. The server provides 2 read-only data tools and three free utility tools over local `stdio`. Your client agent selects calls, interprets evidence and writes reports using its own model. Supply the identifiers and filters listed in Tools Reference; each data call remains independent.
|
|
14
|
+
|
|
15
|
+
**Best For / Not For**
|
|
16
|
+
|
|
17
|
+
- **Best For:** sourced comparisons within the supported platform and task scope.
|
|
18
|
+
- **Best For:** turning available records into an evidence table and research brief in Claude, Cursor or another MCP client.
|
|
19
|
+
- **Best For:** analyzing supplied outputs without additional data calls.
|
|
20
|
+
- **Not For:** account automation, publishing, purchases or hidden multi-request workflows.
|
|
21
|
+
- **Not For:** complete population statistics or claims unsupported by the collected sample.
|
|
22
|
+
|
|
23
|
+
## Table of Contents
|
|
24
|
+
|
|
25
|
+
- [Quick Start](#quick-start)
|
|
26
|
+
- [Key Features](#key-features)
|
|
27
|
+
- [Example Prompts](#example-prompts)
|
|
28
|
+
- [Why electronic-component-sourcing-mcp?](#why-electronic-component-sourcing-mcp)
|
|
29
|
+
- [What You Can Build & Deliver](#what-you-can-build--deliver)
|
|
30
|
+
- [Tools Reference](#tools-reference)
|
|
31
|
+
- [Built-in Workflow Guides](#built-in-workflow-guides)
|
|
32
|
+
- [End-to-End Example](#end-to-end-example)
|
|
33
|
+
- [FAQ](#faq)
|
|
34
|
+
- [Error Handling & Retries](#error-handling--retries)
|
|
35
|
+
- [Scope, Data & Billing Notes](#scope-data--billing-notes)
|
|
36
|
+
- [Development](#development)
|
|
37
|
+
- [About OpenAny](#about-openany)
|
|
38
|
+
- [License](#license)
|
|
39
|
+
|
|
40
|
+
## Quick Start
|
|
41
|
+
|
|
42
|
+
### Prerequisites
|
|
43
|
+
|
|
44
|
+
- Node.js 22+ and a client supporting local `stdio` MCP servers.
|
|
45
|
+
- 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).
|
|
46
|
+
- Utility tools work without a key.
|
|
47
|
+
|
|
48
|
+
### Configure Your Client
|
|
49
|
+
|
|
50
|
+
For clients using `mcpServers`, add this to private settings. Other hosts register the same command, arguments and environment through their MCP settings or CLI.
|
|
51
|
+
|
|
52
|
+
```json
|
|
53
|
+
{
|
|
54
|
+
"mcpServers": {
|
|
55
|
+
"electronic-component-sourcing-mcp": {
|
|
56
|
+
"command": "npx",
|
|
57
|
+
"args": [
|
|
58
|
+
"-y",
|
|
59
|
+
"@openanysi/electronic-component-sourcing-mcp"
|
|
60
|
+
],
|
|
61
|
+
"env": {
|
|
62
|
+
"OPENANY_API_KEY": "YOUR_OPENANY_API_KEY"
|
|
63
|
+
}
|
|
64
|
+
}
|
|
65
|
+
}
|
|
66
|
+
}
|
|
67
|
+
```
|
|
68
|
+
|
|
69
|
+
Store `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.
|
|
70
|
+
|
|
71
|
+
### Verify It Works
|
|
72
|
+
|
|
73
|
+
- **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.
|
|
74
|
+
- **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.
|
|
75
|
+
|
|
76
|
+
## Key Features
|
|
77
|
+
|
|
78
|
+
- 2 atomic tools for the operations listed below.
|
|
79
|
+
- Current parameters and prices available through `get_tool_info`.
|
|
80
|
+
- Two English/Chinese workflow guides for research and evidence briefs.
|
|
81
|
+
- A packaged optional companion Skill using the same guide texts.
|
|
82
|
+
- Client-controlled pagination, comparisons and supported CSV/Markdown exports.
|
|
83
|
+
- Broader capability discovery through the OpenAny catalog.
|
|
84
|
+
|
|
85
|
+
## Example Prompts
|
|
86
|
+
|
|
87
|
+
- "Search my component part number, distinguish manufacturers, and inspect one matching product. Compare packaging and quantity tiers before interpreting unit prices."
|
|
88
|
+
- "Compare the records returned by the relevant tools; keep identifiers, dates and missing values."
|
|
89
|
+
- "Turn the collected sample into an evidence brief. Separate observations from hypotheses."
|
|
90
|
+
- "Use only the results I provide. Make no new data calls; organize them into a comparison table."
|
|
91
|
+
|
|
92
|
+
## Why electronic-component-sourcing-mcp?
|
|
93
|
+
|
|
94
|
+
| What You Care About | How We Handle It | Value to You |
|
|
95
|
+
| --- | --- | --- |
|
|
96
|
+
| Focused scope | Read-only tools for one research domain | A small, inspectable tool set |
|
|
97
|
+
| Spending control | Read current pricing before individual requests | Explicit decisions about each paid call |
|
|
98
|
+
| Evidence quality | Preserve source records and sample limits | Reviewable comparisons and briefs |
|
|
99
|
+
| Flexible reporting | Your client performs analysis and writing | Use your chosen model and file tools |
|
|
100
|
+
|
|
101
|
+
## What You Can Build & Deliver
|
|
102
|
+
|
|
103
|
+
| Use Case | How the Agent Runs It | Typical Deliverables |
|
|
104
|
+
| --- | --- | --- |
|
|
105
|
+
| Source collection | Select the relevant tools and request a bounded sample | Linked evidence table |
|
|
106
|
+
| Comparative research | Compare matching records and their scope | Comparison table with missing fields |
|
|
107
|
+
| Evidence brief | Load `evidence_brief` and analyze existing outputs | Markdown brief and next questions |
|
|
108
|
+
|
|
109
|
+
## Tools Reference
|
|
110
|
+
|
|
111
|
+
The 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.
|
|
112
|
+
|
|
113
|
+
### Data Tools
|
|
114
|
+
|
|
115
|
+
| Tool | Parameters | Behavior | Typical Returned Fields |
|
|
116
|
+
| --- | --- | --- | --- |
|
|
117
|
+
| `search_components` | `query` (string, required) | Search electronic components | `exact_matches`, `products`, `manufacturer`, `manufacturer_part_number`, `url`; provider-dependent; optional fields may be absent. |
|
|
118
|
+
| `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. |
|
|
119
|
+
|
|
120
|
+
Responses 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.
|
|
121
|
+
|
|
122
|
+
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.
|
|
123
|
+
|
|
124
|
+
Supply `url`, `distributor_part_number`, or both `manufacturer_part_number` and `manufacturer`.
|
|
125
|
+
|
|
126
|
+
`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.
|
|
127
|
+
|
|
128
|
+
### Utility Tools (Free, No API Key Required)
|
|
129
|
+
|
|
130
|
+
| Tool | Parameters | Behavior |
|
|
131
|
+
| --- | --- | --- |
|
|
132
|
+
| `get_tool_info` | Required `tool_name` from the data-tool names above | Read current parameters, pricing and limits |
|
|
133
|
+
| `get_workflow` | Required `workflow`; optional `language` (`zh` or `en`, default `zh`) | Return a guide; use `language: "en"` for English |
|
|
134
|
+
| `search_openany_capabilities` | Required `query` (1-256 characters); optional `limit` (1-10, default 5) | Search related capabilities without executing them |
|
|
135
|
+
|
|
136
|
+
## Built-in Workflow Guides
|
|
137
|
+
|
|
138
|
+
`get_workflow` returns instructions and templates for your client. It makes no data or model call and does not itself generate a report.
|
|
139
|
+
|
|
140
|
+
| Guide ID | Best For | What It Provides |
|
|
141
|
+
| --- | --- | --- |
|
|
142
|
+
| `research` | Planning and collecting a scoped sample | Call selection, identifier checks and an evidence-table template |
|
|
143
|
+
| `evidence_brief` | Reporting from collected or supplied records | Sourced findings, gaps and next questions |
|
|
144
|
+
|
|
145
|
+
### Companion Skill (Optional)
|
|
146
|
+
|
|
147
|
+
The [companion Skill](skills/electronic-component-sourcing/SKILL.md) contains the same bilingual guides. Install that directory only if your client supports Skills. The MCP guides remain usable independently.
|
|
148
|
+
|
|
149
|
+
## End-to-End Example
|
|
150
|
+
|
|
151
|
+
**Prompt:** "Search my component part number, distinguish manufacturers, and inspect one matching product. Compare packaging and quantity tiers before interpreting unit prices."
|
|
152
|
+
|
|
153
|
+
**How the Agent Executes:**
|
|
154
|
+
|
|
155
|
+
1. Load `research` with `language: "en"` and clarify the question, identifiers and budget.
|
|
156
|
+
2. Inspect `get_tool_info` for each selected data tool.
|
|
157
|
+
3. Make the approved individual calls. Reuse identifiers only after inspecting the actual returned records.
|
|
158
|
+
4. Preserve sources and missing fields, then load `evidence_brief` to summarize observations and hypotheses.
|
|
159
|
+
5. Write Markdown or CSV locally if the client provides file tools.
|
|
160
|
+
|
|
161
|
+
## FAQ
|
|
162
|
+
|
|
163
|
+
### How much does electronic-component-sourcing-mcp cost?
|
|
164
|
+
|
|
165
|
+
The Apache-2.0 package is free to use. The 3 utility tools are free and keyless; the 2 data tools follow current OpenAny API pricing. Inspect `get_tool_info` before calling. Your client's model costs are separate.
|
|
166
|
+
|
|
167
|
+
### Does it work with Cursor, Claude Desktop and Claude Code?
|
|
168
|
+
|
|
169
|
+
Yes, it uses standard local `stdio` MCP. The JSON above applies to hosts using `mcpServers`; other clients register the same launch command through their own settings.
|
|
170
|
+
|
|
171
|
+
### Can I try it without an API key?
|
|
172
|
+
|
|
173
|
+
Yes. Use the three utility tools to read parameters, guides and capability candidates. Data requests require `OPENANY_API_KEY`.
|
|
174
|
+
|
|
175
|
+
### Does the MCP write the final report?
|
|
176
|
+
|
|
177
|
+
Your client agent writes the report. `get_workflow` supplies instructions and a template; data tools supply the evidence.
|
|
178
|
+
|
|
179
|
+
### Does it paginate or retry automatically?
|
|
180
|
+
|
|
181
|
+
No. The client selects each subsequent page, and uncertain requests are not replayed automatically. Keep cursors within their original operation and query context.
|
|
182
|
+
|
|
183
|
+
### What if I need another capability?
|
|
184
|
+
|
|
185
|
+
Use `search_openany_capabilities` or connect the general [OpenAny MCP](https://mcp.openany.si/). Discovery does not automatically execute or install another service.
|
|
186
|
+
|
|
187
|
+
### How should I handle timeouts?
|
|
188
|
+
|
|
189
|
+
Keep the request ID and check the original outcome before another call. A missing final response does not prove that the request was uncharged.
|
|
190
|
+
|
|
191
|
+
## Error Handling & Retries
|
|
192
|
+
|
|
193
|
+
| Execution State | Typical Indicators | Billed? | Safe to Retry? |
|
|
194
|
+
| --- | --- | --- | --- |
|
|
195
|
+
| **Failed** | Input or credential rejection before dispatch | No | After correcting the input |
|
|
196
|
+
| **Succeeded** | Returned business data | According to the selected API's billing rule | Do not resubmit the same request |
|
|
197
|
+
| **Uncertain / Timeout** | Final result was not received | Unknown | Check the original request first |
|
|
198
|
+
|
|
199
|
+
## Scope, Data & Billing Notes
|
|
200
|
+
|
|
201
|
+
- **Execution & Billing:** Each call is inspected and executed separately. Empty results may incur a charge when the selected rule applies.
|
|
202
|
+
- **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.
|
|
203
|
+
- **Reporting Standards:** Separate source data, observations, hypotheses and drafts. Mark unavailable facts as unknown.
|
|
204
|
+
- **Network & Privacy:** The server runs locally; catalog queries and business inputs are sent to OpenAny.
|
|
205
|
+
|
|
206
|
+
## Development
|
|
207
|
+
|
|
208
|
+
See [CONTRIBUTING.md](CONTRIBUTING.md) for setup, verification and guide maintenance.
|
|
209
|
+
|
|
210
|
+
## About OpenAny
|
|
211
|
+
|
|
212
|
+
[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.
|
|
213
|
+
|
|
214
|
+
Discover additional capabilities with `search_openany_capabilities` or connect the general [OpenAny MCP](https://mcp.openany.si/).
|
|
215
|
+
|
|
216
|
+
## License
|
|
217
|
+
|
|
218
|
+
[Apache-2.0](LICENSE)
|
package/bin/server.js
ADDED
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
import { createServer } from '../src/server.js';
|
|
3
|
+
|
|
4
|
+
try {
|
|
5
|
+
const handle = await createServer({ stdio: true });
|
|
6
|
+
const shutdown = () => {
|
|
7
|
+
void handle.close().catch(() => {
|
|
8
|
+
process.stderr.write('MCP shutdown failed.\n');
|
|
9
|
+
process.exitCode = 1;
|
|
10
|
+
});
|
|
11
|
+
};
|
|
12
|
+
process.once('SIGINT', shutdown);
|
|
13
|
+
process.once('SIGTERM', shutdown);
|
|
14
|
+
handle.server.server.onclose = shutdown;
|
|
15
|
+
} catch {
|
|
16
|
+
process.stderr.write('MCP startup failed; check the package assets and supported Node.js version.\n');
|
|
17
|
+
process.exitCode = 1;
|
|
18
|
+
}
|
|
@@ -0,0 +1,216 @@
|
|
|
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
|
+
本包包含 2 个只读数据工具和三个免费辅助工具。每个数据工具执行一个独立请求,采样、分页、标识衔接和下一步由客户端决定。
|
|
14
|
+
|
|
15
|
+
**适合 / 不适合**
|
|
16
|
+
|
|
17
|
+
- 适合指定平台范围内带来源的记录比较。
|
|
18
|
+
- 适合使用 Claude、Cursor 等客户端整理证据表和调研简报。
|
|
19
|
+
- 适合仅分析用户提供的已有结果。
|
|
20
|
+
- 不适合账号运营、发布、购买或隐藏的多请求编排。
|
|
21
|
+
- 不适合用小样本推断全平台统计或承诺未经核实的结果。
|
|
22
|
+
|
|
23
|
+
## 目录
|
|
24
|
+
|
|
25
|
+
- [快速开始](#快速开始)
|
|
26
|
+
- [核心特性](#核心特性)
|
|
27
|
+
- [示例提示词](#示例提示词)
|
|
28
|
+
- [为什么选择本 MCP](#为什么选择本-mcp)
|
|
29
|
+
- [可以构建与交付什么](#可以构建与交付什么)
|
|
30
|
+
- [工具参考](#工具参考)
|
|
31
|
+
- [内置工作流指南](#内置工作流指南)
|
|
32
|
+
- [完整示例](#完整示例)
|
|
33
|
+
- [常见问题](#常见问题)
|
|
34
|
+
- [错误处理与重试](#错误处理与重试)
|
|
35
|
+
- [范围、数据与计费](#范围数据与计费)
|
|
36
|
+
- [开发](#开发)
|
|
37
|
+
- [关于 OpenAny](#关于-openany)
|
|
38
|
+
- [许可证](#许可证)
|
|
39
|
+
|
|
40
|
+
## 快速开始
|
|
41
|
+
|
|
42
|
+
### 前置条件
|
|
43
|
+
|
|
44
|
+
- Node.js 22+ 和支持本地 stdio MCP 的客户端。
|
|
45
|
+
- 数据调用需要 OpenAny Key:[API Keys](https://openany.si/dashboard/?page=api-keys)、[配置指南](https://openany.si/setup.md)、[用量和费用](https://openany.si/dashboard/?page=usage)。
|
|
46
|
+
- 三个辅助工具免 Key。
|
|
47
|
+
|
|
48
|
+
### 配置客户端
|
|
49
|
+
|
|
50
|
+
支持 `mcpServers` 的客户端可复制以下配置;其他宿主通过自身设置注册相同命令、参数和环境变量。
|
|
51
|
+
|
|
52
|
+
```json
|
|
53
|
+
{
|
|
54
|
+
"mcpServers": {
|
|
55
|
+
"electronic-component-sourcing-mcp": {
|
|
56
|
+
"command": "npx",
|
|
57
|
+
"args": [
|
|
58
|
+
"-y",
|
|
59
|
+
"@openanysi/electronic-component-sourcing-mcp"
|
|
60
|
+
],
|
|
61
|
+
"env": {
|
|
62
|
+
"OPENANY_API_KEY": "YOUR_OPENANY_API_KEY"
|
|
63
|
+
}
|
|
64
|
+
}
|
|
65
|
+
}
|
|
66
|
+
}
|
|
67
|
+
```
|
|
68
|
+
|
|
69
|
+
将 `OPENANY_API_KEY` 保存在私密客户端设置或继承环境中。仅试用辅助工具时可省略 env;不要将真实 Key 写入聊天或仓库。
|
|
70
|
+
|
|
71
|
+
### 验证连接
|
|
72
|
+
|
|
73
|
+
- **无 Key:**通过 `get_tool_info` 查看工具参数和价格,再通过 `get_workflow` 加载 `research`;英文指南显式传 `language: "en"`。
|
|
74
|
+
- **有 Key:**先检查目标工具,再按问题采集一个受控样本,保留来源和缺失字段。
|
|
75
|
+
|
|
76
|
+
## 核心特性
|
|
77
|
+
|
|
78
|
+
- 2 个原子数据工具,具体能力见下表。
|
|
79
|
+
- 调用前通过 `get_tool_info` 查看当前参数和价格。
|
|
80
|
+
- 调研与证据简报两套中英文指南。
|
|
81
|
+
- 附带与指南文本同步的可选 companion Skill。
|
|
82
|
+
- 分页、比较及可用的 CSV/Markdown 导出由客户端决定。
|
|
83
|
+
- 通过 OpenAny 通用目录发现包外能力。
|
|
84
|
+
|
|
85
|
+
## 示例提示词
|
|
86
|
+
|
|
87
|
+
- “按我的元件料号搜索,区分制造商后读取准确产品,比较包装与数量阶梯,再解释单价。”
|
|
88
|
+
- “比较相关工具返回的记录,保留标识、日期和缺失字段。”
|
|
89
|
+
- “将已有样本整理成证据简报,区分观察和假设。”
|
|
90
|
+
- “仅使用我提供的结果,不新增数据调用,输出比较表。”
|
|
91
|
+
|
|
92
|
+
## 为什么选择本 MCP
|
|
93
|
+
|
|
94
|
+
| 关注点 | 处理方式 | 用户价值 |
|
|
95
|
+
| --- | --- | --- |
|
|
96
|
+
| 明确范围 | 单一调研领域的只读工具 | 工具集合小且可检查 |
|
|
97
|
+
| 控制费用 | 每次请求前查价 | 对每次付费调用作明确决定 |
|
|
98
|
+
| 可追溯证据 | 保留原记录与样本边界 | 便于复核比较与简报 |
|
|
99
|
+
| 灵活交付 | 客户端模型分析和写作 | 使用自己的模型及文件工具 |
|
|
100
|
+
|
|
101
|
+
## 可以构建与交付什么
|
|
102
|
+
|
|
103
|
+
| 场景 | 客户端执行方式 | 交付物 |
|
|
104
|
+
| --- | --- | --- |
|
|
105
|
+
| 来源采集 | 选择相关工具并读取受控样本 | 带链接的证据表 |
|
|
106
|
+
| 对比研究 | 对齐记录对象及范围 | 比较表与缺失字段 |
|
|
107
|
+
| 证据简报 | 使用 `evidence_brief` 分析已有输出 | Markdown 简报及后续问题 |
|
|
108
|
+
|
|
109
|
+
## 工具参考
|
|
110
|
+
|
|
111
|
+
共 **5 个工具**:2 个数据工具和 3 个免费辅助工具。每次数据工具调用对应一个请求,后续页面和调用由客户端控制。
|
|
112
|
+
|
|
113
|
+
### 数据工具
|
|
114
|
+
|
|
115
|
+
参数表保留英文名称及 required/optional 标记,便于与客户端 Schema 对照。
|
|
116
|
+
|
|
117
|
+
| 工具 | 参数 | 行为 | 返回数据概览 |
|
|
118
|
+
| --- | --- | --- | --- |
|
|
119
|
+
| `search_components` | `query` (string, required) | Search electronic components | `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) | Get component details | `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` 返回客户端使用的说明和模板,本身不调用数据、模型,也不直接生成报告。
|
|
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
|
+
1. 加载 `research`,明确问题、标识和预算。
|
|
154
|
+
2. 通过 `get_tool_info` 检查每个目标数据工具。
|
|
155
|
+
3. 执行已批准的独立请求,检查真实结果后再复用标识。
|
|
156
|
+
4. 保留来源和未知字段,使用 `evidence_brief` 整理观察与假设。
|
|
157
|
+
5. 客户端具备文件工具时再导出 Markdown 或 CSV。
|
|
158
|
+
|
|
159
|
+
## 常见问题
|
|
160
|
+
|
|
161
|
+
### 使用费用是多少?
|
|
162
|
+
|
|
163
|
+
Apache-2.0 软件包免费,3 个辅助工具免费免 Key;2 个数据工具按 OpenAny 当前 API 定价计费。调用前用 `get_tool_info` 查价,客户端模型费用另计。
|
|
164
|
+
|
|
165
|
+
### 支持 Cursor、Claude Desktop 和 Claude Code 吗?
|
|
166
|
+
|
|
167
|
+
支持标准本地 stdio MCP。上述 JSON 适用于采用 mcpServers 格式的宿主,其他客户端使用各自设置注册相同启动命令。
|
|
168
|
+
|
|
169
|
+
### 无 Key 可以体验吗?
|
|
170
|
+
|
|
171
|
+
可以,三个辅助工具可读取参数、指南和能力候选;数据请求需要 OPENANY_API_KEY。
|
|
172
|
+
|
|
173
|
+
### MCP 会直接撰写最终报告吗?
|
|
174
|
+
|
|
175
|
+
报告由客户端 Agent 撰写。get_workflow 提供指南和模板,数据工具提供证据。
|
|
176
|
+
|
|
177
|
+
### 会自动分页或重试吗?
|
|
178
|
+
|
|
179
|
+
不会。客户端选择每一页,执行不明的请求不会自动重放。游标必须与原工具和查询条件匹配。
|
|
180
|
+
|
|
181
|
+
### 缺少能力怎么办?
|
|
182
|
+
|
|
183
|
+
使用 search_openany_capabilities 或连接 [OpenAny 通用 MCP](https://mcp.openany.si/)。目录发现不会自动调用或安装另一个服务。
|
|
184
|
+
|
|
185
|
+
### 超时如何处理?
|
|
186
|
+
|
|
187
|
+
保留请求 ID,先核对原请求再决定下一次调用;缺少最终响应不代表未收费。
|
|
188
|
+
|
|
189
|
+
## 错误处理与重试
|
|
190
|
+
|
|
191
|
+
| 执行状态 | 常见情况 | 收费情况 | 是否可重试 |
|
|
192
|
+
| --- | --- | --- | --- |
|
|
193
|
+
| 失败 | 发送前参数或凭据被拒绝 | 不收费 | 修正输入后再决定 |
|
|
194
|
+
| 成功 | 返回业务数据 | 按接口计费规则 | 不要重复提交同一请求 |
|
|
195
|
+
| 不确定 / 超时 | 未收到最终结果 | 未知 | 先核对原请求 |
|
|
196
|
+
|
|
197
|
+
## 范围、数据与计费
|
|
198
|
+
|
|
199
|
+
- **执行和计费:**逐次检查并执行;空结果也可能按所选规则收费。
|
|
200
|
+
- **采样边界:**仅研究当前分销目录中的元件。核对制造商、MPN、分销料号和包装,保留实际返回的MOQ、币种与数量阶梯。不承诺跨分销商最低价,不下单,也不认证替代料工程兼容性。
|
|
201
|
+
- **报告规范:**区分原始数据、观察、假设与草稿;缺失事实标未知。
|
|
202
|
+
- **网络和隐私:**服务在本地运行,目录查询和业务输入会发送到 OpenAny。
|
|
203
|
+
|
|
204
|
+
## 开发
|
|
205
|
+
|
|
206
|
+
见英文 [CONTRIBUTING.md](../CONTRIBUTING.md),包含安装、验证及指南维护说明。
|
|
207
|
+
|
|
208
|
+
## 关于 OpenAny
|
|
209
|
+
|
|
210
|
+
[OpenAny](https://openany.si/) 是 B2A(Business-to-Agent)市场,提供 AI 模型、数据和业务 API、MCP 工具以及 ready-to-call Runs。一枚 Key 按调用付费,无需强制月费订阅。
|
|
211
|
+
|
|
212
|
+
使用 search_openany_capabilities 或连接 [OpenAny 通用 MCP](https://mcp.openany.si/) 扩展能力。
|
|
213
|
+
|
|
214
|
+
## 许可证
|
|
215
|
+
|
|
216
|
+
[Apache-2.0](../LICENSE)
|
package/package.json
CHANGED
|
@@ -1,6 +1,64 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@openanysi/electronic-component-sourcing-mcp",
|
|
3
|
-
"version": "0.
|
|
4
|
-
"
|
|
5
|
-
"
|
|
6
|
-
|
|
3
|
+
"version": "0.1.0",
|
|
4
|
+
"description": "Search electronic component catalogues and inspect distributor part details for BOM sourcing research. 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
|
+
"digikey",
|
|
32
|
+
"electronic-components",
|
|
33
|
+
"bom",
|
|
34
|
+
"part-number",
|
|
35
|
+
"component-sourcing",
|
|
36
|
+
"mcp",
|
|
37
|
+
"mcp-server",
|
|
38
|
+
"model-context-protocol",
|
|
39
|
+
"openany",
|
|
40
|
+
"claude",
|
|
41
|
+
"cursor",
|
|
42
|
+
"digikey-parts",
|
|
43
|
+
"bom-research",
|
|
44
|
+
"mpn",
|
|
45
|
+
"ai-agents"
|
|
46
|
+
],
|
|
47
|
+
"repository": {
|
|
48
|
+
"type": "git",
|
|
49
|
+
"url": "git+https://github.com/siopenany/just-mcps.git",
|
|
50
|
+
"directory": "packages/electronic-component-sourcing-mcp"
|
|
51
|
+
},
|
|
52
|
+
"homepage": "https://github.com/siopenany/just-mcps/tree/main/packages/electronic-component-sourcing-mcp#readme",
|
|
53
|
+
"bugs": {
|
|
54
|
+
"url": "https://github.com/siopenany/just-mcps/issues"
|
|
55
|
+
},
|
|
56
|
+
"dependencies": {
|
|
57
|
+
"@openanysi/openany-core": "0.1.2"
|
|
58
|
+
},
|
|
59
|
+
"devDependencies": {
|
|
60
|
+
"@modelcontextprotocol/client": "2.4.0"
|
|
61
|
+
},
|
|
62
|
+
"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\nSearch electronic component catalogues and inspect distributor part details for BOM sourcing research. The server provides 2 read-only data tools and three free utility tools over local `stdio`. Your client agent selects calls, interprets evidence and writes reports using its own model. Supply the identifiers and filters listed in Tools Reference; each data call remains independent.\n\n**Best For / Not For**\n\n- **Best For:** sourced comparisons within the supported platform and task scope.\n- **Best For:** turning available records into an evidence table and research brief in Claude, Cursor or another MCP client.\n- **Best For:** analyzing supplied outputs without additional data calls.\n- **Not For:** account automation, publishing, purchases or hidden multi-request workflows.\n- **Not For:** complete population statistics or claims unsupported by the collected sample.\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- 2 atomic tools for the operations listed below.\n- Current parameters and prices available through `get_tool_info`.\n- Two English/Chinese workflow guides for research and evidence briefs.\n- A packaged optional companion Skill using the same guide texts.\n- Client-controlled pagination, comparisons and supported CSV/Markdown exports.\n- Broader capability discovery through the OpenAny catalog.\n\n## Example Prompts\n\n- \"Search my component part number, distinguish manufacturers, and inspect one matching product. Compare packaging and quantity tiers before interpreting unit prices.\"\n- \"Compare the records returned by the relevant tools; keep identifiers, dates and missing values.\"\n- \"Turn the collected sample into an evidence brief. Separate observations from hypotheses.\"\n- \"Use only the results I provide. Make no new data calls; organize them into a comparison table.\"\n\n## Why electronic-component-sourcing-mcp?\n\n| What You Care About | How We Handle It | Value to You |\n| --- | --- | --- |\n| Focused scope | Read-only tools for one research domain | A small, inspectable tool set |\n| Spending control | Read current pricing before individual requests | Explicit decisions about each paid call |\n| Evidence quality | Preserve source records and sample limits | Reviewable comparisons and briefs |\n| Flexible reporting | Your client performs analysis and writing | Use your chosen model and file tools |\n\n## What You Can Build & Deliver\n\n| Use Case | How the Agent Runs It | Typical Deliverables |\n| --- | --- | --- |\n| Source collection | Select the relevant tools and request a bounded sample | Linked evidence table |\n| Comparative research | Compare matching records and their scope | Comparison table with missing fields |\n| Evidence brief | Load `evidence_brief` and analyze existing outputs | Markdown brief and next questions |\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 and templates for your client. It makes no data or model call and does not itself generate a report.\n\n| Guide ID | Best For | What It Provides |\n| --- | --- | --- |\n| `research` | Planning and collecting a scoped sample | Call selection, identifier checks and an evidence-table template |\n| `evidence_brief` | Reporting from collected or supplied records | Sourced findings, gaps and next questions |\n\n### Companion Skill (Optional)\n\nThe [companion Skill](skills/electronic-component-sourcing/SKILL.md) contains the same bilingual guides. Install that directory only if your client supports Skills. The MCP guides remain usable independently.\n\n## End-to-End Example\n\n**Prompt:** \"Search my component part number, distinguish manufacturers, and inspect one matching product. Compare packaging and quantity tiers before interpreting unit prices.\"\n\n**How the Agent Executes:**\n\n1. Load `research` with `language: \"en\"` and clarify the question, identifiers and budget.\n2. Inspect `get_tool_info` for each selected data tool.\n3. Make the approved individual calls. Reuse identifiers only after inspecting the actual returned records.\n4. Preserve sources and missing fields, then load `evidence_brief` to summarize observations and hypotheses.\n5. Write Markdown or CSV locally if the client provides file tools.\n\n## FAQ\n\n### How much does electronic-component-sourcing-mcp cost?\n\nThe Apache-2.0 package is free to use. The 3 utility tools are free and keyless; the 2 data tools follow current OpenAny API pricing. Inspect `get_tool_info` before calling. Your client's model costs are separate.\n\n### Does it work with Cursor, Claude Desktop and Claude Code?\n\nYes, it uses standard local `stdio` MCP. The JSON above applies to hosts using `mcpServers`; other clients register the same launch command through their own settings.\n\n### Can I try it without an API key?\n\nYes. Use the three utility tools to read parameters, guides and capability candidates. Data requests require `OPENANY_API_KEY`.\n\n### Does the MCP write the final report?\n\nYour client agent writes the report. `get_workflow` supplies instructions and a template; data tools supply the evidence.\n\n### Does it paginate or retry automatically?\n\nNo. The client selects each subsequent page, and uncertain requests are not replayed automatically. Keep cursors within their original operation and query context.\n\n### What if I need another capability?\n\nUse `search_openany_capabilities` or connect the general [OpenAny MCP](https://mcp.openany.si/). Discovery does not automatically execute or install another service.\n\n### How should I handle timeouts?\n\nKeep the request ID and check the original outcome before another call. A missing final response does not prove that the request was uncharged.\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",
|
|
63
|
+
"readmeFilename": "README.md"
|
|
64
|
+
}
|
|
@@ -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,23 @@
|
|
|
1
|
+
# Electronic Component Sourcing Research: evidence brief
|
|
2
|
+
|
|
3
|
+
Use the available outputs of `search_components`, `get_component`. Start from collected evidence and ask before spending beyond the agreed scope. No additional request is required to write this brief.
|
|
4
|
+
|
|
5
|
+
## Deliverable
|
|
6
|
+
|
|
7
|
+
1. Research question, platform/region, collection date and sample coverage.
|
|
8
|
+
2. A table of sources and observed values, retaining identifiers and missing fields.
|
|
9
|
+
3. Three to five observations, each linked to evidence. Separate hypotheses from observed facts.
|
|
10
|
+
4. Limitations and unresolved questions. Avoid population estimates from small samples.
|
|
11
|
+
5. Suggested next steps and the precise additional data needed, if any.
|
|
12
|
+
|
|
13
|
+
If drafting content, use confirmed product facts and write original material; sampled opinions are not verified product claims. The client controls writing and local exports.
|
|
14
|
+
|
|
15
|
+
## Domain limits
|
|
16
|
+
|
|
17
|
+
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.
|
|
18
|
+
|
|
19
|
+
## Domain report columns
|
|
20
|
+
|
|
21
|
+
manufacturer | MPN | distributor part number | packaging/MOQ | quantity/currency/price | source URL
|
|
22
|
+
|
|
23
|
+
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,23 @@
|
|
|
1
|
+
# 电子元件与 BOM 采购调研:证据简报
|
|
2
|
+
|
|
3
|
+
使用 `search_components`, `get_component` 的已有输出。先用已采集证据,超过已批准范围的开销需另行确认;撰写本简报无需新增请求。
|
|
4
|
+
|
|
5
|
+
## 交付结构
|
|
6
|
+
|
|
7
|
+
1. 问题、平台或地区、采集日期与样本范围。
|
|
8
|
+
2. 带来源的观察值表,保留标识及缺失字段。
|
|
9
|
+
3. 三到五项有证据支持的观察,明确区分假设与事实。
|
|
10
|
+
4. 局限与未解决问题,不用小样本推断总体规模。
|
|
11
|
+
5. 下一步及所需的具体新增数据。
|
|
12
|
+
|
|
13
|
+
内容草稿只使用已确认的产品事实并保持原创;评论中的意见不是已核实产品承诺。写作及本地导出由客户端控制。
|
|
14
|
+
|
|
15
|
+
## 领域边界
|
|
16
|
+
|
|
17
|
+
仅研究当前分销目录中的元件。核对制造商、MPN、分销料号和包装,保留实际返回的MOQ、币种与数量阶梯。不承诺跨分销商最低价,不下单,也不认证替代料工程兼容性。
|
|
18
|
+
|
|
19
|
+
## 领域报告列
|
|
20
|
+
|
|
21
|
+
manufacturer | MPN | distributor part number | packaging/MOQ | quantity/currency/price | source URL
|
|
22
|
+
|
|
23
|
+
仅研究当前分销目录中的元件。核对制造商、MPN、分销料号和包装,保留实际返回的MOQ、币种与数量阶梯。不承诺跨分销商最低价,不下单,也不认证替代料工程兼容性。
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
# Electronic Component Sourcing Research: research
|
|
2
|
+
|
|
3
|
+
1. Clarify the question, supplied identifiers, marketplace or jurisdiction, dates, sample limits and spending cap.
|
|
4
|
+
2. Inspect the relevant tools: `search_components`, `get_component`. Select only the calls needed for this question.
|
|
5
|
+
3. Run the discovery tool when available, or ask for the exact identifier required by a lookup. Inspect actual records before reusing an ID or URL. Never substitute account, content and product identifiers for one another.
|
|
6
|
+
4. Request one page or record at a time. Carry a cursor only into the same tool and query context. Do not infer additional input parameters from response metadata.
|
|
7
|
+
5. Compare like-for-like records. Keep source links, dates, sample counts and unavailable fields. Use supplied materials without new calls when the user requests it.
|
|
8
|
+
6. Produce a sourced comparison table and an observation-led brief. The client model performs all analysis and writes local CSV/Markdown only when it has file tools.
|
|
9
|
+
|
|
10
|
+
## Evidence table
|
|
11
|
+
|
|
12
|
+
| Record / source link | Identifier | Collected / source date | Observed facts | Missing fields | Research implication |
|
|
13
|
+
| --- | --- | --- | --- | --- | --- |
|
|
14
|
+
|
|
15
|
+
## Stop conditions
|
|
16
|
+
|
|
17
|
+
Stop on missing required input, an unaffordable quote, an uncertain execution or a mismatched identifier. Do not retry to conceal an empty or partial sample. Request missing inputs or use the general OpenAny catalog for capabilities outside this package.
|
|
18
|
+
|
|
19
|
+
## Package scope
|
|
20
|
+
|
|
21
|
+
Search electronic component catalogues and inspect distributor part details for BOM sourcing research.
|
|
22
|
+
|
|
23
|
+
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.
|
|
24
|
+
|
|
25
|
+
## Task-specific method
|
|
26
|
+
|
|
27
|
+
Search the desired MPN or function, inspect exact matches, and use a returned product URL or distributor part number for details. If supplying an MPN directly, include manufacturer. Compare only matching packaging, quantities and currency, and flag unverified engineering equivalence.
|
|
28
|
+
|
|
29
|
+
manufacturer | MPN | distributor part number | packaging/MOQ | quantity/currency/price | source URL
|
|
30
|
+
|
|
31
|
+
`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.
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
# 电子元件与 BOM 采购调研:调研
|
|
2
|
+
|
|
3
|
+
1. 明确问题、用户提供的标识、平台或地区、时间范围、样本数量和预算。
|
|
4
|
+
2. 检查相关工具:`search_components`, `get_component`。仅选择本次任务需要的调用。
|
|
5
|
+
3. 有搜索工具时先发现记录;详情查询需要准确标识。读取实际结果后再复用 ID 或 URL,账号、内容和商品标识不能混用。
|
|
6
|
+
4. 每次只请求一个页面或一条记录。游标只在相同工具和查询条件下复用,不从返回元数据推导未提供的输入参数。
|
|
7
|
+
5. 同口径比较,保留来源链接、日期、样本量和缺失字段。用户要求仅用已有材料时不发起新调用。
|
|
8
|
+
6. 生成带来源的比较表与简报;分析和写作由客户端模型完成,CSV/Markdown 导出需要客户端文件工具。
|
|
9
|
+
|
|
10
|
+
## 证据表
|
|
11
|
+
|
|
12
|
+
| 记录 / 来源链接 | 标识 | 采集 / 来源日期 | 观察事实 | 缺失字段 | 调研启示 |
|
|
13
|
+
| --- | --- | --- | --- | --- | --- |
|
|
14
|
+
|
|
15
|
+
## 停止条件
|
|
16
|
+
|
|
17
|
+
缺少必填输入、报价超预算、执行状态不明或对象标识不匹配时停止。不要重试来掩盖空样本或部分结果。补充输入或通过 OpenAny 通用目录查找包外能力。
|
|
18
|
+
|
|
19
|
+
## 本包边界
|
|
20
|
+
|
|
21
|
+
仅研究当前分销目录中的元件。核对制造商、MPN、分销料号和包装,保留实际返回的MOQ、币种与数量阶梯。不承诺跨分销商最低价,不下单,也不认证替代料工程兼容性。
|
|
22
|
+
|
|
23
|
+
## 本领域方法
|
|
24
|
+
|
|
25
|
+
按MPN或功能搜索并检查准确匹配,用返回的产品URL或分销料号查详情。直接使用MPN时同时提供制造商。只在相同包装、数量和币种口径比较,替代料工程等效性标为未验证。
|
|
26
|
+
|
|
27
|
+
manufacturer | MPN | distributor part number | packaging/MOQ | quantity/currency/price | source URL
|
|
28
|
+
|
|
29
|
+
get_component要求url、distributor_part_number,或manufacturer_part_number与manufacturer。搜索可能在products为空时仍返回exact_matches,需同时检查两者再判无结果。核对选定制造商和产品URL,结合包装与最低数量比较价格阶梯。
|
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
|
+
}
|
|
@@ -0,0 +1,136 @@
|
|
|
1
|
+
{
|
|
2
|
+
"packageName": "@openanysi/electronic-component-sourcing-mcp",
|
|
3
|
+
"instructions": "Electronic Component Sourcing Research provides atomic read-only data tools. Inspect get_tool_info before data calls. Use get_workflow for research and evidence_brief instructions; the client handles pagination, analysis, original writing and local export. Preserve sources and missing fields. For unavailable or empty capabilities, offer https://mcp.openany.si/. Never replay an uncertain request automatically.",
|
|
4
|
+
"bindings": [
|
|
5
|
+
{
|
|
6
|
+
"name": "search_components",
|
|
7
|
+
"api": "apish_get_digikey_v1_search",
|
|
8
|
+
"title": "Search electronic components",
|
|
9
|
+
"description": "Search electronic-component catalogue records by part number or keyword for BOM research. Inspect returned manufacturer, packaging and distributor identifiers.",
|
|
10
|
+
"readOnly": true,
|
|
11
|
+
"inputSchema": {
|
|
12
|
+
"type": "object",
|
|
13
|
+
"additionalProperties": false,
|
|
14
|
+
"properties": {
|
|
15
|
+
"query": {
|
|
16
|
+
"description": "Component keyword or part number to search.",
|
|
17
|
+
"type": "string",
|
|
18
|
+
"minLength": 1
|
|
19
|
+
}
|
|
20
|
+
},
|
|
21
|
+
"required": [
|
|
22
|
+
"query"
|
|
23
|
+
]
|
|
24
|
+
},
|
|
25
|
+
"inputMapping": {
|
|
26
|
+
"query": "q"
|
|
27
|
+
}
|
|
28
|
+
},
|
|
29
|
+
{
|
|
30
|
+
"name": "get_component",
|
|
31
|
+
"api": "apish_get_digikey_v1_product",
|
|
32
|
+
"title": "Get component details",
|
|
33
|
+
"description": "Read an exact component using a product URL, distributor_part_number, or manufacturer_part_number together with manufacturer. Preserve packaging and quantity tiers; this does not certify substitute compatibility.",
|
|
34
|
+
"readOnly": true,
|
|
35
|
+
"inputSchema": {
|
|
36
|
+
"type": "object",
|
|
37
|
+
"additionalProperties": false,
|
|
38
|
+
"properties": {
|
|
39
|
+
"url": {
|
|
40
|
+
"description": "The product's digikey.com/<lang>/products/detail/... link (or give mpn or dkpn).",
|
|
41
|
+
"type": "string",
|
|
42
|
+
"minLength": 1
|
|
43
|
+
},
|
|
44
|
+
"distributor_part_number": {
|
|
45
|
+
"description": "DigiKey part number, e.g. 296-LM358DRCT-ND (instead of url).",
|
|
46
|
+
"type": "string",
|
|
47
|
+
"minLength": 1
|
|
48
|
+
},
|
|
49
|
+
"manufacturer_part_number": {
|
|
50
|
+
"description": "Manufacturer part number, e.g. LM358DR (instead of url). When several manufacturers use it, the first match is returned unless `manufacturer` picks one.",
|
|
51
|
+
"type": "string",
|
|
52
|
+
"minLength": 1
|
|
53
|
+
},
|
|
54
|
+
"manufacturer": {
|
|
55
|
+
"description": "With mpn: part of the manufacturer's name, e.g. Texas Instruments.",
|
|
56
|
+
"type": "string",
|
|
57
|
+
"minLength": 1
|
|
58
|
+
}
|
|
59
|
+
},
|
|
60
|
+
"required": [],
|
|
61
|
+
"anyOf": [
|
|
62
|
+
{
|
|
63
|
+
"required": [
|
|
64
|
+
"url"
|
|
65
|
+
],
|
|
66
|
+
"properties": {
|
|
67
|
+
"url": {
|
|
68
|
+
"description": "The product's digikey.com/<lang>/products/detail/... link (or give mpn or dkpn).",
|
|
69
|
+
"type": "string",
|
|
70
|
+
"minLength": 1
|
|
71
|
+
}
|
|
72
|
+
}
|
|
73
|
+
},
|
|
74
|
+
{
|
|
75
|
+
"required": [
|
|
76
|
+
"distributor_part_number"
|
|
77
|
+
],
|
|
78
|
+
"properties": {
|
|
79
|
+
"distributor_part_number": {
|
|
80
|
+
"description": "DigiKey part number, e.g. 296-LM358DRCT-ND (instead of url).",
|
|
81
|
+
"type": "string",
|
|
82
|
+
"minLength": 1
|
|
83
|
+
}
|
|
84
|
+
}
|
|
85
|
+
},
|
|
86
|
+
{
|
|
87
|
+
"required": [
|
|
88
|
+
"manufacturer_part_number",
|
|
89
|
+
"manufacturer"
|
|
90
|
+
],
|
|
91
|
+
"properties": {
|
|
92
|
+
"manufacturer_part_number": {
|
|
93
|
+
"description": "Manufacturer part number, e.g. LM358DR (instead of url). When several manufacturers use it, the first match is returned unless `manufacturer` picks one.",
|
|
94
|
+
"type": "string",
|
|
95
|
+
"minLength": 1
|
|
96
|
+
},
|
|
97
|
+
"manufacturer": {
|
|
98
|
+
"description": "With mpn: part of the manufacturer's name, e.g. Texas Instruments.",
|
|
99
|
+
"type": "string",
|
|
100
|
+
"minLength": 1
|
|
101
|
+
}
|
|
102
|
+
}
|
|
103
|
+
}
|
|
104
|
+
]
|
|
105
|
+
},
|
|
106
|
+
"inputMapping": {
|
|
107
|
+
"url": "url",
|
|
108
|
+
"distributor_part_number": "dkpn",
|
|
109
|
+
"manufacturer_part_number": "mpn",
|
|
110
|
+
"manufacturer": "manufacturer"
|
|
111
|
+
}
|
|
112
|
+
}
|
|
113
|
+
],
|
|
114
|
+
"commonRules": {
|
|
115
|
+
"zh": "workflows/common.zh.md",
|
|
116
|
+
"en": "workflows/common.en.md"
|
|
117
|
+
},
|
|
118
|
+
"workflows": [
|
|
119
|
+
{
|
|
120
|
+
"id": "research",
|
|
121
|
+
"version": "0.1.0",
|
|
122
|
+
"files": {
|
|
123
|
+
"zh": "workflows/research.zh.md",
|
|
124
|
+
"en": "workflows/research.en.md"
|
|
125
|
+
}
|
|
126
|
+
},
|
|
127
|
+
{
|
|
128
|
+
"id": "evidence_brief",
|
|
129
|
+
"version": "0.1.0",
|
|
130
|
+
"files": {
|
|
131
|
+
"zh": "workflows/evidence-brief.zh.md",
|
|
132
|
+
"en": "workflows/evidence-brief.en.md"
|
|
133
|
+
}
|
|
134
|
+
}
|
|
135
|
+
]
|
|
136
|
+
}
|
|
@@ -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,23 @@
|
|
|
1
|
+
# Electronic Component Sourcing Research: evidence brief
|
|
2
|
+
|
|
3
|
+
Use the available outputs of `search_components`, `get_component`. Start from collected evidence and ask before spending beyond the agreed scope. No additional request is required to write this brief.
|
|
4
|
+
|
|
5
|
+
## Deliverable
|
|
6
|
+
|
|
7
|
+
1. Research question, platform/region, collection date and sample coverage.
|
|
8
|
+
2. A table of sources and observed values, retaining identifiers and missing fields.
|
|
9
|
+
3. Three to five observations, each linked to evidence. Separate hypotheses from observed facts.
|
|
10
|
+
4. Limitations and unresolved questions. Avoid population estimates from small samples.
|
|
11
|
+
5. Suggested next steps and the precise additional data needed, if any.
|
|
12
|
+
|
|
13
|
+
If drafting content, use confirmed product facts and write original material; sampled opinions are not verified product claims. The client controls writing and local exports.
|
|
14
|
+
|
|
15
|
+
## Domain limits
|
|
16
|
+
|
|
17
|
+
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.
|
|
18
|
+
|
|
19
|
+
## Domain report columns
|
|
20
|
+
|
|
21
|
+
manufacturer | MPN | distributor part number | packaging/MOQ | quantity/currency/price | source URL
|
|
22
|
+
|
|
23
|
+
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,23 @@
|
|
|
1
|
+
# 电子元件与 BOM 采购调研:证据简报
|
|
2
|
+
|
|
3
|
+
使用 `search_components`, `get_component` 的已有输出。先用已采集证据,超过已批准范围的开销需另行确认;撰写本简报无需新增请求。
|
|
4
|
+
|
|
5
|
+
## 交付结构
|
|
6
|
+
|
|
7
|
+
1. 问题、平台或地区、采集日期与样本范围。
|
|
8
|
+
2. 带来源的观察值表,保留标识及缺失字段。
|
|
9
|
+
3. 三到五项有证据支持的观察,明确区分假设与事实。
|
|
10
|
+
4. 局限与未解决问题,不用小样本推断总体规模。
|
|
11
|
+
5. 下一步及所需的具体新增数据。
|
|
12
|
+
|
|
13
|
+
内容草稿只使用已确认的产品事实并保持原创;评论中的意见不是已核实产品承诺。写作及本地导出由客户端控制。
|
|
14
|
+
|
|
15
|
+
## 领域边界
|
|
16
|
+
|
|
17
|
+
仅研究当前分销目录中的元件。核对制造商、MPN、分销料号和包装,保留实际返回的MOQ、币种与数量阶梯。不承诺跨分销商最低价,不下单,也不认证替代料工程兼容性。
|
|
18
|
+
|
|
19
|
+
## 领域报告列
|
|
20
|
+
|
|
21
|
+
manufacturer | MPN | distributor part number | packaging/MOQ | quantity/currency/price | source URL
|
|
22
|
+
|
|
23
|
+
仅研究当前分销目录中的元件。核对制造商、MPN、分销料号和包装,保留实际返回的MOQ、币种与数量阶梯。不承诺跨分销商最低价,不下单,也不认证替代料工程兼容性。
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
# Electronic Component Sourcing Research: research
|
|
2
|
+
|
|
3
|
+
1. Clarify the question, supplied identifiers, marketplace or jurisdiction, dates, sample limits and spending cap.
|
|
4
|
+
2. Inspect the relevant tools: `search_components`, `get_component`. Select only the calls needed for this question.
|
|
5
|
+
3. Run the discovery tool when available, or ask for the exact identifier required by a lookup. Inspect actual records before reusing an ID or URL. Never substitute account, content and product identifiers for one another.
|
|
6
|
+
4. Request one page or record at a time. Carry a cursor only into the same tool and query context. Do not infer additional input parameters from response metadata.
|
|
7
|
+
5. Compare like-for-like records. Keep source links, dates, sample counts and unavailable fields. Use supplied materials without new calls when the user requests it.
|
|
8
|
+
6. Produce a sourced comparison table and an observation-led brief. The client model performs all analysis and writes local CSV/Markdown only when it has file tools.
|
|
9
|
+
|
|
10
|
+
## Evidence table
|
|
11
|
+
|
|
12
|
+
| Record / source link | Identifier | Collected / source date | Observed facts | Missing fields | Research implication |
|
|
13
|
+
| --- | --- | --- | --- | --- | --- |
|
|
14
|
+
|
|
15
|
+
## Stop conditions
|
|
16
|
+
|
|
17
|
+
Stop on missing required input, an unaffordable quote, an uncertain execution or a mismatched identifier. Do not retry to conceal an empty or partial sample. Request missing inputs or use the general OpenAny catalog for capabilities outside this package.
|
|
18
|
+
|
|
19
|
+
## Package scope
|
|
20
|
+
|
|
21
|
+
Search electronic component catalogues and inspect distributor part details for BOM sourcing research.
|
|
22
|
+
|
|
23
|
+
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.
|
|
24
|
+
|
|
25
|
+
## Task-specific method
|
|
26
|
+
|
|
27
|
+
Search the desired MPN or function, inspect exact matches, and use a returned product URL or distributor part number for details. If supplying an MPN directly, include manufacturer. Compare only matching packaging, quantities and currency, and flag unverified engineering equivalence.
|
|
28
|
+
|
|
29
|
+
manufacturer | MPN | distributor part number | packaging/MOQ | quantity/currency/price | source URL
|
|
30
|
+
|
|
31
|
+
`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.
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
# 电子元件与 BOM 采购调研:调研
|
|
2
|
+
|
|
3
|
+
1. 明确问题、用户提供的标识、平台或地区、时间范围、样本数量和预算。
|
|
4
|
+
2. 检查相关工具:`search_components`, `get_component`。仅选择本次任务需要的调用。
|
|
5
|
+
3. 有搜索工具时先发现记录;详情查询需要准确标识。读取实际结果后再复用 ID 或 URL,账号、内容和商品标识不能混用。
|
|
6
|
+
4. 每次只请求一个页面或一条记录。游标只在相同工具和查询条件下复用,不从返回元数据推导未提供的输入参数。
|
|
7
|
+
5. 同口径比较,保留来源链接、日期、样本量和缺失字段。用户要求仅用已有材料时不发起新调用。
|
|
8
|
+
6. 生成带来源的比较表与简报;分析和写作由客户端模型完成,CSV/Markdown 导出需要客户端文件工具。
|
|
9
|
+
|
|
10
|
+
## 证据表
|
|
11
|
+
|
|
12
|
+
| 记录 / 来源链接 | 标识 | 采集 / 来源日期 | 观察事实 | 缺失字段 | 调研启示 |
|
|
13
|
+
| --- | --- | --- | --- | --- | --- |
|
|
14
|
+
|
|
15
|
+
## 停止条件
|
|
16
|
+
|
|
17
|
+
缺少必填输入、报价超预算、执行状态不明或对象标识不匹配时停止。不要重试来掩盖空样本或部分结果。补充输入或通过 OpenAny 通用目录查找包外能力。
|
|
18
|
+
|
|
19
|
+
## 本包边界
|
|
20
|
+
|
|
21
|
+
仅研究当前分销目录中的元件。核对制造商、MPN、分销料号和包装,保留实际返回的MOQ、币种与数量阶梯。不承诺跨分销商最低价,不下单,也不认证替代料工程兼容性。
|
|
22
|
+
|
|
23
|
+
## 本领域方法
|
|
24
|
+
|
|
25
|
+
按MPN或功能搜索并检查准确匹配,用返回的产品URL或分销料号查详情。直接使用MPN时同时提供制造商。只在相同包装、数量和币种口径比较,替代料工程等效性标为未验证。
|
|
26
|
+
|
|
27
|
+
manufacturer | MPN | distributor part number | packaging/MOQ | quantity/currency/price | source URL
|
|
28
|
+
|
|
29
|
+
get_component要求url、distributor_part_number,或manufacturer_part_number与manufacturer。搜索可能在products为空时仍返回exact_matches,需同时检查两者再判无结果。核对选定制造商和产品URL,结合包装与最低数量比较价格阶梯。
|