dsh-mcp 1.11.1 → 1.12.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/CHANGELOG.en.md CHANGED
@@ -9,8 +9,36 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
9
9
 
10
10
  ## Compatibility
11
11
 
12
- - **Supported DSH version**: **dsh `0.1.5-rc.1`** — developed and verified on `0.1.5-rc.1` (declared in `package.json` → `dsh.supported`). When the DSH and plugin versions do not match, the Settings page reports a diagnosis (check the `cordis.patch.yml` row → restart `dsh web` → hard-refresh → upgrade both sides).
13
- - **Release convention**: every version entry states `- **Supported DSH version**: dsh <version>`, mirrored in the GitHub Release notes.
12
+ - **Supported DSH version**: **dsh `0.1.6-alpha.2`** — developed and verified on `0.1.6-alpha.2` (declared in `package.json` → `dsh.supported`). When the DSH and plugin versions do not match, the Settings page reports a diagnosis (check the `cordis.patch.yml` row → restart `dsh web` → hard-refresh → upgrade both sides).
13
+ - **Release convention**: every version entry states `- **Supported DSH version**: dsh <version>`, mirrored in the GitHub Release notes. The release body is written in **Chinese** (matching [CHANGELOG.md](CHANGELOG.md)), with heading levels mirroring the entry.
14
+
15
+ ## [1.12.1] - 2026-10-07
16
+
17
+ - **Supported DSH version**: **dsh `0.1.6-alpha.2`**
18
+
19
+ ### Fixed
20
+
21
+ - **stdio servers now actually receive the process-level environment variables ([#11](https://github.com/ArvinQi/dsh-mcp/issues/11))**: `global_env` was only used for `streamable-http` header substitution — the stdio branch dropped it entirely — and the parent process environment is no substitute, because `dsh-mcp-client` strips `KEY`/`TOKEN`/`SECRET`/`PASSWORD`-shaped names out of the inherited env before merging the server's own. So a stdio server that only reads its key from the environment (such as `tavily`, `npx -y tavily-mcp`) and whose per-server env the form no longer edits could only start keyless (it surfaced as `tavily_research` reporting "requires an API key" while keyless `tavily_search`/`tavily_extract` worked). `toClientConfig()`'s stdio branch now merges `global_env` with the server's own env into the child process, with the **per-server entry winning** on a collision; the settings hint, both READMEs and this document now state the real scope (injected into stdio children *and* available to HTTP header substitution)
22
+ - **Automatic remount after a credential update works again ([#12](https://github.com/ArvinQi/dsh-mcp/issues/12))**: `managedServerId()` recovered the server id from `DSH_MCP_<serverId>_<name>` with `lastIndexOf("_")`, but both the id (`mcp_<12 hex>`) and the variable name may contain `_`: as soon as the name had an underscore (`TAVILY_API_KEY`, `MY_VAR`) it split in the wrong place and produced an id that is not in the table, so the `credentials/reference-updated` handler silently skipped the remount — **rotating a key through the credentials UI or another plugin left the server on its old value until a manual refresh**. It now matches the id's fixed shape (`mcp_[0-9a-f]{12}`) exactly, and keeps `DSH_MCP_ENV_*` (process-level) and `DSH_MCP_OAUTH_*` refs unresolved
23
+
24
+ ### Notes
25
+
26
+ - Each fix ships with a regression test: `test/stdio-env.test.mjs` spawns a real child through a real mount and reads the environment it received back (it fails against the old implementation), and `test/managed-server-id.test.mjs` runs a ref-resolution matrix against the shipped `lib/index.js` function
27
+
28
+ ## [1.12.0] - 2026-09-18
29
+
30
+ - **Supported DSH version**: **dsh `0.1.6-alpha.2`**
31
+
32
+ ### Changed
33
+
34
+ - **Migrated to the official split MCP SDK 2.0 packages**: since DSH `0.1.6-alpha.1`, the in-box `dsh-mcp-client` derives from `@modelcontextprotocol/{client,server,node}@2.0.0` instead of the monolithic `@modelcontextprotocol/sdk@1.x`, and the old package is no longer a DSH dependency. This plugin migrates with it (`lib/transport.js`, `lib/probe.js`, `lib/mcp-client.js`, `lib/oauth.js`) and declares `@modelcontextprotocol/client@2.0.0` and `zod@^4.2.0` explicitly in `package.json` instead of relying on the host profile's dependency hoisting — without this, DSH `0.1.6-alpha.1` fails the plugin load with `ERR_MODULE_NOT_FOUND: Cannot find package '@modelcontextprotocol/sdk'`, taking the Settings page and tool search down with it
35
+ - **Adapted to two breaking changes in SDK 2.0**: `Client` options no longer accept `authProvider` (the OAuth provider now travels on the **transport**; this plugin's `createTransport` already reads `config.authProvider` and passes it to the transport, so the OAuth flow is unchanged), and `setNotificationHandler`'s first argument is now a **method name** rather than a schema, so the tool-list-changed notification registers as `notifications/tools/list_changed`
36
+ - **Result schemas now come from the new package's `specTypeSchemas`**: `ListToolsResultSchema` → `specTypeSchemas.ListToolsResult`; `ToolListChangedNotificationSchema` is no longer needed since notifications register by method name
37
+ - **Regenerated the client half for the Typert `create()` contract**: the `@deepseek-ai/dsh-typert-generator` output in `src/client/remote-contribution.js` carried only `schema: TypertSchema`, but since DSH `0.1.6-alpha.1` that field is `create: () => TypertSchema` and the registry calls it unconditionally (`record.value ??= record.create()`) — so the Settings page's Remote descriptors threw `create is not a function` on mount and the whole MCP settings page failed. Regenerated with the current generator (all 21 strict descriptors now carry `create`) and rebuilt `lib/client.js` to match. This stayed hidden because the long-running host had been on `0.1.5-rc.1` since Sep 14, whose contract was still `schema`
38
+
39
+ ### Fixed
40
+
41
+ - **The "do not open a browser from a tool call" OAuth guard works again**: `startConnection`'s `opts` never carried `url` or `authProvider`, so the branch that should return an authorization link when a stored token is missing or expired never ran — the SDK opened a browser mid-tool-call instead (a single session could open several tabs). `opts` now carries both fields, restoring the documented behavior
14
42
 
15
43
  ## [1.11.1] - 2026-09-13
16
44
 
package/CHANGELOG.md CHANGED
@@ -9,8 +9,36 @@
9
9
 
10
10
  ## 兼容性
11
11
 
12
- - **支持版本**:**dsh `0.1.5-rc.1`** —— 本插件在 `0.1.5-rc.1` 上开发与验证(`package.json` → `dsh.supported` 同步声明)。DSH 与插件版本不匹配时,设置页会给出排查诊断(核对 `cordis.patch.yml` 注册行 → 重启 `dsh web` → 硬刷新 → 同步升级)。
13
- - **发版约定**:每个版本条目都要声明 `- **支持版本**:dsh <版本>`,并在 GitHub Release notes 中同步。
12
+ - **支持版本**:**dsh `0.1.6-alpha.2`** —— 本插件在 `0.1.6-alpha.2` 上开发与验证(`package.json` → `dsh.supported` 同步声明)。DSH 与插件版本不匹配时,设置页会给出排查诊断(核对 `cordis.patch.yml` 注册行 → 重启 `dsh web` → 硬刷新 → 同步升级)。
13
+ - **发版约定**:每个版本条目都要声明 `- **支持版本**:dsh <版本>`,并在 GitHub Release notes 中同步。Release 正文用**中文**(与本文档一致),标题层级与条目一致。
14
+
15
+ ## [1.12.1] - 2026-10-07
16
+
17
+ - **支持版本**:**dsh `0.1.6-alpha.2`**
18
+
19
+ ### 修复
20
+
21
+ - **stdio 服务器现在真的能拿到进程级环境变量([#11](https://github.com/ArvinQi/dsh-mcp/issues/11))**:`global_env` 此前只用于 `streamable-http` 的请求头替换,stdio 分支把它整个丢掉;而父进程环境也不是替代通道——`dsh-mcp-client` 会把 `KEY`/`TOKEN`/`SECRET`/`PASSWORD` 形状的父环境变量剥离后再与服务器 env 合并。于是像 `tavily`(`npx -y tavily-mcp`)这类只吃环境变量、且表单不再编辑 per-server env 的 stdio 服务器,只能以「无密钥」状态启动(表现为 `tavily_research` 报 "requires an API key",而 keyless 的 `tavily_search`/`tavily_extract` 正常)。现在 `toClientConfig()` 的 stdio 分支把 `global_env` 与服务器自身 env 合并后注入子进程,同名时**服务器 env 优先**;设置页提示、README 中英与本文档同步改为「stdio 子进程注入 + HTTP 请求头引用」的实际作用域
22
+ - **凭据引用更新后的自动重挂载恢复正常([#12](https://github.com/ArvinQi/dsh-mcp/issues/12))**:`managedServerId()` 用 `lastIndexOf("_")` 从 `DSH_MCP_<serverId>_<变量名>` 反解服务器 id,而 id(`mcp_<12位十六进制>`)与变量名都可能含 `_`:只要变量名带下划线(`TAVILY_API_KEY`、`MY_VAR`)就切错位置、解析出表里不存在的 id,`credentials/reference-updated` 处理器于是静默跳过重挂载——**通过凭据管理界面或其它插件轮换密钥后,服务器继续用旧值直到手动刷新**。现在按 id 的固定格式 `mcp_[0-9a-f]{12}` 精确匹配,并对 `DSH_MCP_ENV_*`(进程级)与 `DSH_MCP_OAUTH_*` 引用保持不解析
23
+
24
+ ### 说明
25
+
26
+ - 两个修复各配一条回归测试:`test/stdio-env.test.mjs` 通过真实挂载 + 真实子进程读回环境变量(改回旧实现即失败),`test/managed-server-id.test.mjs` 直接读 `lib/index.js` 中发布态的函数做引用解析矩阵
27
+
28
+ ## [1.12.0] - 2026-09-18
29
+
30
+ - **支持版本**:**dsh `0.1.6-alpha.2`**
31
+
32
+ ### 变更
33
+
34
+ - **迁移到官方 MCP SDK 2.0 拆分包**:DSH `0.1.6-alpha.1` 起,框架内的 `dsh-mcp-client` 已从单体包 `@modelcontextprotocol/sdk@1.x` 迁到 `@modelcontextprotocol/{client,server,node}@2.0.0`,旧包不再是 DSH 的依赖。本插件同步迁移 `lib/transport.js`、`lib/probe.js`、`lib/mcp-client.js`、`lib/oauth.js`,并在 `package.json` 显式声明 `@modelcontextprotocol/client@2.0.0` 与 `zod@^4.2.0`,不再依赖宿主 profile 的依赖提升——否则在 DSH `0.1.6-alpha.1` 上会以 `ERR_MODULE_NOT_FOUND: Cannot find package '@modelcontextprotocol/sdk'` 加载失败,设置页与 tool search 一并不可用
35
+ - **适配 SDK 2.0 的两处破坏性变更**:其一,`Client` 选项不再接受 `authProvider`,OAuth provider 改由 **transport** 携带(本插件的 `createTransport` 一直从 `config.authProvider` 读取并传给 transport,因此 OAuth 流程行为不变);其二,`setNotificationHandler` 的第一个参数由 schema 改为**方法名**,工具列表变更通知改用 `notifications/tools/list_changed`
36
+ - **结果 schema 改从新包的 `specTypeSchemas` 取**:`ListToolsResultSchema` → `specTypeSchemas.ListToolsResult`;`ToolListChangedNotificationSchema` 不再需要(通知按方法名注册)
37
+ - **重新生成客户端半以适配 Typert `create()` 契约**:`@deepseek-ai/dsh-typert-generator` 生成的 `src/client/remote-contribution.js` 此前只携带 `schema: TypertSchema`,而 DSH 自 `0.1.6-alpha.1` 起把该字段改成 `create: () => TypertSchema`,registry 以 `record.value ??= record.create()` **无条件调用**它——于是设置页的 Remote 描述符在挂载时抛 `create is not a function`,整块 MCP 设置页失效。现已用当前生成器重新生成(21 个 strict 描述符全部补上 `create`)并重建 `lib/client.js`。此前一直没暴露,是因为常驻宿主自 9/14 起跑的是 `0.1.5-rc.1`(当时契约仍是 `schema`)
38
+
39
+ ### 修复
40
+
41
+ - **OAuth 工具调用的「不弹浏览器」保护恢复生效**:`startConnection` 的 `opts` 一直缺少 `url` 与 `authProvider` 两个字段,于是「已存 token 缺失/过期时不要从工具调用里打开浏览器,改为返回授权链接」这段判断从未触发——实际行为是让 SDK 在工具调用中弹浏览器(同一会话可能连开多个标签)。现在在 `opts` 中补上这两项,行为回到代码注释所述
14
42
 
15
43
  ## [1.11.1] - 2026-09-13
16
44
 
package/README.en.md CHANGED
@@ -2,7 +2,7 @@
2
2
 
3
3
  [![dshfind](https://dshfind.com/api/badge/ArvinQi/dsh-mcp?lang=en)](https://dshfind.com/en/plugins/ArvinQi/dsh-mcp?ref=badge)
4
4
 
5
- > **Supported DSH version**: `dsh 0.1.5-rc.1` — developed and verified on `0.1.5-rc.1`, declared in `package.json` → `dsh.supported`. When the DSH and plugin versions do not match, the Settings page shows a diagnosis (check the registration row → restart `dsh web` → hard-refresh → upgrade both sides).
5
+ > **Supported DSH version**: `dsh 0.1.6-alpha.2` — developed and verified on `0.1.6-alpha.2`, declared in `package.json` → `dsh.supported`. When the DSH and plugin versions do not match, the Settings page shows a diagnosis (check the registration row → restart `dsh web` → hard-refresh → upgrade both sides).
6
6
 
7
7
  ![Settings preview](static/snapshot.en.webp)
8
8
 
@@ -17,7 +17,7 @@
17
17
  **Highlights:**
18
18
 
19
19
  - **Visual management**: server list / create / edit / delete / test connection / enable-disable / refresh, all in the UI
20
- - **Process-level environment variables**: a global key-value list (expanded by default, batch-add supported); header values can reference a variable by bare name or `${NAME}` and are substituted at connect time (e.g. `Authorization: Bearer ${TOKEN}`)
20
+ - **Process-level environment variables**: a global key-value list (expanded by default, batch-add supported); injected into every stdio server's child process and referenced by streamable-http header values by bare name or `${NAME}`, substituted at connect time (e.g. `Authorization: Bearer ${TOKEN}`); a per-server env entry wins on collision
21
21
  - **Whole-list JSON config**: the "JSON config editor" panel views/edits every server as one JSON array; applying saves immediately (create/update/delete)
22
22
  - **Fine-grained tool control**: expand each server to see its tools, all checked by default; uncheck to load only what you need
23
23
  - **Image result passthrough**: images returned by MCP tools (screenshots/charts) are projected through the attachment service into model image context, with strict preflight and bounded fallbacks (PR #4)
@@ -240,7 +240,8 @@ Check in order:
240
240
 
241
241
  **Process env vars** (below the injection mode, expanded by default):
242
242
 
243
- - Configure global key-value pairs referenced by every server's header substitution;
243
+ - Configure global key-value pairs shared by every server: **injected into each stdio server's child
244
+ process**, and referenced by streamable-http header substitution;
244
245
  secret values are stored in the credentials document, a blank value keeps the stored one
245
246
  - **process.env wins**: if a variable already exists in the process environment (`process.env`)
246
247
  under the same name, that value is used verbatim (name unchanged) at connect/display time and
@@ -248,7 +249,9 @@ Check in order:
248
249
  (e.g. `export ADA_TOKEN=...`) then restart `dsh web`
249
250
  - Batch-add (paste one `NAME=value` per line) or add rows one by one
250
251
  - A header value can reference a variable by **bare name** or **`${NAME}`** (e.g. `Authorization: Bearer ${GITLAB_TOKEN}`),
251
- substituted at connect time (priority: server env > process-level env > system environment)
252
+ substituted at connect time (priority: server env > process-level env > system environment);
253
+ a stdio child's environment follows the same precedence, so a per-server env entry overrides
254
+ the process-level value
252
255
 
253
256
  **JSON config editor** (top-right of the MCP config module):
254
257
 
package/README.md CHANGED
@@ -4,7 +4,7 @@
4
4
 
5
5
  [![dshfind](https://dshfind.com/api/badge/ArvinQi/dsh-mcp?lang=zh)](https://dshfind.com/zh/plugins/ArvinQi/dsh-mcp?ref=badge)
6
6
 
7
- > **支持版本**:`dsh 0.1.5-rc.1` —— 本插件在 `0.1.5-rc.1` 上开发与验证,`package.json` → `dsh.supported` 同步声明。DSH 与插件两侧版本不匹配时,设置页会给出排查诊断(检查注册行 → 重启 `dsh web` → 硬刷新 → 同步升级)。
7
+ > **支持版本**:`dsh 0.1.6-alpha.2` —— 本插件在 `0.1.6-alpha.2` 上开发与验证,`package.json` → `dsh.supported` 同步声明。DSH 与插件两侧版本不匹配时,设置页会给出排查诊断(检查注册行 → 重启 `dsh web` → 硬刷新 → 同步升级)。
8
8
 
9
9
  ![设置页预览](static/snapshot.webp)
10
10
 
@@ -19,7 +19,7 @@
19
19
  **功能优势:**
20
20
 
21
21
  - **可视化管理**:服务器列表 / 新建 / 编辑 / 删除 / 测试连接 / 启停 / 刷新,全 UI 操作
22
- - **进程级环境变量**:全局 KV 配置(默认展开、支持批量添加),服务器请求头 value 写 `变量名` 或 `${变量名}` 即可在连接时自动替换为配置值(如 `Authorization: Bearer ${TOKEN}`)
22
+ - **进程级环境变量**:全局 KV 配置(默认展开、支持批量添加);stdio 服务器的子进程直接注入,streamable-http 服务器的请求头 value 写 `变量名` 或 `${变量名}` 即可在连接时自动替换为配置值(如 `Authorization: Bearer ${TOKEN}`);同名时服务器自身 env 优先
23
23
  - **JSON 全量配置**:「JSON 维护配置」面板以一段 JSON 数组查看/编辑全部服务器配置,应用即保存(新增/更新/删除)
24
24
  - **工具级精细控制**:每个服务器展开工具列表,默认全选,可取消勾选只加载需要的部分
25
25
  - **图片结果透传**:MCP 工具返回的图片(截图/图表等)经附件服务投影为图片引用进入模型上下文,带严格预检与有界降级文案(PR #4)
@@ -238,12 +238,13 @@ dsh plugin --profile web add link:<本仓库绝对路径>
238
238
 
239
239
  **进程环境变量**(注入模式下方,默认展开):
240
240
 
241
- - 配置全局键值对,供所有服务器的请求头替换引用;secret 值写入凭据文档,留空保留原值
241
+ - 配置全局键值对,供所有服务器使用:**stdio 服务器的子进程直接注入**,streamable-http 服务器用于请求头替换引用;secret 值写入凭据文档,留空保留原值
242
242
  - **process.env 优先**:若变量在进程环境变量(`process.env`)中已存在同名值,连接/展示时直接采用该值(不改名),
243
243
  存储值仅作为兜底——请先在启动脚本里 `export ADA_TOKEN=...` 再重启 `dsh web`
244
244
  - 支持「批量添加」(粘贴多行 `NAME=value`)与「添加变量」逐行添加
245
245
  - 服务器请求头 value 可直接写**变量名**或 **`${变量名}`**(如 `Authorization: Bearer ${GITLAB_TOKEN}`),
246
- 连接时自动替换(优先级:服务器 env > 进程级 env > 系统环境变量)
246
+ 连接时自动替换(优先级:服务器 env > 进程级 env > 系统环境变量);stdio 子进程的环境与此一致,
247
+ 同名时服务器自身 env 覆盖进程级 env
247
248
 
248
249
  **JSON 维护配置**(MCP 配置模块右上角):
249
250
 
package/lib/client.js CHANGED
@@ -14952,14 +14952,16 @@ var TYPERT_REMOTE = {
14952
14952
  codec: {
14953
14953
  mode: "strict",
14954
14954
  typeSymbol: "@deepseek-ai/dsh-mcp-manager/types#McpManagerRemoveRequest",
14955
- schema: _deepseek_ai_dsh_mcp_manager_mcpManager_delete_parameter_0$schema
14955
+ schema: _deepseek_ai_dsh_mcp_manager_mcpManager_delete_parameter_0$schema,
14956
+ create: () => _deepseek_ai_dsh_mcp_manager_mcpManager_delete_parameter_0$schema
14956
14957
  }
14957
14958
  }
14958
14959
  ],
14959
14960
  result: {
14960
14961
  mode: "strict",
14961
14962
  typeSymbol: "@deepseek-ai/dsh-mcp-manager/types#McpManagerRemoveResult",
14962
- schema: _deepseek_ai_dsh_mcp_manager_mcpManager_delete_result$schema
14963
+ schema: _deepseek_ai_dsh_mcp_manager_mcpManager_delete_result$schema,
14964
+ create: () => _deepseek_ai_dsh_mcp_manager_mcpManager_delete_result$schema
14963
14965
  },
14964
14966
  sourceLocation: { "file": "packages/mcp/mcp-manager/src/index.ts", "line": 399, "column": 9 }
14965
14967
  },
@@ -14973,7 +14975,8 @@ var TYPERT_REMOTE = {
14973
14975
  result: {
14974
14976
  mode: "strict",
14975
14977
  typeSymbol: "@deepseek-ai/dsh-mcp-manager/types#McpManagerListResult",
14976
- schema: _deepseek_ai_dsh_mcp_manager_mcpManager_list_result$schema
14978
+ schema: _deepseek_ai_dsh_mcp_manager_mcpManager_list_result$schema,
14979
+ create: () => _deepseek_ai_dsh_mcp_manager_mcpManager_list_result$schema
14977
14980
  },
14978
14981
  sourceLocation: { "file": "packages/mcp/mcp-manager/src/index.ts", "line": 314, "column": 9 }
14979
14982
  },
@@ -14991,14 +14994,16 @@ var TYPERT_REMOTE = {
14991
14994
  codec: {
14992
14995
  mode: "strict",
14993
14996
  typeSymbol: "@deepseek-ai/dsh-mcp-manager/types#McpManagerTestRequest",
14994
- schema: _deepseek_ai_dsh_mcp_manager_mcpManager_test_parameter_0$schema
14997
+ schema: _deepseek_ai_dsh_mcp_manager_mcpManager_test_parameter_0$schema,
14998
+ create: () => _deepseek_ai_dsh_mcp_manager_mcpManager_test_parameter_0$schema
14995
14999
  }
14996
15000
  }
14997
15001
  ],
14998
15002
  result: {
14999
15003
  mode: "strict",
15000
15004
  typeSymbol: "@deepseek-ai/dsh-mcp-manager/types#McpManagerTestResult",
15001
- schema: _deepseek_ai_dsh_mcp_manager_mcpManager_test_result$schema
15005
+ schema: _deepseek_ai_dsh_mcp_manager_mcpManager_test_result$schema,
15006
+ create: () => _deepseek_ai_dsh_mcp_manager_mcpManager_test_result$schema
15002
15007
  },
15003
15008
  sourceLocation: { "file": "packages/mcp/mcp-manager/src/index.ts", "line": 422, "column": 9 }
15004
15009
  },
@@ -15016,14 +15021,16 @@ var TYPERT_REMOTE = {
15016
15021
  codec: {
15017
15022
  mode: "strict",
15018
15023
  typeSymbol: "@deepseek-ai/dsh-mcp-manager/types#McpManagerUpsertRequest",
15019
- schema: _deepseek_ai_dsh_mcp_manager_mcpManager_upsert_parameter_0$schema
15024
+ schema: _deepseek_ai_dsh_mcp_manager_mcpManager_upsert_parameter_0$schema,
15025
+ create: () => _deepseek_ai_dsh_mcp_manager_mcpManager_upsert_parameter_0$schema
15020
15026
  }
15021
15027
  }
15022
15028
  ],
15023
15029
  result: {
15024
15030
  mode: "strict",
15025
15031
  typeSymbol: "@deepseek-ai/dsh-mcp-manager/types#McpManagerUpsertResult",
15026
- schema: _deepseek_ai_dsh_mcp_manager_mcpManager_upsert_result$schema
15032
+ schema: _deepseek_ai_dsh_mcp_manager_mcpManager_upsert_result$schema,
15033
+ create: () => _deepseek_ai_dsh_mcp_manager_mcpManager_upsert_result$schema
15027
15034
  },
15028
15035
  sourceLocation: { "file": "packages/mcp/mcp-manager/src/index.ts", "line": 329, "column": 9 }
15029
15036
  },
@@ -15041,14 +15048,16 @@ var TYPERT_REMOTE = {
15041
15048
  codec: {
15042
15049
  mode: "strict",
15043
15050
  typeSymbol: "@deepseek-ai/dsh-mcp-manager/types#McpManagerUpsertJsonRequest",
15044
- schema: _deepseek_ai_dsh_mcp_manager_mcpManager_upsertJson_parameter_0$schema
15051
+ schema: _deepseek_ai_dsh_mcp_manager_mcpManager_upsertJson_parameter_0$schema,
15052
+ create: () => _deepseek_ai_dsh_mcp_manager_mcpManager_upsertJson_parameter_0$schema
15045
15053
  }
15046
15054
  }
15047
15055
  ],
15048
15056
  result: {
15049
15057
  mode: "strict",
15050
15058
  typeSymbol: "@deepseek-ai/dsh-mcp-manager/types#McpManagerUpsertJsonResult",
15051
- schema: _deepseek_ai_dsh_mcp_manager_mcpManager_upsertJson_result$schema
15059
+ schema: _deepseek_ai_dsh_mcp_manager_mcpManager_upsertJson_result$schema,
15060
+ create: () => _deepseek_ai_dsh_mcp_manager_mcpManager_upsertJson_result$schema
15052
15061
  },
15053
15062
  sourceLocation: { "file": "lib/index.js" }
15054
15063
  },
@@ -15062,7 +15071,8 @@ var TYPERT_REMOTE = {
15062
15071
  result: {
15063
15072
  mode: "strict",
15064
15073
  typeSymbol: "@deepseek-ai/dsh-mcp-manager/types#McpManagerToolsListResult",
15065
- schema: _deepseek_ai_dsh_mcp_manager_mcpManager_toolsList_result$schema
15074
+ schema: _deepseek_ai_dsh_mcp_manager_mcpManager_toolsList_result$schema,
15075
+ create: () => _deepseek_ai_dsh_mcp_manager_mcpManager_toolsList_result$schema
15066
15076
  },
15067
15077
  sourceLocation: { "file": "lib/index.js" }
15068
15078
  },
@@ -15080,14 +15090,16 @@ var TYPERT_REMOTE = {
15080
15090
  codec: {
15081
15091
  mode: "strict",
15082
15092
  typeSymbol: "@deepseek-ai/dsh-mcp-manager/types#McpManagerToolsSetRequest",
15083
- schema: _deepseek_ai_dsh_mcp_manager_mcpManager_toolsSet_parameter_0$schema
15093
+ schema: _deepseek_ai_dsh_mcp_manager_mcpManager_toolsSet_parameter_0$schema,
15094
+ create: () => _deepseek_ai_dsh_mcp_manager_mcpManager_toolsSet_parameter_0$schema
15084
15095
  }
15085
15096
  }
15086
15097
  ],
15087
15098
  result: {
15088
15099
  mode: "strict",
15089
15100
  typeSymbol: "@deepseek-ai/dsh-mcp-manager/types#McpManagerToolsSetResult",
15090
- schema: _deepseek_ai_dsh_mcp_manager_mcpManager_toolsSet_result$schema
15101
+ schema: _deepseek_ai_dsh_mcp_manager_mcpManager_toolsSet_result$schema,
15102
+ create: () => _deepseek_ai_dsh_mcp_manager_mcpManager_toolsSet_result$schema
15091
15103
  },
15092
15104
  sourceLocation: { "file": "lib/index.js" }
15093
15105
  },
@@ -15105,14 +15117,16 @@ var TYPERT_REMOTE = {
15105
15117
  codec: {
15106
15118
  mode: "strict",
15107
15119
  typeSymbol: "@deepseek-ai/dsh-mcp-manager/types#McpManagerToolsModeRequest",
15108
- schema: _deepseek_ai_dsh_mcp_manager_mcpManager_toolsMode_parameter_0$schema
15120
+ schema: _deepseek_ai_dsh_mcp_manager_mcpManager_toolsMode_parameter_0$schema,
15121
+ create: () => _deepseek_ai_dsh_mcp_manager_mcpManager_toolsMode_parameter_0$schema
15109
15122
  }
15110
15123
  }
15111
15124
  ],
15112
15125
  result: {
15113
15126
  mode: "strict",
15114
15127
  typeSymbol: "@deepseek-ai/dsh-mcp-manager/types#McpManagerToolsModeResult",
15115
- schema: _deepseek_ai_dsh_mcp_manager_mcpManager_toolsMode_result$schema
15128
+ schema: _deepseek_ai_dsh_mcp_manager_mcpManager_toolsMode_result$schema,
15129
+ create: () => _deepseek_ai_dsh_mcp_manager_mcpManager_toolsMode_result$schema
15116
15130
  },
15117
15131
  sourceLocation: { "file": "lib/index.js" }
15118
15132
  },
@@ -15126,7 +15140,8 @@ var TYPERT_REMOTE = {
15126
15140
  result: {
15127
15141
  mode: "strict",
15128
15142
  typeSymbol: "@deepseek-ai/dsh-mcp-manager/types#McpManagerEnvListResult",
15129
- schema: _deepseek_ai_dsh_mcp_manager_mcpManager_envList_result$schema
15143
+ schema: _deepseek_ai_dsh_mcp_manager_mcpManager_envList_result$schema,
15144
+ create: () => _deepseek_ai_dsh_mcp_manager_mcpManager_envList_result$schema
15130
15145
  },
15131
15146
  sourceLocation: { "file": "lib/index.js" }
15132
15147
  },
@@ -15144,14 +15159,16 @@ var TYPERT_REMOTE = {
15144
15159
  codec: {
15145
15160
  mode: "strict",
15146
15161
  typeSymbol: "@deepseek-ai/dsh-mcp-manager/types#McpManagerEnvSetRequest",
15147
- schema: _deepseek_ai_dsh_mcp_manager_mcpManager_envSet_parameter_0$schema
15162
+ schema: _deepseek_ai_dsh_mcp_manager_mcpManager_envSet_parameter_0$schema,
15163
+ create: () => _deepseek_ai_dsh_mcp_manager_mcpManager_envSet_parameter_0$schema
15148
15164
  }
15149
15165
  }
15150
15166
  ],
15151
15167
  result: {
15152
15168
  mode: "strict",
15153
15169
  typeSymbol: "@deepseek-ai/dsh-mcp-manager/types#McpManagerEnvSetResult",
15154
- schema: _deepseek_ai_dsh_mcp_manager_mcpManager_envSet_result$schema
15170
+ schema: _deepseek_ai_dsh_mcp_manager_mcpManager_envSet_result$schema,
15171
+ create: () => _deepseek_ai_dsh_mcp_manager_mcpManager_envSet_result$schema
15155
15172
  },
15156
15173
  sourceLocation: { "file": "lib/index.js" }
15157
15174
  },
@@ -15169,14 +15186,16 @@ var TYPERT_REMOTE = {
15169
15186
  codec: {
15170
15187
  mode: "strict",
15171
15188
  typeSymbol: "@deepseek-ai/dsh-mcp-manager/types#McpManagerAdoptRequest",
15172
- schema: _deepseek_ai_dsh_mcp_manager_mcpManager_adopt_parameter_0$schema
15189
+ schema: _deepseek_ai_dsh_mcp_manager_mcpManager_adopt_parameter_0$schema,
15190
+ create: () => _deepseek_ai_dsh_mcp_manager_mcpManager_adopt_parameter_0$schema
15173
15191
  }
15174
15192
  }
15175
15193
  ],
15176
15194
  result: {
15177
15195
  mode: "strict",
15178
15196
  typeSymbol: "@deepseek-ai/dsh-mcp-manager/types#McpManagerAdoptResult",
15179
- schema: _deepseek_ai_dsh_mcp_manager_mcpManager_adopt_result$schema
15197
+ schema: _deepseek_ai_dsh_mcp_manager_mcpManager_adopt_result$schema,
15198
+ create: () => _deepseek_ai_dsh_mcp_manager_mcpManager_adopt_result$schema
15180
15199
  },
15181
15200
  sourceLocation: { "file": "lib/index.js" }
15182
15201
  },
@@ -15194,14 +15213,16 @@ var TYPERT_REMOTE = {
15194
15213
  codec: {
15195
15214
  mode: "strict",
15196
15215
  typeSymbol: "@deepseek-ai/dsh-mcp-manager/types#McpManagerReleaseRequest",
15197
- schema: _deepseek_ai_dsh_mcp_manager_mcpManager_release_parameter_0$schema
15216
+ schema: _deepseek_ai_dsh_mcp_manager_mcpManager_release_parameter_0$schema,
15217
+ create: () => _deepseek_ai_dsh_mcp_manager_mcpManager_release_parameter_0$schema
15198
15218
  }
15199
15219
  }
15200
15220
  ],
15201
15221
  result: {
15202
15222
  mode: "strict",
15203
15223
  typeSymbol: "@deepseek-ai/dsh-mcp-manager/types#McpManagerReleaseResult",
15204
- schema: _deepseek_ai_dsh_mcp_manager_mcpManager_release_result$schema
15224
+ schema: _deepseek_ai_dsh_mcp_manager_mcpManager_release_result$schema,
15225
+ create: () => _deepseek_ai_dsh_mcp_manager_mcpManager_release_result$schema
15205
15226
  },
15206
15227
  sourceLocation: { "file": "lib/index.js" }
15207
15228
  }
@@ -16611,7 +16632,7 @@ var zh = {
16611
16632
  serversJsonSaving: "\u5E94\u7528\u4E2D\u2026",
16612
16633
  serversJsonDone: "\u5DF2\u5E94\u7528",
16613
16634
  globalEnv: "\u8FDB\u7A0B\u73AF\u5883\u53D8\u91CF",
16614
- globalEnvHint: "\u8FDB\u7A0B\u7EA7\u73AF\u5883\u53D8\u91CF\uFF0C\u4F9B\u6240\u6709 MCP \u670D\u52A1\u5668\u7684\u8BF7\u6C42\u5934\u66FF\u6362\u5F15\u7528\uFF08headers \u503C\u5199 ${\u53D8\u91CF\u540D} \u6216\u76F4\u63A5\u5199\u53D8\u91CF\u540D\uFF09\u3002secret \u503C\u5199\u5165\u51ED\u636E\u6587\u6863\uFF0C\u4E0D\u5728\u6B64\u660E\u6587\u663E\u793A\uFF1B\u7559\u7A7A\u4FDD\u7559\u539F\u503C\u3002",
16635
+ globalEnvHint: "\u8FDB\u7A0B\u7EA7\u73AF\u5883\u53D8\u91CF\uFF0C\u4F9B\u6240\u6709 MCP \u670D\u52A1\u5668\u4F7F\u7528\uFF1Astdio \u670D\u52A1\u5668\u7684\u5B50\u8FDB\u7A0B\u76F4\u63A5\u6CE8\u5165\uFF0Cstreamable-http \u670D\u52A1\u5668\u7684\u8BF7\u6C42\u5934\u66FF\u6362\u5F15\u7528\uFF08headers \u503C\u5199 ${\u53D8\u91CF\u540D} \u6216\u76F4\u63A5\u5199\u53D8\u91CF\u540D\uFF09\uFF0C\u540C\u540D\u65F6\u670D\u52A1\u5668\u81EA\u8EAB env \u4F18\u5148\u3002secret \u503C\u5199\u5165\u51ED\u636E\u6587\u6863\uFF0C\u4E0D\u5728\u6B64\u660E\u6587\u663E\u793A\uFF1B\u7559\u7A7A\u4FDD\u7559\u539F\u503C\u3002",
16615
16636
  globalEnvName: "\u53D8\u91CF\u540D",
16616
16637
  globalEnvValue: "\u503C",
16617
16638
  globalEnvSecret: "\u79C1\u5BC6",
@@ -16736,7 +16757,7 @@ var en = {
16736
16757
  serversJsonSaving: "Applying\u2026",
16737
16758
  serversJsonDone: "Applied",
16738
16759
  globalEnv: "Process env vars",
16739
- globalEnvHint: "Process-level environment variables referenced by every server's header substitution (write ${NAME} or a bare name in a header value). Secret values are stored in the credentials document, never shown here; blank keeps the stored value.",
16760
+ globalEnvHint: "Process-level environment variables shared by every MCP server: injected into each stdio server's child process, and referenced by streamable-http header substitution (write ${NAME} or a bare name in a header value); a per-server env entry wins on collision. Secret values are stored in the credentials document, never shown here; blank keeps the stored value.",
16740
16761
  globalEnvName: "Name",
16741
16762
  globalEnvValue: "Value",
16742
16763
  globalEnvSecret: "secret",
package/lib/index.js CHANGED
@@ -97,9 +97,10 @@ const mcpServersDomainSpec = defineDomain({
97
97
  name: "mcp_servers",
98
98
  version: 0,
99
99
  tables: { servers: domainTable(mcpServerRowSchema),
100
- // Process-level environment variables: shared by every server's header
101
- // substitution. Plain values live here; secret values are stored in the
102
- // credentials document under DSH_MCP_ENV_<name>.
100
+ // Process-level environment variables: shared by every server — passed into
101
+ // every stdio child process's environment and available to streamable-http
102
+ // header substitution. Plain values live here; secret values are stored in
103
+ // the credentials document under DSH_MCP_ENV_<name>.
103
104
  global_env: domainTable(z$1.object({
104
105
  name: envVarNameSchema,
105
106
  secret: z$1.boolean(),
@@ -341,10 +342,12 @@ function sameRecord(left, right) {
341
342
  */
342
343
  function managedServerId(ref) {
343
344
  if (!ref.startsWith(SECRET_REF_PREFIX)) return void 0;
344
- const rest = ref.slice(8);
345
- const separator = rest.lastIndexOf("_");
346
- if (separator <= 0) return void 0;
347
- return rest.slice(0, separator);
345
+ // The ref is `<prefix><serverId>_<env name>`, and BOTH halves may contain
346
+ // `_` (ids are `mcp_<12 hex>`, env names are arbitrary POSIX names), so
347
+ // splitting on the last `_` misreads any name containing one. Match the id's
348
+ // fixed shape instead.
349
+ const match = /^(mcp_[0-9a-f]{12})_/.exec(ref.slice(SECRET_REF_PREFIX.length));
350
+ return match === null ? void 0 : match[1];
348
351
  }
349
352
  /** Credential reference holding one secret env value. */
350
353
  function secretRef(id, name) {
@@ -1007,7 +1010,8 @@ let McpManagerService = (() => {
1007
1010
  * Resolve the process-level env map. The process environment wins: a
1008
1011
  * variable present in process.env is used verbatim (by the same name);
1009
1012
  * otherwise the stored value (secret from credentials, plain from the
1010
- * table) is used as a fallback.
1013
+ * table) is used as a fallback. The map feeds every stdio child process's
1014
+ * environment and every `streamable-http` header substitution.
1011
1015
  */
1012
1016
  async resolveGlobalEnv() {
1013
1017
  const env = {};
@@ -1033,7 +1037,15 @@ let McpManagerService = (() => {
1033
1037
  command: spec.command,
1034
1038
  args: [...spec.args],
1035
1039
  cwd: spec.cwd,
1036
- env,
1040
+ // Process-level env vars reach the child too — the parent process
1041
+ // environment is not a channel (dsh-mcp-client merges the spec env
1042
+ // over a parent env scrubbed of credential-shaped names, so
1043
+ // `TAVILY_API_KEY` never survives inheritance). Per-server env
1044
+ // keeps priority over the process-level value.
1045
+ env: {
1046
+ ...globalEnv,
1047
+ ...env
1048
+ },
1037
1049
  toolCallTimeoutMs: spec.toolCallTimeoutMs,
1038
1050
  failOnStartupError: spec.failOnStartupError
1039
1051
  };
package/lib/mcp-client.js CHANGED
@@ -1,9 +1,8 @@
1
1
  import z from "@deepseek-ai/schemastery";
2
2
  import { MAX_TIMER_DELAY_MS } from "@deepseek-ai/dsh-timeout";
3
- import { Client } from "@modelcontextprotocol/sdk/client/index.js";
4
- import { ListToolsResultSchema, ToolListChangedNotificationSchema } from "@modelcontextprotocol/sdk/types.js";
5
- import { StdioClientTransport } from "@modelcontextprotocol/sdk/client/stdio.js";
6
- import { StreamableHTTPClientTransport } from "@modelcontextprotocol/sdk/client/streamableHttp.js";
3
+ import { Client, specTypeSchemas } from "@modelcontextprotocol/client";
4
+ import { StdioClientTransport } from "@modelcontextprotocol/client/stdio";
5
+ import { StreamableHTTPClientTransport } from "@modelcontextprotocol/client";
7
6
  import { scrubbedParentEnv } from "@deepseek-ai/dsh-subprocess";
8
7
  import { createHash } from "node:crypto";
9
8
  import { isDeepStrictEqual } from "node:util";
@@ -92,7 +91,7 @@ function listToolsUncached(client, cursor) {
92
91
  return client.request({
93
92
  method: "tools/list",
94
93
  ...cursor === void 0 ? {} : { params: { cursor } }
95
- }, ListToolsResultSchema);
94
+ }, specTypeSchemas.ListToolsResult);
96
95
  }
97
96
  /** Call without the SDK pre-validating an output schema the bridge may not support. */
98
97
  function callToolUncached(client, rawName, args, exec, opts) {
@@ -558,7 +557,11 @@ function startConnection(ctx, config, policy) {
558
557
  const opts = {
559
558
  registrationFailure: "contain",
560
559
  serverName: config.serverName,
561
- toolCallTimeoutMs: config.toolCallTimeoutMs
560
+ toolCallTimeoutMs: config.toolCallTimeoutMs,
561
+ // Read by the per-tool-call OAuth guard: the server URL drives discovery,
562
+ // and the provider reports whether a stored token is still usable.
563
+ url: config.url,
564
+ authProvider: config.authProvider
562
565
  };
563
566
  const startupOpts = config.failOnStartupError ? {
564
567
  ...opts,
@@ -659,13 +662,12 @@ function startConnection(ctx, config, policy) {
659
662
  * @param startup - Whether this is the plugin's activation attempt.
660
663
  */
661
664
  async function connectGeneration(startup) {
665
+ // SDK 2.0 no longer accepts `authProvider` in ClientOptions; the transport
666
+ // created by createTransport(config) carries it (config.authProvider).
662
667
  const generation = new Client({
663
668
  name: "dsh-mcp-client",
664
669
  version: "0.0.1"
665
- }, {
666
- capabilities: {},
667
- ...(opts.authProvider === void 0 ? {} : { authProvider: opts.authProvider })
668
- });
670
+ }, { capabilities: {} });
669
671
  const closed = Promise.withResolvers();
670
672
  let attemptSettled = false;
671
673
  let closeObserved = false;
@@ -677,7 +679,7 @@ function startConnection(ctx, config, policy) {
677
679
  closed.resolve();
678
680
  if (attemptSettled) generationDown(generation);
679
681
  };
680
- generation.setNotificationHandler(ToolListChangedNotificationSchema, async () => {
682
+ generation.setNotificationHandler("notifications/tools/list_changed", async () => {
681
683
  if (!isCurrent(generation)) return;
682
684
  ctx.logger.info(`${label}: tool list changed, re-syncing`);
683
685
  try {
@@ -783,7 +785,7 @@ async function runProbe(client, config) {
783
785
  const response = await client.request({
784
786
  method: "tools/list",
785
787
  ...cursor === void 0 ? {} : { params: { cursor } }
786
- }, ListToolsResultSchema);
788
+ }, specTypeSchemas.ListToolsResult);
787
789
  for (const tool of response.tools) tools.push({
788
790
  name: tool.name,
789
791
  ...tool.description === void 0 ? {} : { description: tool.description }
package/lib/oauth.js CHANGED
@@ -19,7 +19,7 @@ import {
19
19
  exchangeAuthorization,
20
20
  registerClient,
21
21
  startAuthorization,
22
- } from "@modelcontextprotocol/sdk/client/auth.js";
22
+ } from "@modelcontextprotocol/client";
23
23
  import { credentialRef } from "@deepseek-ai/dsh-credentials";
24
24
  import { hostText } from "./host-locales.js";
25
25
 
package/lib/probe.js CHANGED
@@ -1,5 +1,4 @@
1
- import { Client } from "@modelcontextprotocol/sdk/client/index.js";
2
- import { ListToolsResultSchema } from "@modelcontextprotocol/sdk/types.js";
1
+ import { Client, specTypeSchemas } from "@modelcontextprotocol/client";
3
2
  import { createTransport } from "./transport.js";
4
3
  const DEFAULT_PROBE_TIMEOUT_MS = 15e3;
5
4
  function probeErrorMessage(error) {
@@ -12,7 +11,7 @@ async function runProbe(client, config) {
12
11
  do {
13
12
  const response = await client.request(
14
13
  { method: "tools/list", ...cursor === void 0 ? {} : { params: { cursor } } },
15
- ListToolsResultSchema
14
+ specTypeSchemas.ListToolsResult
16
15
  );
17
16
  for (const tool of response.tools) {
18
17
  tools.push({
@@ -37,12 +36,11 @@ async function probeConnection(config, options = {}) {
37
36
  // the tokens and the next probe succeeds.
38
37
  const OAUTH_PROBE_BUDGET_MS = 5 * 60e3;
39
38
  const budgetMs = options.authProvider === void 0 ? timeoutMs : Math.max(timeoutMs, OAUTH_PROBE_BUDGET_MS);
39
+ // Client options no longer carry `authProvider`; the SDK reads it from the
40
+ // transport (see the transportConfig below).
40
41
  const client = new Client(
41
42
  { name: "dsh-mcp-client", version: "0.0.1" },
42
- {
43
- capabilities: {},
44
- ...(options.authProvider === void 0 ? {} : { authProvider: options.authProvider })
45
- }
43
+ { capabilities: {} }
46
44
  );
47
45
  const timeout = new Promise((_, reject) => {
48
46
  const timer = setTimeout(() => reject(new Error(`connection probe timed out after ${budgetMs}ms`)), budgetMs);
@@ -50,7 +48,7 @@ async function probeConnection(config, options = {}) {
50
48
  });
51
49
  try {
52
50
  // The SDK performs OAuth in the transport layer, so the authProvider must
53
- // reach the transport config (not only the Client options).
51
+ // reach the transport config.
54
52
  const transportConfig = {
55
53
  ...config,
56
54
  ...(options.authProvider === void 0 ? {} : { authProvider: options.authProvider })
package/lib/transport.js CHANGED
@@ -1,5 +1,5 @@
1
- import { StdioClientTransport } from "@modelcontextprotocol/sdk/client/stdio.js";
2
- import { StreamableHTTPClientTransport } from "@modelcontextprotocol/sdk/client/streamableHttp.js";
1
+ import { StdioClientTransport } from "@modelcontextprotocol/client/stdio";
2
+ import { StreamableHTTPClientTransport } from "@modelcontextprotocol/client";
3
3
  import { scrubbedParentEnv } from "@deepseek-ai/dsh-subprocess";
4
4
  function buildChildEnv(extra) {
5
5
  return { ...scrubbedParentEnv(), ...extra };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "dsh-mcp",
3
- "version": "1.11.1",
3
+ "version": "1.12.1",
4
4
  "description": "MCP 管理界面 + tool search:可视化配置/启停/刷新 MCP 服务器与工具勾选,按需检索(tool search)热注入;工具列表稳定命中缓存、不撑爆上下文。DeepSeek Harness plugin: MCP management UI + tool search — stable tool list, cache-friendly, no context bloat.",
5
5
  "type": "module",
6
6
  "main": "lib/index.js",
@@ -24,6 +24,10 @@
24
24
  "build": "node scripts/build.mjs",
25
25
  "test": "node scripts/test.mjs"
26
26
  },
27
+ "dependencies": {
28
+ "@modelcontextprotocol/client": "2.0.0",
29
+ "zod": "^4.2.0"
30
+ },
27
31
  "author": "Arvin.qi <arvin.qi@qq.com>",
28
32
  "license": "MIT",
29
33
  "repository": {
@@ -35,7 +39,7 @@
35
39
  "url": "https://github.com/ArvinQi/dsh-mcp/issues"
36
40
  },
37
41
  "dsh": {
38
- "supported": "0.1.5-rc.1",
42
+ "supported": "0.1.6-alpha.2",
39
43
  "client": {
40
44
  "inject": [
41
45
  "@deepseek-ai/dsh-api-remotes",
package/scripts/test.mjs CHANGED
@@ -28,6 +28,7 @@ const ROOT = join(dirname(fileURLToPath(import.meta.url)), '..')
28
28
  const NEEDS_DSH_CLOSURE = new Set([
29
29
  'cordis-servers.test.mjs',
30
30
  'patch-writer.test.mjs',
31
+ 'stdio-env.test.mjs',
31
32
  'takeover.test.mjs',
32
33
  ])
33
34
 
@@ -1,8 +1,8 @@
1
1
  /**
2
2
  * Process-level environment-variable editor: a global key-value list shared
3
- * by every MCP server's header substitution. Values are referenced from
4
- * server headers as `${NAME}` or by bare name; secret values are stored in
5
- * the credentials document and never shown back.
3
+ * by every MCP server — injected into each stdio server's child process, and
4
+ * referenced from streamable-http header values as `${NAME}` or by bare name.
5
+ * Secret values are stored in the credentials document and never shown back.
6
6
  * @module dsh-mcp/client/GlobalEnvEditor
7
7
  */
8
8
 
@@ -353,8 +353,9 @@ export function McpSettingsSection(props: McpSettingsSectionProps): ReactNode {
353
353
  injected={{ envList: props.envList, envSet: props.envSet }}
354
354
  t={t}
355
355
  onApplied={() => {
356
- // New process env may feed header substitution: refresh server
357
- // rows (connection attempts re-resolve env) but keep the tool list.
356
+ // New process env may feed stdio children and header
357
+ // substitution: refresh server rows (connection attempts
358
+ // re-resolve env) but keep the tool list.
358
359
  refreshServer('')
359
360
  }}
360
361
  />
@@ -108,7 +108,7 @@ export const zh = {
108
108
  serversJsonSaving: '应用中…',
109
109
  serversJsonDone: '已应用',
110
110
  globalEnv: '进程环境变量',
111
- globalEnvHint: '进程级环境变量,供所有 MCP 服务器的请求头替换引用(headers 值写 ${变量名} 或直接写变量名)。secret 值写入凭据文档,不在此明文显示;留空保留原值。',
111
+ globalEnvHint: '进程级环境变量,供所有 MCP 服务器使用:stdio 服务器的子进程直接注入,streamable-http 服务器的请求头替换引用(headers 值写 ${变量名} 或直接写变量名),同名时服务器自身 env 优先。secret 值写入凭据文档,不在此明文显示;留空保留原值。',
112
112
  globalEnvName: '变量名',
113
113
  globalEnvValue: '值',
114
114
  globalEnvSecret: '私密',
@@ -238,7 +238,7 @@ export const en = {
238
238
  serversJsonSaving: 'Applying…',
239
239
  serversJsonDone: 'Applied',
240
240
  globalEnv: 'Process env vars',
241
- globalEnvHint: 'Process-level environment variables referenced by every server\'s header substitution (write ${NAME} or a bare name in a header value). Secret values are stored in the credentials document, never shown here; blank keeps the stored value.',
241
+ globalEnvHint: 'Process-level environment variables shared by every MCP server: injected into each stdio server\'s child process, and referenced by streamable-http header substitution (write ${NAME} or a bare name in a header value); a per-server env entry wins on collision. Secret values are stored in the credentials document, never shown here; blank keeps the stored value.',
242
242
  globalEnvName: 'Name',
243
243
  globalEnvValue: 'Value',
244
244
  globalEnvSecret: 'secret',
@@ -414,6 +414,7 @@ export const TYPERT_REMOTE = {
414
414
  mode: 'strict',
415
415
  typeSymbol: '@deepseek-ai/dsh-mcp-manager/types#McpManagerRemoveRequest',
416
416
  schema: _deepseek_ai_dsh_mcp_manager_mcpManager_delete_parameter_0$schema,
417
+ create: () => _deepseek_ai_dsh_mcp_manager_mcpManager_delete_parameter_0$schema,
417
418
  },
418
419
  },
419
420
  ],
@@ -421,6 +422,7 @@ export const TYPERT_REMOTE = {
421
422
  mode: 'strict',
422
423
  typeSymbol: '@deepseek-ai/dsh-mcp-manager/types#McpManagerRemoveResult',
423
424
  schema: _deepseek_ai_dsh_mcp_manager_mcpManager_delete_result$schema,
425
+ create: () => _deepseek_ai_dsh_mcp_manager_mcpManager_delete_result$schema,
424
426
  },
425
427
  sourceLocation: {"file":"packages/mcp/mcp-manager/src/index.ts","line":399,"column":9},
426
428
  },
@@ -436,6 +438,7 @@ export const TYPERT_REMOTE = {
436
438
  mode: 'strict',
437
439
  typeSymbol: '@deepseek-ai/dsh-mcp-manager/types#McpManagerListResult',
438
440
  schema: _deepseek_ai_dsh_mcp_manager_mcpManager_list_result$schema,
441
+ create: () => _deepseek_ai_dsh_mcp_manager_mcpManager_list_result$schema,
439
442
  },
440
443
  sourceLocation: {"file":"packages/mcp/mcp-manager/src/index.ts","line":314,"column":9},
441
444
  },
@@ -454,6 +457,7 @@ export const TYPERT_REMOTE = {
454
457
  mode: 'strict',
455
458
  typeSymbol: '@deepseek-ai/dsh-mcp-manager/types#McpManagerTestRequest',
456
459
  schema: _deepseek_ai_dsh_mcp_manager_mcpManager_test_parameter_0$schema,
460
+ create: () => _deepseek_ai_dsh_mcp_manager_mcpManager_test_parameter_0$schema,
457
461
  },
458
462
  },
459
463
  ],
@@ -461,6 +465,7 @@ export const TYPERT_REMOTE = {
461
465
  mode: 'strict',
462
466
  typeSymbol: '@deepseek-ai/dsh-mcp-manager/types#McpManagerTestResult',
463
467
  schema: _deepseek_ai_dsh_mcp_manager_mcpManager_test_result$schema,
468
+ create: () => _deepseek_ai_dsh_mcp_manager_mcpManager_test_result$schema,
464
469
  },
465
470
  sourceLocation: {"file":"packages/mcp/mcp-manager/src/index.ts","line":422,"column":9},
466
471
  },
@@ -479,6 +484,7 @@ export const TYPERT_REMOTE = {
479
484
  mode: 'strict',
480
485
  typeSymbol: '@deepseek-ai/dsh-mcp-manager/types#McpManagerUpsertRequest',
481
486
  schema: _deepseek_ai_dsh_mcp_manager_mcpManager_upsert_parameter_0$schema,
487
+ create: () => _deepseek_ai_dsh_mcp_manager_mcpManager_upsert_parameter_0$schema,
482
488
  },
483
489
  },
484
490
  ],
@@ -486,6 +492,7 @@ export const TYPERT_REMOTE = {
486
492
  mode: 'strict',
487
493
  typeSymbol: '@deepseek-ai/dsh-mcp-manager/types#McpManagerUpsertResult',
488
494
  schema: _deepseek_ai_dsh_mcp_manager_mcpManager_upsert_result$schema,
495
+ create: () => _deepseek_ai_dsh_mcp_manager_mcpManager_upsert_result$schema,
489
496
  },
490
497
  sourceLocation: {"file":"packages/mcp/mcp-manager/src/index.ts","line":329,"column":9},
491
498
  },
@@ -504,6 +511,7 @@ export const TYPERT_REMOTE = {
504
511
  mode: 'strict',
505
512
  typeSymbol: '@deepseek-ai/dsh-mcp-manager/types#McpManagerUpsertJsonRequest',
506
513
  schema: _deepseek_ai_dsh_mcp_manager_mcpManager_upsertJson_parameter_0$schema,
514
+ create: () => _deepseek_ai_dsh_mcp_manager_mcpManager_upsertJson_parameter_0$schema,
507
515
  },
508
516
  },
509
517
  ],
@@ -511,6 +519,7 @@ export const TYPERT_REMOTE = {
511
519
  mode: 'strict',
512
520
  typeSymbol: '@deepseek-ai/dsh-mcp-manager/types#McpManagerUpsertJsonResult',
513
521
  schema: _deepseek_ai_dsh_mcp_manager_mcpManager_upsertJson_result$schema,
522
+ create: () => _deepseek_ai_dsh_mcp_manager_mcpManager_upsertJson_result$schema,
514
523
  },
515
524
  sourceLocation: {"file":"lib/index.js"},
516
525
  },
@@ -526,6 +535,7 @@ export const TYPERT_REMOTE = {
526
535
  mode: 'strict',
527
536
  typeSymbol: '@deepseek-ai/dsh-mcp-manager/types#McpManagerToolsListResult',
528
537
  schema: _deepseek_ai_dsh_mcp_manager_mcpManager_toolsList_result$schema,
538
+ create: () => _deepseek_ai_dsh_mcp_manager_mcpManager_toolsList_result$schema,
529
539
  },
530
540
  sourceLocation: {"file":"lib/index.js"},
531
541
  },
@@ -544,6 +554,7 @@ export const TYPERT_REMOTE = {
544
554
  mode: 'strict',
545
555
  typeSymbol: '@deepseek-ai/dsh-mcp-manager/types#McpManagerToolsSetRequest',
546
556
  schema: _deepseek_ai_dsh_mcp_manager_mcpManager_toolsSet_parameter_0$schema,
557
+ create: () => _deepseek_ai_dsh_mcp_manager_mcpManager_toolsSet_parameter_0$schema,
547
558
  },
548
559
  },
549
560
  ],
@@ -551,6 +562,7 @@ export const TYPERT_REMOTE = {
551
562
  mode: 'strict',
552
563
  typeSymbol: '@deepseek-ai/dsh-mcp-manager/types#McpManagerToolsSetResult',
553
564
  schema: _deepseek_ai_dsh_mcp_manager_mcpManager_toolsSet_result$schema,
565
+ create: () => _deepseek_ai_dsh_mcp_manager_mcpManager_toolsSet_result$schema,
554
566
  },
555
567
  sourceLocation: {"file":"lib/index.js"},
556
568
  },
@@ -569,6 +581,7 @@ export const TYPERT_REMOTE = {
569
581
  mode: 'strict',
570
582
  typeSymbol: '@deepseek-ai/dsh-mcp-manager/types#McpManagerToolsModeRequest',
571
583
  schema: _deepseek_ai_dsh_mcp_manager_mcpManager_toolsMode_parameter_0$schema,
584
+ create: () => _deepseek_ai_dsh_mcp_manager_mcpManager_toolsMode_parameter_0$schema,
572
585
  },
573
586
  },
574
587
  ],
@@ -576,6 +589,7 @@ export const TYPERT_REMOTE = {
576
589
  mode: 'strict',
577
590
  typeSymbol: '@deepseek-ai/dsh-mcp-manager/types#McpManagerToolsModeResult',
578
591
  schema: _deepseek_ai_dsh_mcp_manager_mcpManager_toolsMode_result$schema,
592
+ create: () => _deepseek_ai_dsh_mcp_manager_mcpManager_toolsMode_result$schema,
579
593
  },
580
594
  sourceLocation: {"file":"lib/index.js"},
581
595
  },
@@ -591,6 +605,7 @@ export const TYPERT_REMOTE = {
591
605
  mode: 'strict',
592
606
  typeSymbol: '@deepseek-ai/dsh-mcp-manager/types#McpManagerEnvListResult',
593
607
  schema: _deepseek_ai_dsh_mcp_manager_mcpManager_envList_result$schema,
608
+ create: () => _deepseek_ai_dsh_mcp_manager_mcpManager_envList_result$schema,
594
609
  },
595
610
  sourceLocation: {"file":"lib/index.js"},
596
611
  },
@@ -609,6 +624,7 @@ export const TYPERT_REMOTE = {
609
624
  mode: 'strict',
610
625
  typeSymbol: '@deepseek-ai/dsh-mcp-manager/types#McpManagerEnvSetRequest',
611
626
  schema: _deepseek_ai_dsh_mcp_manager_mcpManager_envSet_parameter_0$schema,
627
+ create: () => _deepseek_ai_dsh_mcp_manager_mcpManager_envSet_parameter_0$schema,
612
628
  },
613
629
  },
614
630
  ],
@@ -616,6 +632,7 @@ export const TYPERT_REMOTE = {
616
632
  mode: 'strict',
617
633
  typeSymbol: '@deepseek-ai/dsh-mcp-manager/types#McpManagerEnvSetResult',
618
634
  schema: _deepseek_ai_dsh_mcp_manager_mcpManager_envSet_result$schema,
635
+ create: () => _deepseek_ai_dsh_mcp_manager_mcpManager_envSet_result$schema,
619
636
  },
620
637
  sourceLocation: {"file":"lib/index.js"},
621
638
  },
@@ -634,6 +651,7 @@ export const TYPERT_REMOTE = {
634
651
  mode: 'strict',
635
652
  typeSymbol: '@deepseek-ai/dsh-mcp-manager/types#McpManagerAdoptRequest',
636
653
  schema: _deepseek_ai_dsh_mcp_manager_mcpManager_adopt_parameter_0$schema,
654
+ create: () => _deepseek_ai_dsh_mcp_manager_mcpManager_adopt_parameter_0$schema,
637
655
  },
638
656
  },
639
657
  ],
@@ -641,6 +659,7 @@ export const TYPERT_REMOTE = {
641
659
  mode: 'strict',
642
660
  typeSymbol: '@deepseek-ai/dsh-mcp-manager/types#McpManagerAdoptResult',
643
661
  schema: _deepseek_ai_dsh_mcp_manager_mcpManager_adopt_result$schema,
662
+ create: () => _deepseek_ai_dsh_mcp_manager_mcpManager_adopt_result$schema,
644
663
  },
645
664
  sourceLocation: {"file":"lib/index.js"},
646
665
  },
@@ -659,6 +678,7 @@ export const TYPERT_REMOTE = {
659
678
  mode: 'strict',
660
679
  typeSymbol: '@deepseek-ai/dsh-mcp-manager/types#McpManagerReleaseRequest',
661
680
  schema: _deepseek_ai_dsh_mcp_manager_mcpManager_release_parameter_0$schema,
681
+ create: () => _deepseek_ai_dsh_mcp_manager_mcpManager_release_parameter_0$schema,
662
682
  },
663
683
  },
664
684
  ],
@@ -666,6 +686,7 @@ export const TYPERT_REMOTE = {
666
686
  mode: 'strict',
667
687
  typeSymbol: '@deepseek-ai/dsh-mcp-manager/types#McpManagerReleaseResult',
668
688
  schema: _deepseek_ai_dsh_mcp_manager_mcpManager_release_result$schema,
689
+ create: () => _deepseek_ai_dsh_mcp_manager_mcpManager_release_result$schema,
669
690
  },
670
691
  sourceLocation: {"file":"lib/index.js"},
671
692
  },