@dawn0608/dsh-mcp-manager 0.0.0-stage → 0.1.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/LICENSE +21 -0
- package/README.md +70 -2
- package/README.zh.md +71 -0
- package/cordis.patch.yml +3 -0
- package/icon.svg +7 -0
- package/lib/client.js +604 -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,71 @@
|
|
|
1
|
-
#
|
|
1
|
+
# MCP Management
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
View and toggle MCP servers for the current Desktop profile under **Settings → MCP Management**. The panel supports local `stdio` and remote Streamable HTTP servers.
|
|
4
|
+
|
|
5
|
+
- Each row shows the server name, transport (STDIO or Streamable HTTP), and enablement switch.
|
|
6
|
+
- Give the provider’s setup instructions to your AI assistant so it can update the profile’s `cordis.patch.yml`. The panel automatically picks up configuration changes while open.
|
|
7
|
+
- The switch updates the selected row’s `disabled` state under the profile writer lock. Harness hot reloads the change, and external synchronizers pick it up on their next poll.
|
|
8
|
+
|
|
9
|
+
## Credentials
|
|
10
|
+
|
|
11
|
+
Store sensitive MCP values (env values, header values) with the Loader `!!js` reference Harness supports instead of plaintext:
|
|
12
|
+
|
|
13
|
+
```yaml
|
|
14
|
+
env:
|
|
15
|
+
MCP_TOKEN: !!js 'process.env.MCP_TOKEN'
|
|
16
|
+
headers:
|
|
17
|
+
Authorization: !!js '`Bearer ${process.env.MCP_TOKEN}`'
|
|
18
|
+
```
|
|
19
|
+
|
|
20
|
+
References resolve against the Harness process environment.
|
|
21
|
+
|
|
22
|
+
## Install
|
|
23
|
+
|
|
24
|
+
In Desktop, open **Plugins → Add plugin** and enter `@dawn0608/dsh-mcp-manager`. For a CLI-managed profile, run:
|
|
25
|
+
|
|
26
|
+
```bash
|
|
27
|
+
dsh plugin --profile <profile> add @dawn0608/dsh-mcp-manager
|
|
28
|
+
```
|
|
29
|
+
|
|
30
|
+
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.
|
|
31
|
+
|
|
32
|
+
To install from source, build from the repository root:
|
|
33
|
+
|
|
34
|
+
```bash
|
|
35
|
+
npm install
|
|
36
|
+
npm run build
|
|
37
|
+
```
|
|
38
|
+
|
|
39
|
+
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.
|
|
40
|
+
|
|
41
|
+
## Configuration
|
|
42
|
+
|
|
43
|
+
The plugin has no required configuration. Optional:
|
|
44
|
+
|
|
45
|
+
```yaml
|
|
46
|
+
- id: mcp-manager
|
|
47
|
+
name: '@dawn0608/dsh-mcp-manager'
|
|
48
|
+
config:
|
|
49
|
+
patchPath: /absolute/path/to/cordis.patch.yml
|
|
50
|
+
```
|
|
51
|
+
|
|
52
|
+
Use `patchPath` only for a non-standard profile layout; the default derives from `DSH_PROFILE_DIR`.
|
|
53
|
+
|
|
54
|
+
## Limitations
|
|
55
|
+
|
|
56
|
+
- Only the current profile's **user patch file** is managed; bundle-provided rows, Codex/Claude configuration, and other profiles are out of scope.
|
|
57
|
+
- Rows must sit in a top-level `insert` list, carry a unique id, and use a boolean `disabled`; entries that cannot be safely toggled are shown as read-only.
|
|
58
|
+
- The list flags duplicate names in the same file.
|
|
59
|
+
- Rows using `!!js`, `headers`, or a non-portable environment are skipped by the three-end synchronizer by design: credentials stay local.
|
|
60
|
+
- `yaml` is used at build time and inlined into `lib/index.js`, so the runtime has no extra dependency; see the upstream `eemeli/yaml` repository for its ISC license.
|
|
61
|
+
|
|
62
|
+
## Development
|
|
63
|
+
|
|
64
|
+
```bash
|
|
65
|
+
npm test # builds first; covers patch editing, validation, references, locking and atomic writes, and the state API
|
|
66
|
+
npm run verify # from the repository root
|
|
67
|
+
```
|
|
68
|
+
|
|
69
|
+
## License
|
|
70
|
+
|
|
71
|
+
MIT
|
package/README.zh.md
ADDED
|
@@ -0,0 +1,71 @@
|
|
|
1
|
+
# MCP 管理
|
|
2
|
+
|
|
3
|
+
在 DeepSeek Harness「设置 → MCP 管理」中查看当前 Desktop profile 的 MCP 服务,并启用或停用服务。
|
|
4
|
+
|
|
5
|
+
- 每行显示服务名、传输方式(STDIO 或 Streamable HTTP)和启停开关。
|
|
6
|
+
- 可把服务提供方的安装说明交给 AI,让它更新当前 profile 的 `cordis.patch.yml`。面板打开时会自动同步配置变化。
|
|
7
|
+
- 开关通过 profile 写锁和原子写入修改目标条目的 `disabled` 状态。Harness 热加载变更,监听该文件的同步器会在后续轮询时读取它。
|
|
8
|
+
|
|
9
|
+
## 凭据
|
|
10
|
+
|
|
11
|
+
MCP 配置里的敏感值(env 值、请求头值)建议使用 Harness 支持的 Loader `!!js` 引用,而不是写入明文:
|
|
12
|
+
|
|
13
|
+
```yaml
|
|
14
|
+
env:
|
|
15
|
+
MCP_TOKEN: !!js 'process.env.MCP_TOKEN'
|
|
16
|
+
headers:
|
|
17
|
+
Authorization: !!js '`Bearer ${process.env.MCP_TOKEN}`'
|
|
18
|
+
```
|
|
19
|
+
|
|
20
|
+
引用值由 Harness 进程环境提供。
|
|
21
|
+
|
|
22
|
+
## 安装
|
|
23
|
+
|
|
24
|
+
在 Desktop 打开「插件 → 添加插件」,输入 `@dawn0608/dsh-mcp-manager`。通过 CLI 管理 profile 时,可运行以下命令。
|
|
25
|
+
|
|
26
|
+
```bash
|
|
27
|
+
dsh plugin --profile <profile> add @dawn0608/dsh-mcp-manager
|
|
28
|
+
```
|
|
29
|
+
|
|
30
|
+
也可从 [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。
|
|
31
|
+
|
|
32
|
+
从源码安装时,在仓库根目录构建。
|
|
33
|
+
|
|
34
|
+
```bash
|
|
35
|
+
npm install
|
|
36
|
+
npm run build
|
|
37
|
+
```
|
|
38
|
+
|
|
39
|
+
构建完成后,通过本地包入口选择 `plugins/mcp-manager`。切换安装来源时,先移除已有安装。安装后打开「设置 → MCP 管理」,按应用提示重启。
|
|
40
|
+
|
|
41
|
+
## 配置
|
|
42
|
+
|
|
43
|
+
插件自身没有必填配置。可选:
|
|
44
|
+
|
|
45
|
+
```yaml
|
|
46
|
+
- id: mcp-manager
|
|
47
|
+
name: '@dawn0608/dsh-mcp-manager'
|
|
48
|
+
config:
|
|
49
|
+
patchPath: /absolute/path/to/cordis.patch.yml
|
|
50
|
+
```
|
|
51
|
+
|
|
52
|
+
`patchPath` 只应在非标准 profile 布局下使用;默认从 `DSH_PROFILE_DIR` 推导。
|
|
53
|
+
|
|
54
|
+
## 限制
|
|
55
|
+
|
|
56
|
+
- 只管理当前 profile 的 **用户 patch 文件**;bundle 自带行、Codex/Claude 配置、其他 profile 不在范围内。
|
|
57
|
+
- 行必须位于顶层 `insert` 列表、id 唯一、`disabled` 为布尔值;无法安全启停的条目显示为只读。
|
|
58
|
+
- 列表会标出同一文件内的重名服务。
|
|
59
|
+
- 带 `!!js`、`headers` 或非可移植环境的条目会被三端同步器标记为 skipped,这是有意为之:凭据留在本机。
|
|
60
|
+
- `yaml` 仅在构建时使用并内联进 `lib/index.js`,运行期没有额外依赖;其 ISC 许可证见上游仓库 `eemeli/yaml`。
|
|
61
|
+
|
|
62
|
+
## 开发
|
|
63
|
+
|
|
64
|
+
```bash
|
|
65
|
+
npm test # 含构建;单元测试覆盖补丁编辑、校验、引用、锁与原子写、状态接口
|
|
66
|
+
npm run verify # 仓库根目录
|
|
67
|
+
```
|
|
68
|
+
|
|
69
|
+
## 许可证
|
|
70
|
+
|
|
71
|
+
MIT
|
package/cordis.patch.yml
ADDED
package/icon.svg
ADDED
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 64 64" width="64" height="64">
|
|
2
|
+
<rect x="4" y="4" width="56" height="56" rx="15" fill="#3f6fe0"/>
|
|
3
|
+
<path d="M22 23 32 42 42 23" fill="none" stroke="#ffffff" stroke-width="3.2" stroke-linecap="round" stroke-linejoin="round" opacity="0.9"/>
|
|
4
|
+
<circle cx="22" cy="23" r="5" fill="#ffffff"/>
|
|
5
|
+
<circle cx="42" cy="23" r="5" fill="#ffffff"/>
|
|
6
|
+
<circle cx="32" cy="42" r="5" fill="#ffffff"/>
|
|
7
|
+
</svg>
|