@tachec/dsh-mcp-manage 0.0.0-stage → 1.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/CHANGELOG.md +51 -0
- package/LICENSE +21 -0
- package/README.en.md +194 -0
- package/README.md +242 -3
- package/client.js +2354 -0
- package/cordis.patch.yml +6 -0
- package/icon.svg +11 -0
- package/index.js +1033 -0
- package/locale/en.json +6 -0
- package/locale/zh.json +6 -0
- package/package.json +61 -6
package/CHANGELOG.md
ADDED
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
# Changelog
|
|
2
|
+
|
|
3
|
+
## 1.2.0 — 2026-11-21
|
|
4
|
+
|
|
5
|
+
### Changed
|
|
6
|
+
|
|
7
|
+
- Renamed the package, bundle row, management route, settings section, main
|
|
8
|
+
panel key, sidebar entry and preference directory from `dsh-mcp-hub` to
|
|
9
|
+
`dsh-mcp-manage`.
|
|
10
|
+
- Repository metadata now points at
|
|
11
|
+
`https://github.com/tachec/dsh-mcp-manage`; the README install paths and the
|
|
12
|
+
community submission entry use the new name.
|
|
13
|
+
- The plugin list title is now **MCP manager / MCP 管理**.
|
|
14
|
+
|
|
15
|
+
## 1.1.0 — 2026-11-20
|
|
16
|
+
|
|
17
|
+
### Added
|
|
18
|
+
|
|
19
|
+
- Sidebar shortcut: an optional **MCP** entry in the DSH sidebar that opens the
|
|
20
|
+
manager as a global main panel, controlled by a switch on the page.
|
|
21
|
+
- Host-backed sidebar preference (`$DSH_HOME/dsh-mcp-hub/preferences.json`) with
|
|
22
|
+
a browser-local cache so the entry registers synchronously at boot.
|
|
23
|
+
- Main-panel page layout with its own title, padding and max width.
|
|
24
|
+
- Per-server enable/disable, probe and restart actions with per-card progress
|
|
25
|
+
and error feedback.
|
|
26
|
+
- JSON editing for managed servers, prefilled from the current configuration.
|
|
27
|
+
- Localized error messages driven by the Host's stable error codes.
|
|
28
|
+
- `test/host-smoke.mjs` and `test/client-render-smoke.mjs`, run with `npm test`.
|
|
29
|
+
- Chinese README as the default document, an English `README.en.md`, an MIT
|
|
30
|
+
license, and a repository `.gitignore`.
|
|
31
|
+
|
|
32
|
+
### Fixed
|
|
33
|
+
|
|
34
|
+
- The primary Add/Save buttons kept a near-white theme fill in dark mode and hid
|
|
35
|
+
white text; they now use a stable blue fill with a high-contrast ink.
|
|
36
|
+
- The injected stylesheet was created once and never refreshed on a plugin
|
|
37
|
+
reload, so later layout rules were missing until a full page refresh.
|
|
38
|
+
- Static-row toggles now report when a change needs a restart.
|
|
39
|
+
- Long command/URL/error strings wrap inside cards.
|
|
40
|
+
|
|
41
|
+
## 1.0.0 — 2026-11-20
|
|
42
|
+
|
|
43
|
+
### Added
|
|
44
|
+
|
|
45
|
+
- Initial release.
|
|
46
|
+
- Managed MCP servers through `@deepseek-ai/dsh-mcp-manager`: add (form or
|
|
47
|
+
JSON), edit, delete, enable/disable, probe, restart, live status and tools.
|
|
48
|
+
- Static `@deepseek-ai/dsh-mcp-client` rows: inspect, enable/disable, edit.
|
|
49
|
+
- Import from Claude Desktop, Cursor, VS Code, Windsurf, Cline, Roo Code, Trae
|
|
50
|
+
and Claude Code configuration files.
|
|
51
|
+
- Settings section **MCP** with bilingual copy and a plugin icon.
|
package/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 dsh-mcp-manage contributors
|
|
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.en.md
ADDED
|
@@ -0,0 +1,194 @@
|
|
|
1
|
+
# dsh-mcp-manage
|
|
2
|
+
|
|
3
|
+
**English** · [中文](README.md)
|
|
4
|
+
|
|
5
|
+
A single place to manage every MCP server in DeepSeek Harness (dsh): add, edit, delete, inspect, start/stop, probe and restart — without editing YAML by hand.
|
|
6
|
+
|
|
7
|
+
The plugin registers a management page under **Settings → MCP** and optionally a **MCP** icon in the left sidebar that opens the same page as a full main panel. It drives the stock `@deepseek-ai/dsh-mcp-manager` fleet and also lists statically composed `@deepseek-ai/dsh-mcp-client` rows, so both the managed fleet and static rows are visible in one place.
|
|
8
|
+
|
|
9
|
+
## Features
|
|
10
|
+
|
|
11
|
+
- **Managed servers, full CRUD**
|
|
12
|
+
- `stdio` and `streamable-http` transports;
|
|
13
|
+
- add with a form or by pasting JSON (Claude Desktop / Cursor `mcpServers` format supported);
|
|
14
|
+
- changes are written to the current profile and applied live — no restart;
|
|
15
|
+
- enable/disable without deleting the entry;
|
|
16
|
+
- one-click probe (connect + list tools) and restart (fresh connection, reset reconnect budget);
|
|
17
|
+
- live status, tool count, tool names and full configuration.
|
|
18
|
+
- **Static rows**
|
|
19
|
+
- lists `@deepseek-ai/dsh-mcp-client` rows declared by the profile or a plugin patch;
|
|
20
|
+
- inspect status/tools, enable or disable the row, edit its configuration;
|
|
21
|
+
- the row belongs to its patch, so the page does not delete it.
|
|
22
|
+
- **Import from other apps**
|
|
23
|
+
- read-only scan of Claude Desktop, Cursor, VS Code, Windsurf, Cline, Roo Code, Trae and Claude Code MCP files;
|
|
24
|
+
- imported servers become managed servers; source files are never modified.
|
|
25
|
+
- **Sidebar shortcut**
|
|
26
|
+
- a switch shows or hides an MCP entry in the DSH sidebar;
|
|
27
|
+
- the entry opens the manager as a global main panel;
|
|
28
|
+
- the choice is stored in `$DSH_HOME/dsh-mcp-manage/preferences.json`.
|
|
29
|
+
- **UI**
|
|
30
|
+
- follows the DSH theme tokens and light/dark palettes;
|
|
31
|
+
- native modal `<dialog>`, keyboard support, labelled controls;
|
|
32
|
+
- bilingual (follows the DSH language).
|
|
33
|
+
|
|
34
|
+
## Compatibility
|
|
35
|
+
|
|
36
|
+
| Item | Requirement |
|
|
37
|
+
| --- | --- |
|
|
38
|
+
| DeepSeek Harness | `>=0.2.2-rc.1 <0.3.0` |
|
|
39
|
+
| Surface | Web and Desktop GUI |
|
|
40
|
+
| Required row | `@deepseek-ai/dsh-mcp-manager` composed in the profile (shipped Web/Desktop compositions already have it) |
|
|
41
|
+
| Node.js | `>=22` (provided by DSH; nothing extra to install) |
|
|
42
|
+
|
|
43
|
+
Discovery paths are adapted per platform (Windows, macOS, Linux); missing applications are skipped.
|
|
44
|
+
|
|
45
|
+
## Install
|
|
46
|
+
|
|
47
|
+
### DSH GUI
|
|
48
|
+
|
|
49
|
+
1. Open **Plugins** in the left sidebar.
|
|
50
|
+
2. Choose **Add plugin**.
|
|
51
|
+
3. Use one of:
|
|
52
|
+
- GitHub: `github:tachec/dsh-mcp-manage`
|
|
53
|
+
- a local checkout: absolute directory path
|
|
54
|
+
- your own scoped npm package name once published (for example `@tachec/dsh-mcp-manage`)
|
|
55
|
+
4. Install, enable the bundle, then reopen Settings.
|
|
56
|
+
|
|
57
|
+
> **Note:** the npm name `dsh-mcp-manage` is reserved by someone else and is **not this project**. This project is installed from GitHub or a local directory; if you publish it later, use your own scope and update this page.
|
|
58
|
+
|
|
59
|
+
### CLI
|
|
60
|
+
|
|
61
|
+
```powershell
|
|
62
|
+
dsh plugin --profile web add github:tachec/dsh-mcp-manage
|
|
63
|
+
```
|
|
64
|
+
|
|
65
|
+
> The Desktop app owns the `desktop` profile and refuses CLI changes; install it from the sidebar **Plugins** page there.
|
|
66
|
+
|
|
67
|
+
The bundle appears on the sidebar **Plugins** page as **MCP manager / MCP 管理**.
|
|
68
|
+
|
|
69
|
+
## Quick start
|
|
70
|
+
|
|
71
|
+
1. Open **Settings → MCP**, or click **MCP** in the left sidebar.
|
|
72
|
+
2. Choose **Add server**.
|
|
73
|
+
3. Fill the form or switch to the **JSON** tab and paste a document.
|
|
74
|
+
4. Save. The server mounts immediately and its tools appear as `mcp__<server>__<tool>` — no restart.
|
|
75
|
+
|
|
76
|
+
### stdio
|
|
77
|
+
|
|
78
|
+
| Field | Value |
|
|
79
|
+
| --- | --- |
|
|
80
|
+
| Name | `github` |
|
|
81
|
+
| Transport | `stdio` |
|
|
82
|
+
| Command | `npx` |
|
|
83
|
+
| Arguments (one per line) | `-y`<br>`@modelcontextprotocol/server-github` |
|
|
84
|
+
| Environment | `GITHUB_TOKEN=${credential:GITHUB_TOKEN}` |
|
|
85
|
+
|
|
86
|
+
### Streamable HTTP
|
|
87
|
+
|
|
88
|
+
| Field | Value |
|
|
89
|
+
| --- | --- |
|
|
90
|
+
| Name | `web` |
|
|
91
|
+
| Transport | `Streamable HTTP` |
|
|
92
|
+
| URL | `https://example.com/mcp` |
|
|
93
|
+
| Headers | `Authorization: Bearer ${credential:MCP_TOKEN}` |
|
|
94
|
+
|
|
95
|
+
### JSON
|
|
96
|
+
|
|
97
|
+
Claude Desktop / Cursor documents work as-is (multiple servers allowed):
|
|
98
|
+
|
|
99
|
+
```json
|
|
100
|
+
{
|
|
101
|
+
"mcpServers": {
|
|
102
|
+
"github": {
|
|
103
|
+
"command": "npx",
|
|
104
|
+
"args": ["-y", "@modelcontextprotocol/server-github"],
|
|
105
|
+
"env": {
|
|
106
|
+
"GITHUB_TOKEN": "${credential:GITHUB_TOKEN}"
|
|
107
|
+
}
|
|
108
|
+
},
|
|
109
|
+
"web": {
|
|
110
|
+
"type": "http",
|
|
111
|
+
"url": "https://example.com/mcp",
|
|
112
|
+
"headers": {
|
|
113
|
+
"Authorization": "Bearer ${credential:MCP_TOKEN}"
|
|
114
|
+
}
|
|
115
|
+
}
|
|
116
|
+
}
|
|
117
|
+
}
|
|
118
|
+
```
|
|
119
|
+
|
|
120
|
+
Also accepted: DSH's `{ "servers": { ... } }` wrapper, a plain `{ "name": { ... } }` map, or a single server object with `name` / `serverName` (the name may be omitted when editing). `type: "http"` means Streamable HTTP; the legacy `sse` transport is refused with a clear message.
|
|
121
|
+
|
|
122
|
+
## Managed vs static
|
|
123
|
+
|
|
124
|
+
| | Managed servers | Static rows |
|
|
125
|
+
| --- | --- | --- |
|
|
126
|
+
| Stored in | `@deepseek-ai/dsh-mcp-manager`'s `config.servers` (written to the profile patch) | standalone `@deepseek-ai/dsh-mcp-client` rows in a profile or plugin patch |
|
|
127
|
+
| Mounted by | the MCP manager, live | the DSH Loader at startup/reload |
|
|
128
|
+
| This page | add, edit, delete, enable/disable, probe, restart | inspect, enable/disable, edit; **no delete** |
|
|
129
|
+
| Delete | from the page | remove the patch row or uninstall the owning plugin |
|
|
130
|
+
|
|
131
|
+
A base-config server is badged **base config**: it can be disabled but not deleted from the page.
|
|
132
|
+
|
|
133
|
+
## Where data lives
|
|
134
|
+
|
|
135
|
+
| Data | Location |
|
|
136
|
+
| --- | --- |
|
|
137
|
+
| Managed server configuration | current profile's `cordis.patch.yml` (`mcp-manager` row, `config.servers`) |
|
|
138
|
+
| Static row overrides | current profile's `cordis.patch.yml` |
|
|
139
|
+
| Sidebar preference | `$DSH_HOME/dsh-mcp-manage/preferences.json` |
|
|
140
|
+
|
|
141
|
+
Every change affects only the current profile.
|
|
142
|
+
|
|
143
|
+
## Security and privacy
|
|
144
|
+
|
|
145
|
+
- The Host half serves one authenticated same-origin JSON route, `/dsh-mcp-manage/api`, on the GUI's own web server. No extra port, no public listener.
|
|
146
|
+
- No model-facing tool is registered; every operation is user-initiated from the page.
|
|
147
|
+
- Configured environment values and headers are shown to the authenticated owner in plain text. Keep secrets in `${credential:REF}` templates so the DSH credentials service resolves them at runtime.
|
|
148
|
+
- Import reads other applications' MCP files and never writes or uploads them.
|
|
149
|
+
- Toggling a static row changes the profile's plugin enablement; deleting a managed server removes it from the profile.
|
|
150
|
+
|
|
151
|
+
## Known limitations
|
|
152
|
+
|
|
153
|
+
- Requires `@deepseek-ai/dsh-mcp-manager`; without it the page can inspect static rows but cannot add managed servers.
|
|
154
|
+
- Agent-preset MCP rows are outside this page's scope; it covers the current profile's global plane.
|
|
155
|
+
- Static rows cannot be deleted here; they belong to the declaring patch.
|
|
156
|
+
- Legacy SSE transport is unsupported; use Streamable HTTP.
|
|
157
|
+
- No OAuth flow; provide credentials through environment/header templates.
|
|
158
|
+
- Probe output has a timeout and a tool-count cap; oversized lists are truncated and marked.
|
|
159
|
+
- The sidebar preference is Host-scoped per profile and cached in the browser; it is not shared across DSH instances/profiles.
|
|
160
|
+
|
|
161
|
+
## Development
|
|
162
|
+
|
|
163
|
+
No build step: the Host half is `index.js`, the browser half is `client.js`, both loaded as source.
|
|
164
|
+
|
|
165
|
+
```text
|
|
166
|
+
dsh-mcp-manage/
|
|
167
|
+
├── index.js
|
|
168
|
+
├── client.js
|
|
169
|
+
├── cordis.patch.yml
|
|
170
|
+
├── package.json
|
|
171
|
+
├── locale/{en,zh}.json
|
|
172
|
+
├── icon.svg
|
|
173
|
+
├── test/
|
|
174
|
+
│ ├── host-smoke.mjs
|
|
175
|
+
│ └── client-render-smoke.mjs
|
|
176
|
+
├── README.md
|
|
177
|
+
├── README.en.md
|
|
178
|
+
├── CHANGELOG.md
|
|
179
|
+
└── LICENSE
|
|
180
|
+
```
|
|
181
|
+
|
|
182
|
+
```powershell
|
|
183
|
+
npm test
|
|
184
|
+
```
|
|
185
|
+
|
|
186
|
+
`test/host-smoke.mjs` runs the Host route against a mocked Harness; `test/client-render-smoke.mjs` renders the page, panels and dialogs with a minimal React stand-in and checks that a plugin reload refreshes the stylesheet.
|
|
187
|
+
|
|
188
|
+
## Changelog
|
|
189
|
+
|
|
190
|
+
See [CHANGELOG.md](CHANGELOG.md).
|
|
191
|
+
|
|
192
|
+
## License
|
|
193
|
+
|
|
194
|
+
[MIT](LICENSE)
|
package/README.md
CHANGED
|
@@ -1,3 +1,242 @@
|
|
|
1
|
-
#
|
|
2
|
-
|
|
3
|
-
|
|
1
|
+
# dsh-mcp-manage
|
|
2
|
+
|
|
3
|
+
**中文** · [English](README.en.md)
|
|
4
|
+
|
|
5
|
+
在 DeepSeek Harness(dsh)里集中管理所有 MCP 服务器:新增、修改、删除、查看、热启停、探测、重启,一个页面搞定。
|
|
6
|
+
|
|
7
|
+
插件在 **设置 → MCP** 注册一个管理页,并可选地在左侧栏放一个 MCP 图标;点击图标会在主区域打开同一个管理页。它同时接管 DSH 原生的 MCP 管理器(`@deepseek-ai/dsh-mcp-manager`)和直接写在 profile / 插件补丁里的静态 `@deepseek-ai/dsh-mcp-client` 行,因此托管服务器和静态接入都能在这里看到。
|
|
8
|
+
|
|
9
|
+
## 功能
|
|
10
|
+
|
|
11
|
+
- **托管服务器完整增删改查**
|
|
12
|
+
- 支持 `stdio` 与 `streamable-http` 两种传输;
|
|
13
|
+
- 表单填写,或直接粘贴 JSON(兼容 Claude Desktop / Cursor 的 `mcpServers` 格式);
|
|
14
|
+
- 保存后立即写入当前 profile 并热挂载,不需要重启 DSH;
|
|
15
|
+
- 开关即可热启停,不删除配置;
|
|
16
|
+
- 一键探测(连接 + 列出工具)、一键重启(重建连接、重置重连预算);
|
|
17
|
+
- 实时显示连接状态、工具数量、工具名和完整配置。
|
|
18
|
+
- **静态接入管理**
|
|
19
|
+
- 列出 profile / 插件补丁中的 `@deepseek-ai/dsh-mcp-client` 行;
|
|
20
|
+
- 查看状态、工具,启停整行,编辑其配置;
|
|
21
|
+
- 删除不由本插件负责(行属于声明它的补丁)。
|
|
22
|
+
- **从本机其他应用导入**
|
|
23
|
+
- 只读扫描 Claude Desktop、Cursor、VS Code、Windsurf、Cline、Roo Code、Trae、Claude Code 的 MCP 配置;
|
|
24
|
+
- 选择要导入的服务器,导入后由本页托管;
|
|
25
|
+
- 不修改源文件。
|
|
26
|
+
- **左侧栏快捷入口**
|
|
27
|
+
- 页面上一键开关是否在 DSH 左侧栏显示 MCP 图标;
|
|
28
|
+
- 点击图标直接打开独立的 MCP 管理页;
|
|
29
|
+
- 选择保存到 `$DSH_HOME/dsh-mcp-manage/preferences.json`。
|
|
30
|
+
- **界面**
|
|
31
|
+
- 跟随 DSH 明暗主题与设计令牌;
|
|
32
|
+
- 原生 `<dialog>` 弹窗、键盘可操作、表单控件带可访问名称;
|
|
33
|
+
- 中英双语,自动跟随 DSH 语言。
|
|
34
|
+
|
|
35
|
+
## 兼容性
|
|
36
|
+
|
|
37
|
+
| 项目 | 要求 |
|
|
38
|
+
| --- | --- |
|
|
39
|
+
| DeepSeek Harness | `>=0.2.2-rc.1 <0.3.0` |
|
|
40
|
+
| 运行界面 | Web 与 Desktop(桌面版) |
|
|
41
|
+
| 必需组件 | profile 中已挂载 `@deepseek-ai/dsh-mcp-manager`(官方 Web/Desktop 组合默认提供) |
|
|
42
|
+
| Node.js | `>=22`(仅随 DSH 运行,无需单独安装) |
|
|
43
|
+
|
|
44
|
+
系统自带的 MCP 配置扫描路径按 Windows / macOS / Linux 分别适配;没有安装对应应用时会自动跳过。
|
|
45
|
+
|
|
46
|
+
## 安装
|
|
47
|
+
|
|
48
|
+
### 从 DSH 图形界面
|
|
49
|
+
|
|
50
|
+
1. 打开侧栏的 **插件** 页。
|
|
51
|
+
2. 点击 **添加插件**。
|
|
52
|
+
3. 填入以下任一来源:
|
|
53
|
+
- GitHub 仓库:`github:tachec/dsh-mcp-manage`
|
|
54
|
+
- 本地目录:本仓库的绝对路径
|
|
55
|
+
- 发布到你自己的 npm scope 后,也可填该包名(例如 `@tachec/dsh-mcp-manage`)
|
|
56
|
+
4. 安装并启用 bundle,然后重新打开设置面板。
|
|
57
|
+
|
|
58
|
+
> **注意:** npm 上的 `dsh-mcp-manage` 已被他人预留,**不是本项目**。本项目目前通过 GitHub 或本地目录安装;如果以后发布 npm 包,请使用自己的 scope,并更新这里。
|
|
59
|
+
|
|
60
|
+
### 使用 CLI
|
|
61
|
+
|
|
62
|
+
```powershell
|
|
63
|
+
dsh plugin --profile web add github:tachec/dsh-mcp-manage
|
|
64
|
+
```
|
|
65
|
+
|
|
66
|
+
> Desktop 的 `desktop` profile 由桌面端托管,CLI 不允许直接修改;请在侧栏的 **插件** 页里安装。
|
|
67
|
+
|
|
68
|
+
安装后,插件行会出现在侧栏 **插件** 页的插件列表中,标题为 **MCP 管理 / MCP manager**。
|
|
69
|
+
|
|
70
|
+
## 快速开始
|
|
71
|
+
|
|
72
|
+
1. 打开 **设置 → MCP**,或点击左侧栏的 **MCP** 图标。
|
|
73
|
+
2. 点击 **添加服务器**。
|
|
74
|
+
3. 选择传输方式并填写,或切到 **JSON** 直接粘贴配置。
|
|
75
|
+
4. 保存后,服务器会立即挂载;它的工具以 `mcp__<服务器名>__<工具名>` 出现在 Agent 的工具列表里,无需重启。
|
|
76
|
+
|
|
77
|
+
### stdio 示例
|
|
78
|
+
|
|
79
|
+
| 字段 | 值 |
|
|
80
|
+
| --- | --- |
|
|
81
|
+
| 名称 | `github` |
|
|
82
|
+
| 传输方式 | `stdio` |
|
|
83
|
+
| 启动命令 | `npx` |
|
|
84
|
+
| 参数(每行一个) | `-y`<br>`@modelcontextprotocol/server-github` |
|
|
85
|
+
| 环境变量 | `GITHUB_TOKEN=${credential:GITHUB_TOKEN}` |
|
|
86
|
+
|
|
87
|
+
### Streamable HTTP 示例
|
|
88
|
+
|
|
89
|
+
| 字段 | 值 |
|
|
90
|
+
| --- | --- |
|
|
91
|
+
| 名称 | `web` |
|
|
92
|
+
| 传输方式 | `Streamable HTTP` |
|
|
93
|
+
| 服务地址 | `https://example.com/mcp` |
|
|
94
|
+
| 请求头 | `Authorization: Bearer ${credential:MCP_TOKEN}` |
|
|
95
|
+
|
|
96
|
+
### JSON 示例
|
|
97
|
+
|
|
98
|
+
Claude Desktop / Cursor 的格式可以直接粘贴(支持一次添加多个):
|
|
99
|
+
|
|
100
|
+
```json
|
|
101
|
+
{
|
|
102
|
+
"mcpServers": {
|
|
103
|
+
"github": {
|
|
104
|
+
"command": "npx",
|
|
105
|
+
"args": ["-y", "@modelcontextprotocol/server-github"],
|
|
106
|
+
"env": {
|
|
107
|
+
"GITHUB_TOKEN": "${credential:GITHUB_TOKEN}"
|
|
108
|
+
}
|
|
109
|
+
},
|
|
110
|
+
"web": {
|
|
111
|
+
"type": "http",
|
|
112
|
+
"url": "https://example.com/mcp",
|
|
113
|
+
"headers": {
|
|
114
|
+
"Authorization": "Bearer ${credential:MCP_TOKEN}"
|
|
115
|
+
}
|
|
116
|
+
}
|
|
117
|
+
}
|
|
118
|
+
}
|
|
119
|
+
```
|
|
120
|
+
|
|
121
|
+
也支持:
|
|
122
|
+
|
|
123
|
+
- DSH 的 `{ "servers": { ... } }` 包装;
|
|
124
|
+
- 直接的 `{ "名称": { ... } }` 映射;
|
|
125
|
+
- 单个带 `name` / `serverName` 的服务器对象(编辑时可以不写名称)。
|
|
126
|
+
|
|
127
|
+
`type: "http"` 会被当作 Streamable HTTP;旧的 `sse` 传输不支持,会给出明确提示。
|
|
128
|
+
|
|
129
|
+
## 页面说明
|
|
130
|
+
|
|
131
|
+
### 托管服务器
|
|
132
|
+
|
|
133
|
+
写进 `@deepseek-ai/dsh-mcp-manager` 的 `config.servers`,由 DSH 的设置服务持久化到当前 profile 的 `cordis.patch.yml`。因此:
|
|
134
|
+
|
|
135
|
+
- 支持新增、编辑、删除、热启停、探测、重启;
|
|
136
|
+
- 修改后立即重建对应的 `dsh-mcp-client` 实例;
|
|
137
|
+
- 删除只影响当前 profile,不影响其他 profile。
|
|
138
|
+
|
|
139
|
+
服务器卡片上会显示:
|
|
140
|
+
|
|
141
|
+
- 连接状态(已连接、连接中、重连中、等待凭据、失败、已停用……);
|
|
142
|
+
- 工具数量与工具名;
|
|
143
|
+
- 传输方式、命令 / URL、环境变量、请求头、超时与重连配置;
|
|
144
|
+
- 来自基础配置的服务器会标记 **基础配置**,这类服务器可以停用,但不能在页面上删除。
|
|
145
|
+
|
|
146
|
+
### 静态接入
|
|
147
|
+
|
|
148
|
+
指直接写在 profile 或插件补丁里的 `@deepseek-ai/dsh-mcp-client` 行,例如某些插件安装器写入的行。它们由 DSH Loader 在启动 / 重载时挂载,不归 MCP 管理器管,所以:
|
|
149
|
+
|
|
150
|
+
- 本页可以查看状态与工具、启停整行、编辑配置;
|
|
151
|
+
- 不能删除;删除需要在对应的 `cordis.patch.yml` 里移除该行,或卸载携带它的插件;
|
|
152
|
+
- 如果你希望它享受完整的增删改与探测,可以在本页用相同命令 / URL 新建一个托管服务器(换个名字),再停用静态行。
|
|
153
|
+
|
|
154
|
+
### 从本机其他应用导入
|
|
155
|
+
|
|
156
|
+
点击 **从本机其他应用导入** 展开,然后点 **重新扫描**。扫描是只读的,支持:
|
|
157
|
+
|
|
158
|
+
- Claude Desktop:`claude_desktop_config.json`
|
|
159
|
+
- Cursor:`~/.cursor/mcp.json` 等
|
|
160
|
+
- VS Code / VS Code Insiders:`mcp.json`
|
|
161
|
+
- Windsurf:`mcp_config.json`
|
|
162
|
+
- Cline / Roo Code:扩展的 MCP 设置
|
|
163
|
+
- Trae:`mcp.json`
|
|
164
|
+
- Claude Code:`~/.claude.json`
|
|
165
|
+
|
|
166
|
+
导入的服务器会变成托管服务器;源配置文件不会被改动。
|
|
167
|
+
|
|
168
|
+
### 左侧栏快捷入口
|
|
169
|
+
|
|
170
|
+
页面顶部的 **左侧栏快捷入口** 开关控制是否在 DSH 左侧栏显示 **MCP** 图标:
|
|
171
|
+
|
|
172
|
+
- 打开:图标出现在侧栏,点击直接打开 MCP 管理页;
|
|
173
|
+
- 关闭:图标立即移除;
|
|
174
|
+
- 选择写入 `$DSH_HOME/dsh-mcp-manage/preferences.json`,刷新或重启后保持;
|
|
175
|
+
- 关闭图标后,仍可从 **设置 → MCP** 进入本页重新打开。
|
|
176
|
+
|
|
177
|
+
## 数据与写入位置
|
|
178
|
+
|
|
179
|
+
| 数据 | 位置 |
|
|
180
|
+
| --- | --- |
|
|
181
|
+
| 托管服务器配置 | 当前 profile 的 `cordis.patch.yml`(`mcp-manager` 行的 `config.servers`) |
|
|
182
|
+
| 静态行配置修改 | 当前 profile 的 `cordis.patch.yml`(对应行的覆盖) |
|
|
183
|
+
| 左侧栏开关偏好 | `$DSH_HOME/dsh-mcp-manage/preferences.json` |
|
|
184
|
+
| 插件自身 | 当前 profile 的插件依赖(由 DSH 插件管理器管理) |
|
|
185
|
+
|
|
186
|
+
所有修改只影响**当前 profile**,不会跨 profile 同步。
|
|
187
|
+
|
|
188
|
+
## 安全与隐私
|
|
189
|
+
|
|
190
|
+
- Host 端只注册一个同源 JSON 路由 `/dsh-mcp-manage/api`,每个请求都经过 DSH 的浏览器会话认证,写请求还要求同源;没有新的端口、没有对外监听。
|
|
191
|
+
- 插件**不注册任何模型可见的工具**;所有操作都由用户在设置页触发。
|
|
192
|
+
- 页面会以明文展示已配置的环境变量和请求头(这是管理面所必需的)。密钥请使用 `${credential:REF}` 模板,让 DSH 的凭据服务在运行时解析,而不是把明文写进配置。
|
|
193
|
+
- 导入功能只读取本机其他应用的配置文件,不写入、不上传。
|
|
194
|
+
- 静态行的启停会修改 profile 的插件状态;删除托管服务器会把配置从当前 profile 中移除。
|
|
195
|
+
|
|
196
|
+
## 已知限制
|
|
197
|
+
|
|
198
|
+
- 需要 profile 中已组合 `@deepseek-ai/dsh-mcp-manager`;没有它时页面只能查看静态行,不能新增托管服务器。
|
|
199
|
+
- Agent 预设(preset)内部的 MCP 行不在本页范围内,只覆盖当前 profile 的全局平面。
|
|
200
|
+
- 静态行不能在本页删除;它们属于声明它们的补丁。
|
|
201
|
+
- 不支持旧版 `sse` 传输,请使用 Streamable HTTP。
|
|
202
|
+
- 没有 OAuth 登录流程;需要鉴权的服务器请通过请求头 / 环境变量模板提供凭据。
|
|
203
|
+
- 探测有超时与工具数量上限;超大工具列表会被截断并标注。
|
|
204
|
+
- 左侧栏开关是 Host 级偏好,同时在本浏览器缓存一份;不同 DSH 实例 / profile 之间不共享。
|
|
205
|
+
|
|
206
|
+
## 开发
|
|
207
|
+
|
|
208
|
+
本插件是**免构建**的普通 DSH bundle:Host 端 `index.js`、浏览器端 `client.js` 直接以源码加载,没有打包步骤。
|
|
209
|
+
|
|
210
|
+
```text
|
|
211
|
+
dsh-mcp-manage/
|
|
212
|
+
├── index.js # Host:认证路由、配置读写、静态行与偏好
|
|
213
|
+
├── client.js # 浏览器:设置页、主面板、对话框、样式
|
|
214
|
+
├── cordis.patch.yml # bundle 行
|
|
215
|
+
├── package.json
|
|
216
|
+
├── locale/{en,zh}.json # 插件市场展示文案
|
|
217
|
+
├── icon.svg
|
|
218
|
+
├── test/
|
|
219
|
+
│ ├── host-smoke.mjs
|
|
220
|
+
│ └── client-render-smoke.mjs
|
|
221
|
+
├── README.md
|
|
222
|
+
├── README.en.md
|
|
223
|
+
├── CHANGELOG.md
|
|
224
|
+
└── LICENSE
|
|
225
|
+
```
|
|
226
|
+
|
|
227
|
+
运行测试(无需 DSH 运行):
|
|
228
|
+
|
|
229
|
+
```powershell
|
|
230
|
+
npm test
|
|
231
|
+
```
|
|
232
|
+
|
|
233
|
+
- `test/host-smoke.mjs`:用 mock Harness 覆盖 Host 路由的快照、新增 / 编辑 / 删除 / 启停 / 探测 / 重启、静态行、JSON 导入、偏好持久化与认证拒绝。
|
|
234
|
+
- `test/client-render-smoke.mjs`:用最小 React 替身渲染设置页、主面板、服务器卡片与对话框,检查渲染路径不抛错,并验证样式表在插件重载时被刷新。
|
|
235
|
+
|
|
236
|
+
## 更新日志
|
|
237
|
+
|
|
238
|
+
见 [CHANGELOG.md](CHANGELOG.md)。
|
|
239
|
+
|
|
240
|
+
## 许可证
|
|
241
|
+
|
|
242
|
+
[MIT](LICENSE)
|