@dawn0608/dsh-mcp-manager 0.0.0-stage → 0.1.2
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 +21 -0
- package/README.md +74 -2
- package/README.zh.md +75 -0
- package/cordis.patch.yml +3 -0
- package/icon.svg +6 -0
- package/lib/client.js +590 -0
- package/lib/client.js.map +7 -0
- package/lib/index.js +8774 -0
- package/lib/index.js.map +7 -0
- package/locale/en.json +7 -0
- package/locale/zh.json +7 -0
- package/package.json +73 -4
package/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 dawn0608
|
|
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,75 @@
|
|
|
1
|
-
#
|
|
1
|
+
# MCP Management
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
[中文](README.zh.md) | English
|
|
4
|
+
|
|
5
|
+
In DeepSeek Harness, open **Settings → MCP Management** to see the servers configured in the current profile's user patch. Each row shows the server name, transport (STDIO or Streamable HTTP), and whether the server is enabled.
|
|
6
|
+
|
|
7
|
+
## Manage servers
|
|
8
|
+
|
|
9
|
+
- Use the switch on an editable row to enable or disable the server. The switch updates the row's `disabled` setting, and Harness hot reloads the change.
|
|
10
|
+
- Add, edit, or remove servers in the profile's `cordis.patch.yml`. You can give your assistant the provider's setup instructions and ask it to edit that file. The panel refreshes while it is open.
|
|
11
|
+
- Rows outside a top-level `insert` list, with missing or duplicate IDs, with conditional `disabled` values, or with another unsupported shape are read-only. The panel also flags duplicate server names.
|
|
12
|
+
|
|
13
|
+
## Credentials
|
|
14
|
+
|
|
15
|
+
Store sensitive MCP values (env values, header values) with the Loader `!!js` reference Harness supports instead of plaintext:
|
|
16
|
+
|
|
17
|
+
```yaml
|
|
18
|
+
env:
|
|
19
|
+
MCP_TOKEN: !!js 'process.env.MCP_TOKEN'
|
|
20
|
+
headers:
|
|
21
|
+
Authorization: !!js '`Bearer ${process.env.MCP_TOKEN}`'
|
|
22
|
+
```
|
|
23
|
+
|
|
24
|
+
References resolve against the Harness process environment.
|
|
25
|
+
|
|
26
|
+
## Install
|
|
27
|
+
|
|
28
|
+
Requires DeepSeek Harness `>=0.2.2-rc.1 <0.3.0`.
|
|
29
|
+
|
|
30
|
+
In Desktop, open **Plugins → Add plugin** and enter `@dawn0608/dsh-mcp-manager`. For a CLI-managed profile, run:
|
|
31
|
+
|
|
32
|
+
```bash
|
|
33
|
+
dsh plugin --profile <profile> add @dawn0608/dsh-mcp-manager
|
|
34
|
+
```
|
|
35
|
+
|
|
36
|
+
You can also download the `.tgz` from [GitHub Releases](https://github.com/dawn0608/dsh-plugins/releases?q=mcp-manager) and install it with `dsh plugin --profile <profile> add /path/to/package.tgz`. Fully quit Harness Desktop before using the CLI to manage its profile.
|
|
37
|
+
|
|
38
|
+
To install from source, build from the repository root:
|
|
39
|
+
|
|
40
|
+
```bash
|
|
41
|
+
npm ci
|
|
42
|
+
npm run build --workspace @dawn0608/dsh-mcp-manager
|
|
43
|
+
```
|
|
44
|
+
|
|
45
|
+
Then select the local `plugins/mcp-manager` directory in the plugin picker. If an older installation is present, remove it before switching installation sources. Open **Settings → MCP Management** after installation and restart Harness if prompted.
|
|
46
|
+
|
|
47
|
+
## Configuration
|
|
48
|
+
|
|
49
|
+
The plugin has no required configuration. Optional:
|
|
50
|
+
|
|
51
|
+
```yaml
|
|
52
|
+
- id: mcp-manager
|
|
53
|
+
name: '@dawn0608/dsh-mcp-manager'
|
|
54
|
+
config:
|
|
55
|
+
patchPath: /absolute/path/to/cordis.patch.yml
|
|
56
|
+
```
|
|
57
|
+
|
|
58
|
+
Use `patchPath` only for a non-standard profile layout; the default derives from `DSH_PROFILE_DIR`.
|
|
59
|
+
|
|
60
|
+
## Limitations
|
|
61
|
+
|
|
62
|
+
The panel manages the current profile's user patch. Bundle-provided services, other profiles, and the Codex and Claude Code configurations are managed separately.
|
|
63
|
+
|
|
64
|
+
## Development
|
|
65
|
+
|
|
66
|
+
```bash
|
|
67
|
+
npm test # builds first; covers patch editing, validation, references, locking and atomic writes, and the state API
|
|
68
|
+
npm run verify # from the repository root
|
|
69
|
+
```
|
|
70
|
+
|
|
71
|
+
The host bundle includes the ISC-licensed `yaml` dependency. [Upstream license](https://github.com/eemeli/yaml/blob/main/LICENSE)
|
|
72
|
+
|
|
73
|
+
## License
|
|
74
|
+
|
|
75
|
+
MIT
|
package/README.zh.md
ADDED
|
@@ -0,0 +1,75 @@
|
|
|
1
|
+
# MCP 管理
|
|
2
|
+
|
|
3
|
+
[English](README.md) | 中文
|
|
4
|
+
|
|
5
|
+
在 DeepSeek Harness 打开「设置 → MCP 管理」,查看当前 profile 用户补丁中的 MCP 服务。每行显示服务名、传输方式(STDIO 或 Streamable HTTP)和启用状态。
|
|
6
|
+
|
|
7
|
+
## 管理服务
|
|
8
|
+
|
|
9
|
+
- 用可编辑条目上的开关启停服务。开关更新条目的 `disabled` 设置,Harness 会热加载变更。
|
|
10
|
+
- 在当前 profile 的 `cordis.patch.yml` 中添加、编辑或删除服务。也可把服务提供方的安装说明交给 AI,请它修改该文件。面板打开时会自动刷新。
|
|
11
|
+
- 顶层 `insert` 列表之外的条目、缺少 ID 或 ID 重复的条目、使用条件式 `disabled` 的条目,以及其他无法安全修改的条目均为只读。面板也会标出同名服务。
|
|
12
|
+
|
|
13
|
+
## 凭据
|
|
14
|
+
|
|
15
|
+
MCP 配置里的敏感值(env 值、请求头值)建议使用 Harness 支持的 Loader `!!js` 引用,而不是写入明文:
|
|
16
|
+
|
|
17
|
+
```yaml
|
|
18
|
+
env:
|
|
19
|
+
MCP_TOKEN: !!js 'process.env.MCP_TOKEN'
|
|
20
|
+
headers:
|
|
21
|
+
Authorization: !!js '`Bearer ${process.env.MCP_TOKEN}`'
|
|
22
|
+
```
|
|
23
|
+
|
|
24
|
+
引用值由 Harness 进程环境提供。
|
|
25
|
+
|
|
26
|
+
## 安装
|
|
27
|
+
|
|
28
|
+
适用于 DeepSeek Harness `>=0.2.2-rc.1 <0.3.0`。
|
|
29
|
+
|
|
30
|
+
在 Desktop 打开「插件 → 添加插件」,输入 `@dawn0608/dsh-mcp-manager`。通过 CLI 管理 profile 时,可运行以下命令。
|
|
31
|
+
|
|
32
|
+
```bash
|
|
33
|
+
dsh plugin --profile <profile> add @dawn0608/dsh-mcp-manager
|
|
34
|
+
```
|
|
35
|
+
|
|
36
|
+
也可从 [GitHub Releases](https://github.com/dawn0608/dsh-plugins/releases?q=mcp-manager) 下载 `.tgz`,再运行 `dsh plugin --profile <profile> add /path/to/package.tgz` 安装。用 CLI 管理 desktop profile 前请完全退出 Harness Desktop。
|
|
37
|
+
|
|
38
|
+
从源码安装时,在仓库根目录构建。
|
|
39
|
+
|
|
40
|
+
```bash
|
|
41
|
+
npm ci
|
|
42
|
+
npm run build --workspace @dawn0608/dsh-mcp-manager
|
|
43
|
+
```
|
|
44
|
+
|
|
45
|
+
构建完成后,通过本地包入口选择 `plugins/mcp-manager`。切换安装来源时,先移除已有安装。安装后打开「设置 → MCP 管理」,按应用提示重启。
|
|
46
|
+
|
|
47
|
+
## 配置
|
|
48
|
+
|
|
49
|
+
插件自身没有必填配置。可选:
|
|
50
|
+
|
|
51
|
+
```yaml
|
|
52
|
+
- id: mcp-manager
|
|
53
|
+
name: '@dawn0608/dsh-mcp-manager'
|
|
54
|
+
config:
|
|
55
|
+
patchPath: /absolute/path/to/cordis.patch.yml
|
|
56
|
+
```
|
|
57
|
+
|
|
58
|
+
`patchPath` 只应在非标准 profile 布局下使用;默认从 `DSH_PROFILE_DIR` 推导。
|
|
59
|
+
|
|
60
|
+
## 限制
|
|
61
|
+
|
|
62
|
+
面板管理当前 profile 的用户补丁。bundle 自带服务、其他 profile 以及 Codex 和 Claude Code 的配置各自独立管理。
|
|
63
|
+
|
|
64
|
+
## 开发
|
|
65
|
+
|
|
66
|
+
```bash
|
|
67
|
+
npm test # 含构建;单元测试覆盖补丁编辑、校验、引用、锁与原子写、状态接口
|
|
68
|
+
npm run verify # 仓库根目录
|
|
69
|
+
```
|
|
70
|
+
|
|
71
|
+
Host 构建产物内联了采用 ISC 许可证的 `yaml` 依赖。[上游许可证](https://github.com/eemeli/yaml/blob/main/LICENSE)
|
|
72
|
+
|
|
73
|
+
## 许可证
|
|
74
|
+
|
|
75
|
+
MIT
|
package/cordis.patch.yml
ADDED
package/icon.svg
ADDED
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 36 36" width="36" height="36">
|
|
2
|
+
<path d="M15 9v4m6-4v4M13 13h10v2a5 5 0 0 1-10 0zM18 20v4m-8 2v-2h16v2"
|
|
3
|
+
fill="none" stroke="#527ee8" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/>
|
|
4
|
+
<circle cx="10" cy="26" r="2" fill="#527ee8"/>
|
|
5
|
+
<circle cx="26" cy="26" r="2" fill="#527ee8"/>
|
|
6
|
+
</svg>
|