beacon-mfg-mcp 0.1.3 → 0.1.4

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.
Files changed (3) hide show
  1. package/README.md +25 -7
  2. package/package.json +35 -35
  3. package/server.py +1851 -1851
package/README.md CHANGED
@@ -7,7 +7,7 @@
7
7
  > 英文翻译(`en_backfill`)、库维护(`postfetch` / `gb_store` / `sync_assets`)等流水线**不进 MCP**、
8
8
  > 不暴露、不持密钥;MCP 也不会落在任何写路径上。
9
9
 
10
- ## 三个只读 tool
10
+ ## 提供的 tool(6 个,全部只读)
11
11
 
12
12
  | tool | 用途 | 关键参数 |
13
13
  |------|------|----------|
@@ -26,6 +26,12 @@
26
26
  > 千万量级下只需增大桶数(如 4096)并按城市对大分片二级切分,首次查询耗时仍与总量基本无关。
27
27
  | `get_vendor` | 按 id(+国标码)取完整中文档案 | `id`(必填) `gb`(可选,自动反查) |
28
28
  | `get_capability_card` | 按 id 取能力卡(工艺/设备/产能/认证等) | `id`(必填) |
29
+ | `start_sourcing` | 【客户 agent 自动触发】识别找厂/代工/采购/询价意图 → 品类识别→宽召回→需求解析→生成 1~2 轮澄清问题,返回 `session_id` | `demand_text`(必填) `audience_id` |
30
+ | `answer_sourcing` | 续接澄清轮次:写回客户答案,返回下一轮澄清问题或初选供应商列表 | `session_id`(必填) `answers` |
31
+ | `refine_sourcing` | 推荐轮次交互:`details`(看详情与 RFQ 入口) / `more`(看更多) / `best`(看最匹配一家) | `session_id`(必填) `action` `value` |
32
+
33
+ 后三个构成「采购寻源」多轮会话链路 `start_sourcing → answer_sourcing → refine_sourcing`,
34
+ 同样只读,不落任何写路径。
29
35
 
30
36
  所有返回都是 JSON 文本。找不到时返回 `{ "error": ... }` 或 `has_card:false`,不会抛协议错。
31
37
 
@@ -33,7 +39,19 @@
33
39
 
34
40
  服务是**零第三方依赖**的单文件(`server.py`,仅用 Python 标准库),只需 Python 3.8+。
35
41
 
36
- **方式 A — 本地 git 仓库(推荐:离线 + 隐私安全 + 零 CF 流量)**
42
+ **方式 0 — npm 安装(推荐:无需 clone、无需填路径)**
43
+
44
+ ```bash
45
+ npm i -g beacon-mfg-mcp # 或不安装直接用 npx beacon-mfg-mcp
46
+ ```
47
+
48
+ ```jsonc
49
+ { "mcpServers": { "beacon-mfg": { "command": "beacon-mfg-mcp", "args": [] } } }
50
+ ```
51
+
52
+ 不填 `BEACON_REPO` 时默认走 `https://beacon-mfg.pages.dev`,即开即用。
53
+
54
+ **方式 A — 本地 git 仓库(离线 + 隐私安全 + 零 CF 流量)**
37
55
 
38
56
  ```jsonc
39
57
  // Claude Desktop / 其它 MCP 客户端配置
@@ -102,10 +120,10 @@ MCP 服务有两种发布渠道(详见 `mcp/RELEASE.md`):
102
120
 
103
121
  - **GitHub Release(已配 CI)**:推送 `mcp-v*` 标签即由 `.github/workflows/mcp-release.yml`
104
122
  自动打包 `mcp/` 目录为 `beacon-mfg-mcp-mcp-vX.Y.Z.tar.gz` 并创建 Release。
105
- - **npm 包(代码已就绪,尚未发布)**:`mcp/package.json` + `mcp/bin/beacon-mfg-mcp.js`
106
- (Node 启动器,自动探测 Python)。截至最近一次核对,`beacon-mfg-mcp` **尚未发布到 npm 公共仓库**
107
- (`npm view beacon-mfg-mcp` 返回 404),因此 `npx beacon-mfg-mcp` 暂不可用。发布后客户端可直接用
108
- `"command": "beacon-mfg-mcp"`。
123
+ - **npm 包(已发布 ✅)**:`beacon-mfg-mcp` 已于 **2026-09-24** 发布到 npm 公共仓库,当前版本 **`0.1.3`**
124
+ (<https://www.npmjs.com/package/beacon-mfg-mcp>)。第三方可直接 `npm i -g beacon-mfg-mcp`
125
+ 或 `npx beacon-mfg-mcp`,客户端配置 `"command": "beacon-mfg-mcp"` 即可,无需 clone、无需填路径。
126
+ 已实测:安装 → MCP 握手 → `tools/list` 全通(暴露 6 个 tool)。
109
127
 
110
128
  ### 发布到 npm 的步骤(需要 Access Token,不是 2FA 种子)
111
129
 
@@ -137,6 +155,6 @@ MCP 服务有两种发布渠道(详见 `mcp/RELEASE.md`):
137
155
  "args": ["/路径/beacon-mfg/mcp/server.py"],
138
156
  "env": { "BEACON_REPO": "/路径/beacon-mfg" } } } }
139
157
 
140
- // 方式二:npm 安装后(待 npm 发布完成后可用,无需 clone)
158
+ // 方式二:npm 安装(推荐,无需 clone、无需填路径)
141
159
  { "mcpServers": { "beacon-mfg": { "command": "beacon-mfg-mcp", "args": [] } } }
142
160
  ```
package/package.json CHANGED
@@ -1,35 +1,35 @@
1
- {
2
- "name": "beacon-mfg-mcp",
3
- "version": "0.1.3",
4
- "description": "Read-only MCP server exposing the BeaconMFG灯塔工厂 supplier directory (search vendors, get vendor detail, get capability card) to any MCP-compatible agent. No API key, no repo clone required.",
5
- "keywords": [
6
- "mcp",
7
- "model-context-protocol",
8
- "beacon-mfg",
9
- "suppliers",
10
- "manufacturing",
11
- "china"
12
- ],
13
- "homepage": "https://github.com/eiry16/beacon-mfg#readme",
14
- "repository": {
15
- "type": "git",
16
- "url": "git+https://github.com/eiry16/beacon-mfg.git"
17
- },
18
- "bugs": {
19
- "url": "https://github.com/eiry16/beacon-mfg/issues"
20
- },
21
- "license": "MIT",
22
- "bin": {
23
- "beacon-mfg-mcp": "bin/beacon-mfg-mcp.js"
24
- },
25
- "files": [
26
- "server.py",
27
- "bin/",
28
- "README.md",
29
- "RELEASE.md"
30
- ],
31
- "engines": {
32
- "node": ">=16"
33
- },
34
- "dependencies": {}
35
- }
1
+ {
2
+ "name": "beacon-mfg-mcp",
3
+ "version": "0.1.4",
4
+ "description": "Read-only MCP server exposing the BeaconMFG灯塔工厂 supplier directory (search vendors, get vendor detail, get capability card) to any MCP-compatible agent. No API key, no repo clone required.",
5
+ "keywords": [
6
+ "mcp",
7
+ "model-context-protocol",
8
+ "beacon-mfg",
9
+ "suppliers",
10
+ "manufacturing",
11
+ "china"
12
+ ],
13
+ "homepage": "https://github.com/eiry16/beacon-mfg#readme",
14
+ "repository": {
15
+ "type": "git",
16
+ "url": "git+https://github.com/eiry16/beacon-mfg.git"
17
+ },
18
+ "bugs": {
19
+ "url": "https://github.com/eiry16/beacon-mfg/issues"
20
+ },
21
+ "license": "MIT",
22
+ "bin": {
23
+ "beacon-mfg-mcp": "bin/beacon-mfg-mcp.js"
24
+ },
25
+ "files": [
26
+ "server.py",
27
+ "bin/",
28
+ "README.md",
29
+ "RELEASE.md"
30
+ ],
31
+ "engines": {
32
+ "node": ">=16"
33
+ },
34
+ "dependencies": {}
35
+ }