im-connector 1.2.0 → 1.2.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/mcp-bundle/README.md +6 -15
- package/mcp-bundle/cordis.patch.yml +3 -2
- package/package.json +1 -1
package/mcp-bundle/README.md
CHANGED
|
@@ -14,7 +14,7 @@ plugin_manager install_bundle target: im-connector
|
|
|
14
14
|
|
|
15
15
|
## 手工安装(已有包或本地调试)
|
|
16
16
|
|
|
17
|
-
把本目录复制到任意位置,直接 `plugin_manager install_bundle`(target 指向该目录)。patch 用的是官方 stdio
|
|
17
|
+
把本目录复制到任意位置,直接 `plugin_manager install_bundle`(target 指向该目录)。patch 用的是官方 stdio 形式,但**用 `node` 直接运行包内 server**(不走 `npx`,避免 Windows 下 Node 无法用管道 spawn `.cmd` shim 的问题):
|
|
18
18
|
|
|
19
19
|
```yaml
|
|
20
20
|
- insert:
|
|
@@ -23,27 +23,18 @@ plugin_manager install_bundle target: im-connector
|
|
|
23
23
|
config:
|
|
24
24
|
serverName: im
|
|
25
25
|
transport: stdio
|
|
26
|
-
command:
|
|
27
|
-
args:
|
|
26
|
+
command: !!js process.execPath
|
|
27
|
+
args:
|
|
28
|
+
- !!js '`${ctx.get("profileContext").dir}/node_modules/im-connector/dist/mcp/server.js`'
|
|
28
29
|
failOnStartupError: true
|
|
29
30
|
```
|
|
30
31
|
|
|
31
32
|
要点:
|
|
32
|
-
- `command:
|
|
33
|
-
- **不需要配 env**:`im-connector`
|
|
33
|
+
- `command: !!js process.execPath`:用运行 DSH 的同一个 node,跨平台;`args` 通过 Loader 的 `profileContext.dir` 定位到 **profile 的 node_modules 里安装的包**,无需绝对路径、无需 npx、无需全局安装。
|
|
34
|
+
- **不需要配 env**:`im-connector` 会通过包内 node_modules / `npm root -g` 自动解析 `dws` / `wecom-cli` 的 bin 脚本。需要覆盖时再加 env,且**不要把凭据写进 patch**(可用 `!!js process.env.X` 引用环境变量)。
|
|
34
35
|
- `failOnStartupError: true`:连接失败时让该行激活失败,便于发现问题(官方模板同款)。
|
|
35
36
|
- 对照官方 `templates/mcp/`:manifest 只需 name/version/`dsh.bundle.patch`(配置型 bundle 无 Host/Client 入口文件),display 元数据走 `locale/*.json` + `icon.svg`。
|
|
36
37
|
|
|
37
|
-
> ⚠️ 个别 Windows 环境下 `npx` 转发 stdio 到本包 server 不稳定(`npx --version` 与其它包正常,但管道下 MCP 握手被关闭)。遇到这种情况改用 node + 绝对路径:
|
|
38
|
-
|
|
39
|
-
```yaml
|
|
40
|
-
config:
|
|
41
|
-
serverName: im
|
|
42
|
-
transport: stdio
|
|
43
|
-
command: node
|
|
44
|
-
args: ['<npm root -g>/im-connector/dist/mcp/server.js']
|
|
45
|
-
```
|
|
46
|
-
|
|
47
38
|
## 验证
|
|
48
39
|
|
|
49
40
|
安装后在会话里调用 `mcp__im__run`(例如 `{ provider: "dingtalk", args: ["contact", "+me"] }`)确认连接可用。
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "im-connector",
|
|
3
|
-
"version": "1.2.
|
|
3
|
+
"version": "1.2.1",
|
|
4
4
|
"description": "MCP server that lets agents drive DingTalk (dws) and WeCom (wecom-cli) CLIs: send messages, write reports, create todos, query calendars and approvals. Extensible provider registry for more IM platforms.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./dist/index.js",
|