@sunt2049/dsh-mcp-manager 0.0.0-stage → 0.2.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/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 <你的名字>
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
package/README.md CHANGED
@@ -1,3 +1,58 @@
1
- # Temporary Holding Version
1
+ # @sunt2049/dsh-mcp-manager
2
2
 
3
- This version is a temporary placeholder for this package. An operational version to replace this has been submitted for review and is awaiting a staged release.
3
+ DeepSeek Harness(DSH)的 **MCP 控制台**:在设置页里把当前 profile 的所有 MCP 服务器看清楚、改得动。
4
+
5
+ ![icon](./icon.svg)
6
+
7
+ ## 它解决什么
8
+
9
+ 社区里的 MCP 管理面板大多只是 `cordis.patch.yml` 的增删改壳子 —— 因为它们拿不到"MCP 到底连上没有"。本插件把三件被忽视的数据接了起来:
10
+
11
+ | 能力 | 数据来源 |
12
+ |---|---|
13
+ | 每个服务器**实际注册了多少工具** | `ctx.tools.schemas()` 里所有 `mcp__<server>__*` |
14
+ | 每个工具的**完整 JSON Schema** | 同上,按需取,不塞进首屏 |
15
+ | 配置**改完是否真的生效** | 保存走 `ctx.configEditor.edit`(Loader 就地重载连接),而不是猜文件 |
16
+
17
+ ## 功能
18
+
19
+ - **服务器总览**:传输方式、端点 / 命令行、工具数、env / headers 的键名(值不回显)、超时
20
+ - **工具清单 + Schema**:按服务器分组、可搜索、点「参数」看完整 JSON Schema 并可复制
21
+ - **连通性探测**:区分「端口不通」「端口通了但 MCP 握手失败」「握手成功」;stdio 类型则检查 `command` 与参数里的绝对路径是否存在
22
+ - **添加 / 删除 / 停用 / 启用**:直接维护 profile 的 `cordis.patch.yml`
23
+ - **停用可恢复**:摘掉的行原样暂存,启用时**按原位置插回**
24
+ - **编辑配置**:url / command / args / 超时 / failOnStartupError,即时生效
25
+
26
+ ## 安装
27
+
28
+ ```bash
29
+ dsh plugin --profile web add @sunt2049/dsh-mcp-manager
30
+ ```
31
+
32
+ 或从 Git 仓库:
33
+
34
+ ```bash
35
+ dsh plugin --profile web add github:<owner>/<repo>
36
+ ```
37
+
38
+ 装完重启一次 DSH,在 **设置 → MCP 控制台** 里使用。
39
+
40
+ ## 两条重要的行为差异
41
+
42
+ 1. **「编辑配置」是即时生效的**,因为走 `configEditor`,MCP 客户端会就地重载那一条连接。
43
+ 2. **「添加 / 删除 / 停用 / 启用」只写文件,需要重启 DSH 才生效**。DSH 不监听 `cordis.patch.yml`(实测:把整行删掉后工具数不变),所以面板会显示「待重启」横幅,直到文件内容与启动时不同。
44
+
45
+ ## 写入行为的边界
46
+
47
+ - 用块级解析器读写文档,**注释、空行、以及不属于 MCP 的行一律原样保留**;解析结果无法逐字节还原时直接**拒绝写入**,绝不"尽力而为"地重排你的配置。
48
+ - 停用记录按 profile 分文件:`profiles/<profile>/mcp-manager/disabled.json`。
49
+ - 只有本 profile 的 `cordis.patch.yml` 里的行能删;来自其它层(例如 agent preset、其它 patch 文件)的行会标注并禁用按钮。
50
+
51
+ ## 兼容性
52
+
53
+ - 需要 DSH `0.2.0-rc.2` 及以上(`peerDependencies` 会由宿主做兼容性闸门检查)
54
+ - 客户端插件 `platform: web`,Web GUI 与桌面端(Electron)通用
55
+
56
+ ## 许可证
57
+
58
+ MIT