dsh-mcp-tools 1.0.0 → 1.0.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/README.en.md CHANGED
@@ -1,143 +1,111 @@
1
- # dsh-mcp-tools
1
+ <p align="center">
2
+ <img src="https://cdn.jsdelivr.net/gh/hxlog/dsh-mcp-tools@main/docs/logo.png" width="72" height="72" alt="dsh-mcp-tools" />
3
+ </p>
2
4
 
3
- **The most minimal, elegant MCP tool manager for DeepSeek Harness.**
5
+ <h1 align="center">dsh-mcp-tools</h1>
4
6
 
5
- [![npm](https://img.shields.io/npm/v/dsh-mcp-tools?color=black)](https://www.npmjs.com/package/dsh-mcp-tools)
6
- [![npm downloads](https://img.shields.io/npm/dm/dsh-mcp-tools?color=black)](https://www.npmjs.com/package/dsh-mcp-tools)
7
- [![license](https://img.shields.io/badge/license-MIT-black.svg)](LICENSE)
8
- [![node](https://img.shields.io/badge/node-%3E%3D22.13-black.svg)](https://nodejs.org)
7
+ <p align="center">
8
+ <b>The most minimal, elegant MCP tool manager for DeepSeek Harness.</b><br />
9
+ Cursor-style global MCP control: add, disable and remove MCP servers and tools freely — for MCP testing, on-demand requests and context expansion.
10
+ </p>
9
11
 
10
- English | [简体中文](README.md)
12
+ <p align="center">
13
+ <a href="https://www.npmjs.com/package/dsh-mcp-tools"><img src="https://img.shields.io/npm/v/dsh-mcp-tools?color=black" alt="npm version" /></a>
14
+ <a href="https://www.npmjs.com/package/dsh-mcp-tools"><img src="https://img.shields.io/npm/dm/dsh-mcp-tools?color=black" alt="npm downloads" /></a>
15
+ <a href="LICENSE"><img src="https://img.shields.io/badge/license-MIT-black.svg" alt="license" /></a>
16
+ <a href="https://nodejs.org"><img src="https://img.shields.io/badge/node-%3E%3D22.13-black.svg" alt="node" /></a>
17
+ <a href="https://github.com/hxlog/dsh-mcp-tools"><img src="https://img.shields.io/badge/GitHub-hxlog%2Fdsh--mcp--tools-black?logo=github" alt="GitHub" /></a>
18
+ </p>
11
19
 
12
- Manage your MCP servers and toggle MCP tools on demand, inside the DeepSeek Harness Web GUI. Disabled tools **never reach the model**: no context cost, no accidental calls.
20
+ <p align="center">
21
+ <a href="https://github.com/hxlog/dsh-mcp-tools">GitHub</a> ·
22
+ <a href="https://www.npmjs.com/package/dsh-mcp-tools">npm</a> ·
23
+ <a href="https://github.com/hxlog/dsh-mcp-tools/issues">Issues</a> ·
24
+ <a href="README.md">简体中文</a>
25
+ </p>
13
26
 
14
- ![MCP servers in Settings](docs/screenshots/en/mcp-overview.png)
27
+ <p align="center">
28
+ <img src="https://cdn.jsdelivr.net/gh/hxlog/dsh-mcp-tools@main/docs/screenshots/en/mcp-overview.png" width="70%" alt="MCP servers in Settings" />
29
+ </p>
15
30
 
16
- ---
31
+ > All-in-one MCP server management with per-tool switches. Disabled tools **never reach the model**: no context cost, no accidental calls.
17
32
 
18
- ## Why this exists
33
+ ## ✨ Features
19
34
 
20
- MCP servers are great until a single "all-in-one" server drops 95 tools into every request. DSH's native configuration is a YAML/JSON file: editing it means restarting or recomposing the profile, and there is no way to say *"keep this server, but give the model only 12 of its tools."*
35
+ | Capability | Details |
36
+ | --- | --- |
37
+ | **Server management** | Two transports: `streamable-http` (URL + headers) and `stdio` (command / args / env / cwd); fill fields or paste `{"mcpServers": { ... }}` to import many at once. |
38
+ | **Postman-style secrets** | Headers are key/value rows, not a JSON textarea; a default `x-mcp-key` row is provided, values are masked and can be revealed per row, duplicate names error inline. |
39
+ | **Real per-tool control** | Every tool is a chip; disable it and it disappears from the model's tool list entirely (not "registered then errors"). Search, select all, invert, disable all — hover for the full description. |
40
+ | **Connectivity test & event log** | Temporary connection: `initialize → tools/list → close`, reporting latency / protocol version / tool count without touching the live server. The "Recent events" log records connects, reloads, tests and failures. |
41
+ | **Server toggle & config copy** | Turning a server off disconnects it and unregisters all its tools (config kept); one click copies that server's `mcpServers` snippet. |
42
+ | **Native DSH look** | Reuses `--dsw-*` design tokens, flat rows and 32px inputs; light/dark and zh/en adapt automatically. The client is a classic script — no build step. |
21
43
 
22
- dsh-mcp-tools moves all of that into **Settings → MCP**:
44
+ <p align="center">
45
+ <img src="https://cdn.jsdelivr.net/gh/hxlog/dsh-mcp-tools@main/docs/screenshots/en/mcp-add-server.png" width="48%" alt="Add server: key/value headers" />
46
+ <img src="https://cdn.jsdelivr.net/gh/hxlog/dsh-mcp-tools@main/docs/screenshots/en/mcp-tools.png" width="48%" alt="Per-tool chips" />
47
+ </p>
23
48
 
24
- - add, edit, disable and delete servers without touching config files;
25
- - paste secrets as Postman-style key/value headers (headers stay on your machine);
26
- - verify connectivity and see the tool count before enabling anything;
27
- - toggle tools per server, with search, select-all, invert and disable-all.
49
+ ## 🚀 Install
28
50
 
29
- ---
51
+ Requires **DeepSeek Harness 0.2.x** (Web GUI `dsh web` or DSH Desktop) and **Node.js ≥ 22.13**. Available on npm: [dsh-mcp-tools](https://www.npmjs.com/package/dsh-mcp-tools).
30
52
 
31
- ## Features
53
+ > ⚠️ This is a **DeepSeek Harness plugin**, not a plain npm library: `npm i dsh-mcp-tools` only downloads the package — it still has to be installed into a DSH profile as below.
32
54
 
33
- ### Server management
55
+ **From the Plugins page (recommended)**
34
56
 
35
- - **Two transports**: `streamable-http` (URL + headers) and `stdio` (command, args, env, cwd).
36
- - **Two ways to add**: fill in fields, or paste an `{"mcpServers": { ... }}` block — the same shape DSH and Claude Desktop use — to import several servers at once.
37
- - **Server switch**: turning a server off disconnects it and unregisters all of its tools. Nothing is deleted.
38
- - **Copy config**: one click copies that server back out as an `mcpServers` snippet.
39
-
40
- ### Secrets, the Postman way
41
-
42
- Header rows are key/value pairs, not a JSON textarea. A new server starts with an `x-mcp-key` row: paste the secret into the value column and save.
43
-
44
- ![Adding a server with key/value headers](docs/screenshots/en/mcp-add-server.png)
45
-
46
- Values are masked by default and can be revealed per row. Duplicate header names are rejected inline. Prefer JSON? Switch to **Paste JSON** — it syncs name, URL, transport and headers back into the form.
47
-
48
- ![Pasting an mcpServers JSON block](docs/screenshots/en/mcp-json-import.png)
49
-
50
- ### Real per-tool control
51
-
52
- Every tool is a chip. Click to disable; the tool disappears from the model's tool list immediately (it is not registered at all). Search, select all, invert, disable all.
53
-
54
- ![Per-tool chips](docs/screenshots/en/mcp-tools.png)
55
-
56
- Hover a chip for its full description, even while the server is disabled.
57
-
58
- ![Tool description tooltip](docs/screenshots/en/mcp-tooltip.png)
59
-
60
- ### Connectivity test and event log
61
-
62
- The test button opens a throwaway connection: `initialize` → `tools/list` → close. It reports latency, protocol version and tool count, and never mutates the running server. A compact event log records connects, reloads, tests and failures.
63
-
64
- ### Native fit
65
-
66
- Same design tokens (`--dsw-*`), same flat rows, same 32px inputs as DSH itself. Light and dark, Chinese and English, keyboard focus rings included. No build step: the client bundle is a classic script that only requires `react` and the official UI primitives.
67
-
68
- See it in dark mode:
69
-
70
- ![MCP manager in dark mode](docs/screenshots/en/mcp-dark.png)
71
-
72
- ![Disabled tools](docs/screenshots/en/mcp-tool-toggles.png)
73
-
74
- ---
75
-
76
- ## Install
77
-
78
- Requires **DeepSeek Harness 0.2.x** with the Web GUI (`dsh web`) and **Node.js ≥ 22.13**.
79
-
80
- ### From the Plugins page (recommended)
81
-
82
- 1. Open the DSH Web GUI → **Plugins** in the sidebar.
57
+ 1. Open DSH Web (or DSH Desktop) → **Plugins** in the sidebar (Desktop: **Settings → Plugins**).
83
58
  2. Choose **Install**, enter `dsh-mcp-tools`, and confirm.
84
- 3. Enable the new bundle, then refresh the page once.
85
- 4. Open **Settings → MCP**.
59
+ 3. Enable the new bundle, refresh the page, then open **Settings → MCP**.
86
60
 
87
- ### From the CLI
61
+ **From the CLI**
88
62
 
89
63
  ```bash
90
- dsh plugin --profile web add dsh-mcp-tools
64
+ dsh plugin --profile web add dsh-mcp-tools # Web
65
+ dsh plugin --profile desktop add dsh-mcp-tools # Desktop
91
66
  ```
92
67
 
93
- Then add `"dsh-mcp-tools"` to `dsh.profile.bundles` in `~/.dsh/profiles/web/package.json` (or enable the bundle on the Plugins page) and refresh. If the section does not appear, restart `dsh web`.
94
-
95
- > Upgrading the package requires a restart of `dsh web` to load the new host module generation.
68
+ > Upgrading the package requires a restart of `dsh web` / reopening DSH Desktop.
96
69
 
97
- ---
70
+ ## ⚡ Quick start
98
71
 
99
- ## Quick start
72
+ 1. **Settings → MCP → Add server**: for remote servers enter the URL and paste the secret into the header row (default `x-mcp-key`).
73
+ 2. Hit **Test connection** — expect something like `connected · 95 tools · 478 ms` — then save and flip the server switch on.
74
+ 3. Let the model call the tools; DSH registers them as `mcp__<server>__<tool>`. Disable unused tools to shrink the tool schema in every request.
100
75
 
101
- 1. **Settings → MCP → Add server.**
102
- 2. For a remote server: paste its URL, then put the key in the header row (`x-mcp-key` by default).
103
- 3. Hit **Test connection** — you should see something like `Connected · 95 tools · 478 ms`.
104
- 4. Save. Enable the server if it is not on yet.
105
- 5. In a session, ask the model to use a tool. DSH registers each one as `mcp__<server>__<tool>`.
76
+ ## 🖼 More screenshots
106
77
 
107
- To trim context, open the server's tools and disable what you do not need. Fewer enabled tools means a smaller tool schema in every request.
78
+ | Dark mode | Some tools disabled |
79
+ | --- | --- |
80
+ | <img src="https://cdn.jsdelivr.net/gh/hxlog/dsh-mcp-tools@main/docs/screenshots/en/mcp-dark.png" width="100%" alt="Dark mode" /> | <img src="https://cdn.jsdelivr.net/gh/hxlog/dsh-mcp-tools@main/docs/screenshots/en/mcp-tool-toggles.png" width="100%" alt="Some tools disabled" /> |
108
81
 
109
- ---
82
+ | Paste `mcpServers` JSON | Tool tooltip |
83
+ | --- | --- |
84
+ | <img src="https://cdn.jsdelivr.net/gh/hxlog/dsh-mcp-tools@main/docs/screenshots/en/mcp-json-import.png" width="100%" alt="Paste mcpServers JSON" /> | <img src="https://cdn.jsdelivr.net/gh/hxlog/dsh-mcp-tools@main/docs/screenshots/en/mcp-tooltip.png" width="100%" alt="Tool tooltip" /> |
110
85
 
111
- ## How it works
86
+ ## 🧩 How it works
112
87
 
113
88
  ```
114
89
  DeepSeek Harness Web (dsh web)
115
- ├── Host plugin (lib/) ← cordis bundle patch, native MCP client
116
- │ ├── manager.js connections, tool registry, enable/disable
117
- │ ├── store.js ~/.dsh/dsh-mcp-tools/state.json (atomic, watched)
118
- │ └── routes.js /mcp-tools/api/*
90
+ ├── Host plugin (lib/) ← cordis bundle patch, reuses the native MCP client
91
+ │ ├── manager.js connect, register tools, enable/disable
92
+ │ ├── store.js ~/.dsh/dsh-mcp-tools/state.json (atomic writes, watches external edits)
93
+ │ └── routes.js /mcp-tools/api/*
119
94
  └── Client bundle (client/client.js)
120
95
  └── Settings section "MCP" (id: mcp, order: 18) — classic script, no build
121
96
  ```
122
97
 
123
- - The host plugin wraps DSH's native MCP client, so tools appear in sessions exactly like hand-configured ones (`mcp__server__tool`).
124
- - Enablement is enforced at **registration** time, not on call: a disabled tool is absent from the model's tool list.
125
- - State lives in `~/.dsh/dsh-mcp-tools/state.json`, written atomically. External edits are picked up and applied live.
126
-
127
- REST surface (used by the panel, also scriptable): `GET /mcp-tools/api/state`, `POST /servers/{test,save,delete,toggle,refresh}`, `POST /tools/{toggle,bulk}`, `POST /import`, `POST /reload`, `GET /logs`. See [docs/API.md](docs/API.md).
128
-
129
- ---
98
+ - Enable/disable happens at **registration** time, not call time: disabled tools never appear in the model's tool list.
99
+ - State lives in `~/.dsh/dsh-mcp-tools/state.json`, written atomically; external edits are watched and hot-applied.
100
+ - REST API: `GET /mcp-tools/api/state`, `POST /servers/{test,save,delete,toggle,refresh}`, `POST /tools/{toggle,bulk}`, `POST /import`, `POST /reload`, `GET /logs`. See [docs/API.md](docs/API.md).
130
101
 
131
- ## Security notes
102
+ ## 🔒 Security
132
103
 
133
- - Server headers are stored **in plaintext** in the local state file. The file is yours, on your machine — do not commit it or sync it to a public location.
134
- - Use a dedicated, least-privilege key per MCP server.
135
- - The plugin makes no network calls except to the MCP servers you configure. No telemetry.
136
- - Deleting a server removes its tools from every future request.
104
+ - Headers are stored **in plain text** in the local state file — local only; never commit or sync it to a public location.
105
+ - Use a dedicated, least-privilege key for every MCP server.
106
+ - No network requests beyond the MCP servers you configure, and no telemetry; deleting a server removes its tools from subsequent requests.
137
107
 
138
- ---
139
-
140
- ## Development
108
+ ## 🛠 Development
141
109
 
142
110
  ```bash
143
111
  git clone https://github.com/hxlog/dsh-mcp-tools.git
@@ -146,36 +114,28 @@ node --check client/client.js
146
114
  npm run selftest
147
115
  ```
148
116
 
149
- For live development, link the checkout into your profile instead of installing a copy (Windows example):
117
+ Link the source tree into a profile instead of installing a copy (Windows example):
150
118
 
151
119
  ```bat
152
120
  rmdir "C:\Users\<you>\.dsh\profiles\web\node_modules\dsh-mcp-tools"
153
121
  mklink /J "C:\Users\<you>\.dsh\profiles\web\node_modules\dsh-mcp-tools" "D:\path\to\dsh-mcp-tools"
154
122
  ```
155
123
 
156
- - **Client changes**: refresh the page. The bundle is served from disk, no build involved.
157
- - **Host changes**: touch the profile's `cordis.patch.yml` (e.g. append a comment) to trigger HMR recomposition; the log line `MCP manager started` confirms it.
158
-
159
- The panel is written as a single classic script because DSH's Web loader evaluates client bundles as classic scripts. Only `react` and `@deepseek-ai/dsh-client-ui-primitives` may be required.
160
-
161
- ---
162
-
163
- ## FAQ
164
-
165
- **The MCP section is missing.** The bundle is probably not enabled. Check Plugins → the bundle, refresh, and restart `dsh web` if needed.
166
-
167
- **Tools do not show up in a session.** Make sure the server is enabled and the individual tool chips are on. Disabled tools are never registered.
168
-
169
- **Test connection fails.** Verify the URL, that the server speaks `streamable-http` (not plain SSE), and that the header name matches what the server expects. Network/proxy issues surface here too.
170
-
171
- **Where is the state?** `~/.dsh/dsh-mcp-tools/state.json`. Deleting it resets everything to empty; the plugin recreates it on next launch.
124
+ - **Client changes**: just refresh the page; the bundle is served from disk, no build.
125
+ - **Host changes**: touch the profile's `cordis.patch.yml` (e.g. append a comment) to trigger HMR; once the log shows `MCP 管理器已启动` it is active.
126
+ - The panel is a single classic script and may only `require` `react` and `@deepseek-ai/dsh-client-ui-primitives`.
172
127
 
173
- ---
128
+ ## ❓ FAQ
174
129
 
175
- ## License
130
+ | Question | Answer |
131
+ | --- | --- |
132
+ | No MCP section in Settings | The bundle is probably not enabled — confirm on the Plugins page, refresh, restart `dsh web` if needed. |
133
+ | Tools missing in a session | Make sure the server switch is on and the tool chips are enabled; disabled tools are never registered. |
134
+ | Connection test fails | Check the URL, that the server speaks `streamable-http` (not plain SSE), and the header names; network/proxy problems surface here too. |
135
+ | Where is the state file? | `~/.dsh/dsh-mcp-tools/state.json`; delete it to reset to empty — it is recreated on next start. |
176
136
 
177
- [MIT](LICENSE)
137
+ ## 📄 License
178
138
 
179
- ---
139
+ [MIT](LICENSE) · Powered by [DeepSeek Harness](https://github.com/deepseek-ai/deepseek-harness)
180
140
 
181
141
  [![](https://img.shields.io/badge/powered_by-dsh-4D6BFE?style=flat-square&logo=deepseek&logoColor=white)](https://github.com/deepseek-ai/deepseek-harness)
package/README.md CHANGED
@@ -1,145 +1,112 @@
1
- # dsh-mcp-tools
1
+ <p align="center">
2
+ <img src="https://cdn.jsdelivr.net/gh/hxlog/dsh-mcp-tools@main/docs/logo.png" width="72" height="72" alt="dsh-mcp-tools" />
3
+ </p>
2
4
 
3
- **DeepSeek Harness 最简洁、优雅的MCP工具管理器。**
5
+ <h1 align="center">dsh-mcp-tools</h1>
4
6
 
5
- [![npm](https://img.shields.io/npm/v/dsh-mcp-tools?color=black)](https://www.npmjs.com/package/dsh-mcp-tools)
6
- [![npm downloads](https://img.shields.io/npm/dm/dsh-mcp-tools?color=black)](https://www.npmjs.com/package/dsh-mcp-tools)
7
- [![license](https://img.shields.io/badge/license-MIT-black.svg)](LICENSE)
8
- [![node](https://img.shields.io/badge/node-%3E%3D22.13-black.svg)](https://nodejs.org)
7
+ <p align="center">
8
+ <b>DeepSeek Harness 简洁、优雅的 MCP 工具管理器。</b><br />
9
+ 类 Cursor 风格的全局 MCP 控制:自由添加、停用、删除 MCP 接口与工具,适合 MCP 测试、按需请求、拓展上下文等场景。
10
+ </p>
9
11
 
10
- [English](README.en.md) | 简体中文
12
+ <p align="center">
13
+ <a href="https://www.npmjs.com/package/dsh-mcp-tools"><img src="https://img.shields.io/npm/v/dsh-mcp-tools?color=black" alt="npm version" /></a>
14
+ <a href="https://www.npmjs.com/package/dsh-mcp-tools"><img src="https://img.shields.io/npm/dm/dsh-mcp-tools?color=black" alt="npm downloads" /></a>
15
+ <a href="LICENSE"><img src="https://img.shields.io/badge/license-MIT-black.svg" alt="license" /></a>
16
+ <a href="https://nodejs.org"><img src="https://img.shields.io/badge/node-%3E%3D22.13-black.svg" alt="node" /></a>
17
+ <a href="https://github.com/hxlog/dsh-mcp-tools"><img src="https://img.shields.io/badge/GitHub-hxlog%2Fdsh--mcp--tools-black?logo=github" alt="GitHub" /></a>
18
+ </p>
11
19
 
12
- 管理用户的 MCP Server,按需开关 MCP Tools。被停用的工具**不会注册进模型**,既不占上下文,也无法被误调用。
20
+ <p align="center">
21
+ <a href="https://github.com/hxlog/dsh-mcp-tools">GitHub 仓库</a> ·
22
+ <a href="https://www.npmjs.com/package/dsh-mcp-tools">npm</a> ·
23
+ <a href="https://github.com/hxlog/dsh-mcp-tools/issues">问题反馈</a> ·
24
+ <a href="README.en.md">English</a>
25
+ </p>
13
26
 
14
- ![设置中的 MCP 服务器](docs/screenshots/zh/mcp-overview.png)
27
+ <p align="center">
28
+ <img src="https://cdn.jsdelivr.net/gh/hxlog/dsh-mcp-tools@main/docs/screenshots/zh/mcp-overview.png" width="49%" alt="设置服务器" />
29
+ <img src="https://cdn.jsdelivr.net/gh/hxlog/dsh-mcp-tools@main/docs/screenshots/zh/mcp-detail.png" width="49%" alt="MCP 工具详情" />
30
+ </p>
15
31
 
16
- ---
32
+ > 一站式管理用户的 MCP Server,按需开关 MCP Tools。被停用的 MCP 工具**不会注册进模型**,既不占上下文,也无法被误调用。
17
33
 
18
- ## 为什么做这个
34
+ ## ✨ 功能
19
35
 
20
- MCP 很好用,直到某个「全家桶」服务器把 95 个工具塞进每一次请求。DSH 原生配置是 YAML/JSON 文件:改一次要重组 profile 甚至重启,而且没法表达「保留这个服务器,但只给模型 12 个工具」。
36
+ | 能力 | 说明 |
37
+ | --- | --- |
38
+ | **服务器管理** | 两种传输:`streamable-http`(URL + 请求头)与 `stdio`(命令 / 参数 / 环境变量 / 工作目录);分字段填写,或直接粘贴 `{"mcpServers": { ... }}` 一次导入多个。 |
39
+ | **像 Postman 一样填密钥** | 请求头是键值对行而不是 JSON 文本框,默认带一行 `x-mcp-key`;值默认掩码、可逐行显示;名称重复就地报错。 |
40
+ | **真正的逐工具控制** | 每个工具是一个 chip,点击即从模型工具列表消失(不是注册了再报错);支持搜索 / 全选 / 反选 / 全部停用,悬停查看完整描述。 |
41
+ | **连通性测试与事件日志** | 临时建连 `initialize → tools/list → 关闭`,回报耗时 / 协议版本 / 工具数,不影响运行中的服务器;「最近事件」记录连接、重载、测试与失败。 |
42
+ | **服务器开关与配置复制** | 关闭服务器即断开并注销其全部工具(不删配置);一键复制该服务器的 `mcpServers` 片段。 |
43
+ | **与 DSH 原生一致** | 沿用 `--dsw-*` 设计 token、平铺行与 32px 输入框,深浅色 / 中英文自适应;客户端是 classic script,无构建步骤。 |
21
44
 
22
- dsh-mcp-tools 把这些搬进了 **设置 → MCP**:
45
+ <p align="center">
46
+ <img src="https://cdn.jsdelivr.net/gh/hxlog/dsh-mcp-tools@main/docs/screenshots/zh/mcp-add-server.png" width="48%" alt="添加服务器:键值对请求头" />
47
+ <img src="https://cdn.jsdelivr.net/gh/hxlog/dsh-mcp-tools@main/docs/screenshots/zh/mcp-tools.png" width="48%" alt="逐工具 chip" />
48
+ </p>
23
49
 
24
- - 增删改停服务器,不碰配置文件;
25
- - 请求头按 Postman 的方式一行一个键值对,密钥只留在本机;
26
- - 启用前先验证连通性和工具数量;
27
- - 按服务器逐工具开关,支持搜索、全选、反选、全部停用。
50
+ ## 🚀 安装
28
51
 
29
- ---
52
+ 需要 **DeepSeek Harness 0.2.x**(Web GUI `dsh web` 或 DSH Desktop)与 **Node.js ≥ 22.13**,包已发布到 npm:[dsh-mcp-tools](https://www.npmjs.com/package/dsh-mcp-tools)。
30
53
 
31
- ## 功能
54
+ > ⚠️ 这是 **DeepSeek Harness 插件**,不是普通 npm 依赖库:`npm i dsh-mcp-tools` 只会下载包,运行时仍需装进 DSH profile。
32
55
 
33
- ### 服务器管理
56
+ **通过插件页安装(推荐)**
34
57
 
35
- - **两种传输**:`streamable-http`(URL + 请求头)与 `stdio`(命令、参数、环境变量、工作目录)。
36
- - **两种录入**:分字段填写,或直接粘贴 `{"mcpServers": { ... }}`(与 DSH 原生配置同格式),一次导入多个服务器。
37
- - **服务器开关**:关闭即断开连接并注销该服务器全部工具,不会删除配置。
38
- - **复制配置**:一键复制该服务器的 `mcpServers` 片段。
39
-
40
- ### 像 Postman 一样填密钥
41
-
42
- 请求头是键值对行,而不是 JSON 文本框。新服务器默认带一行 `x-mcp-key`,把密钥粘进「值」即可保存。
43
-
44
- ![添加服务器:键值对请求头](docs/screenshots/zh/mcp-add-server.png)
45
-
46
- 值默认掩码显示,可逐行切换显示;名称重复会就地报错。也可以切到「粘贴 JSON」——解析后会把名称、URL、传输方式和请求头同步回表单。
47
-
48
- ![粘贴 mcpServers JSON](docs/screenshots/zh/mcp-json-import.png)
49
-
50
- ### 真正的逐工具控制
51
-
52
- 每个工具是一个 chip。点击即停用,工具会立刻从模型工具列表中消失(不是注册了再报错)。支持搜索、全选、反选、全部停用。
53
-
54
- ![逐工具 chip](docs/screenshots/zh/mcp-tools.png)
55
-
56
- 悬停 chip 可查看完整描述,服务器停用时也能看。
57
-
58
- ![工具描述 tooltip](docs/screenshots/zh/mcp-tooltip.png)
59
-
60
- ### 连通性测试与事件日志
61
-
62
- 测试按钮会临时建连:`initialize` → `tools/list` → 关闭,回报耗时、协议版本与工具数量,不改动正在运行的服务器。下方「最近事件」记录连接、重载、测试与失败。
63
-
64
- ### 与 DSH 原生一致
65
-
66
- 沿用 `--dsw-*` 设计 token、平铺行、32px 输入框,深浅色与中英文自适应,键盘焦点环完整。客户端没有构建步骤:它是 classic script,只依赖 `react` 与官方 UI primitives。
67
-
68
- 深色模式:
69
-
70
- ![深色模式](docs/screenshots/zh/mcp-dark.png)
71
-
72
- 停用部分工具:
73
-
74
- ![停用工具](docs/screenshots/zh/mcp-tool-toggles.png)
75
-
76
- ---
77
-
78
- ## 安装
79
-
80
- 需要 **DeepSeek Harness 0.2.x**(Web GUI,`dsh web`)与 **Node.js ≥ 22.13**。
81
-
82
- ### 通过插件页安装(推荐)
83
-
84
- 1. 打开 DSH Web GUI → 侧边栏 **插件**。
58
+ 1. 打开 DSH Web(或 DSH Desktop)→ 侧边栏 **插件**(Desktop 在 **设置 → 插件**)。
85
59
  2. 点击安装,填入 `dsh-mcp-tools`,确认。
86
- 3. 启用新 bundle,然后刷新一次页面。
87
- 4. 打开 **设置 → MCP**。
60
+ 3. 启用新 bundle,刷新页面,打开 **设置 → MCP**。
88
61
 
89
- ### 通过命令行安装
62
+ **通过命令行安装**
90
63
 
91
64
  ```bash
92
- dsh plugin --profile web add dsh-mcp-tools
65
+ dsh plugin --profile web add dsh-mcp-tools # Web
66
+ dsh plugin --profile desktop add dsh-mcp-tools # Desktop
93
67
  ```
94
68
 
95
- 然后把 `"dsh-mcp-tools"` 加进 `~/.dsh/profiles/web/package.json` 的 `dsh.profile.bundles`(或在插件页启用该 bundle),刷新页面。若分区仍未出现,重启 `dsh web`。
96
-
97
- > 升级包版本后需要重启 `dsh web`,才会加载新的 host 模块。
69
+ > 升级包版本后需要重启 `dsh web` / 重启 DSH Desktop。
98
70
 
99
- ---
71
+ ## ⚡ 快速开始
100
72
 
101
- ## 快速开始
73
+ 1. **设置 → MCP → 添加服务器**:远程服务器填 URL,把密钥粘贴进请求头行(默认 `x-mcp-key`)。
74
+ 2. 点 **测试连接**,看到类似 `已连接 · 95 个工具 · 478 ms` 后保存,并打开服务器开关。
75
+ 3. 在会话中直接让模型调用工具,DSH 会注册为 `mcp__<服务器>__<工具>`;用不到的工具展开列表停用即可,启用的工具越少,每次请求里的 tool schema 越小。
102
76
 
103
- 1. **设置 → MCP → 添加服务器**。
104
- 2. 远程服务器:填 URL,把密钥粘贴进请求头行(默认 `x-mcp-key`)。
105
- 3. 点 **测试连接**,应看到类似 `已连接 · 95 个工具 · 478 ms`。
106
- 4. 保存,并打开服务器开关。
107
- 5. 在会话中直接让模型调用工具。DSH 会把它注册为 `mcp__<服务器>__<工具>`。
77
+ ## 🖼 更多界面
108
78
 
109
- 想省上下文,就展开工具列表,把用不到的停用。启用的工具越少,每次请求里的工具 schema 越小。
79
+ | 深色模式 | 停用部分工具 |
80
+ | --- | --- |
81
+ | <img src="https://cdn.jsdelivr.net/gh/hxlog/dsh-mcp-tools@main/docs/screenshots/zh/mcp-dark.png" width="100%" alt="深色模式" /> | <img src="https://cdn.jsdelivr.net/gh/hxlog/dsh-mcp-tools@main/docs/screenshots/zh/mcp-tool-toggles.png" width="100%" alt="停用部分工具" /> |
110
82
 
111
- ---
83
+ | 粘贴 mcpServers JSON | 工具描述 tooltip |
84
+ | --- | --- |
85
+ | <img src="https://cdn.jsdelivr.net/gh/hxlog/dsh-mcp-tools@main/docs/screenshots/zh/mcp-json-import.png" width="100%" alt="粘贴 mcpServers JSON" /> | <img src="https://cdn.jsdelivr.net/gh/hxlog/dsh-mcp-tools@main/docs/screenshots/zh/mcp-tooltip.png" width="100%" alt="工具描述 tooltip" /> |
112
86
 
113
- ## 工作原理
87
+ ## 🧩 工作原理
114
88
 
115
89
  ```
116
90
  DeepSeek Harness Web (dsh web)
117
- ├── Host 插件(lib/) ← cordis bundle patch,复用原生 MCP 客户端
118
- │ ├── manager.js 连接、工具注册、启停
119
- │ ├── store.js ~/.dsh/dsh-mcp-tools/state.json(原子写、监听外部修改)
120
- │ └── routes.js /mcp-tools/api/*
91
+ ├── Host 插件(lib/) ← cordis bundle patch,复用原生 MCP 客户端
92
+ │ ├── manager.js 连接、工具注册、启停
93
+ │ ├── store.js ~/.dsh/dsh-mcp-tools/state.json(原子写、监听外部修改)
94
+ │ └── routes.js /mcp-tools/api/*
121
95
  └── 客户端 bundle(client/client.js)
122
96
  └── 设置分区「MCP」(id: mcp,order: 18)—— classic script,无需构建
123
97
  ```
124
98
 
125
- - Host 插件包装 DSH 原生 MCP 客户端,工具与会话的接入方式与手写配置完全一致(`mcp__服务器__工具`)。
126
99
  - 启停生效于**注册时**而非调用时:停用的工具根本不出现在模型工具列表里。
127
- - 状态在 `~/.dsh/dsh-mcp-tools/state.json`,原子写入;外部修改会被监听并热应用。
128
-
129
- REST 接口(面板在用,也可脚本调用):`GET /mcp-tools/api/state`、`POST /servers/{test,save,delete,toggle,refresh}`、`POST /tools/{toggle,bulk}`、`POST /import`、`POST /reload`、`GET /logs`。详见 [docs/API.md](docs/API.md)。
130
-
131
- ---
100
+ - 状态存于 `~/.dsh/dsh-mcp-tools/state.json`,原子写入;外部修改会被监听并热应用。
101
+ - REST 接口:`GET /mcp-tools/api/state`、`POST /servers/{test,save,delete,toggle,refresh}`、`POST /tools/{toggle,bulk}`、`POST /import`、`POST /reload`、`GET /logs`;详见 [docs/API.md](docs/API.md)。
132
102
 
133
- ## 安全说明
103
+ ## 🔒 安全说明
134
104
 
135
- - 服务器请求头以**明文**保存在本地状态文件里。文件只在本机,请不要提交到仓库或同步到公开位置。
105
+ - 请求头以**明文**保存在本地状态文件里,只在本机——不要提交到仓库或同步到公开位置。
136
106
  - 给每个 MCP 服务器使用独立、最小权限的密钥。
137
- - 插件除你配置的 MCP 服务器外不发起任何网络请求,没有遥测。
138
- - 删除服务器后,它的工具会从后续所有请求中移除。
107
+ - 除你配置的 MCP 服务器外不发起任何网络请求,没有遥测;删除服务器后它的工具会从后续所有请求中移除。
139
108
 
140
- ---
141
-
142
- ## 开发
109
+ ## 🛠 开发
143
110
 
144
111
  ```bash
145
112
  git clone https://github.com/hxlog/dsh-mcp-tools.git
@@ -148,36 +115,28 @@ node --check client/client.js
148
115
  npm run selftest
149
116
  ```
150
117
 
151
- 调试时把源码目录链接进 profile,而不是安装副本(Windows 示例):
118
+ 把源码目录链接进 profile 调试(Windows 示例):
152
119
 
153
120
  ```bat
154
121
  rmdir "C:\Users\<你>\.dsh\profiles\web\node_modules\dsh-mcp-tools"
155
122
  mklink /J "C:\Users\<你>\.dsh\profiles\web\node_modules\dsh-mcp-tools" "D:\path\to\dsh-mcp-tools"
156
123
  ```
157
124
 
158
- - **客户端改动**:刷新页面。bundle 直接从磁盘提供,无构建。
159
- - **Host 改动**:修改一次 profile 的 `cordis.patch.yml`(例如追加一行注释)触发 HMR 重组;日志出现 `MCP 管理器已启动` 即生效。
160
-
161
- 面板是单个 classic script,因为 DSH Web loader 以 classic script 方式执行客户端 bundle。只能 require `react` 与 `@deepseek-ai/dsh-client-ui-primitives`。
162
-
163
- ---
164
-
165
- ## 常见问题
166
-
167
- **设置里没有 MCP 分区。** 多半是 bundle 未启用:去插件页确认并刷新页面,必要时重启 `dsh web`。
168
-
169
- **会话里看不到工具。** 确认服务器开关已打开、对应工具 chip 也是启用状态;停用的工具不会被注册。
170
-
171
- **测试连接失败。** 检查 URL、服务器是否使用 `streamable-http`(而非普通 SSE)、请求头名称是否与服务端要求一致;网络/代理问题也会在这里暴露。
172
-
173
- **状态文件在哪?** `~/.dsh/dsh-mcp-tools/state.json`。删除即重置为空,下次启动会自动重建。
125
+ - **客户端改动**:刷新页面即可,bundle 直接从磁盘提供,无构建。
126
+ - **Host 改动**:改一次 profile 的 `cordis.patch.yml`(例如追加一行注释)触发 HMR 重组,日志出现 `MCP 管理器已启动` 即生效。
127
+ - 面板是单个 classic script,只能 `require` `react` 与 `@deepseek-ai/dsh-client-ui-primitives`。
174
128
 
175
- ---
129
+ ## ❓ 常见问题
176
130
 
177
- ## License
131
+ | 问题 | 处理 |
132
+ | --- | --- |
133
+ | 设置里没有 MCP 分区 | 多半是 bundle 未启用:插件页确认并刷新,必要时重启 `dsh web`。 |
134
+ | 会话里看不到工具 | 确认服务器开关已打开、对应工具 chip 也已启用;停用的工具不会被注册。 |
135
+ | 测试连接失败 | 检查 URL、服务器是否使用 `streamable-http`(而非普通 SSE)、请求头名称是否与服务端要求一致;网络 / 代理问题也会在这里暴露。 |
136
+ | 状态文件在哪 | `~/.dsh/dsh-mcp-tools/state.json`;删除即重置为空,下次启动自动重建。 |
178
137
 
179
- [MIT](LICENSE)
138
+ ## 📄 License
180
139
 
181
- ---
140
+ [MIT](LICENSE) · Powered by [DeepSeek Harness](https://github.com/deepseek-ai/deepseek-harness)
182
141
 
183
142
  [![](https://img.shields.io/badge/powered_by-dsh-4D6BFE?style=flat-square&logo=deepseek&logoColor=white)](https://github.com/deepseek-ai/deepseek-harness)
package/package.json CHANGED
@@ -1,8 +1,8 @@
1
1
  {
2
2
  "name": "dsh-mcp-tools",
3
- "version": "1.0.0",
3
+ "version": "1.0.2",
4
4
  "type": "module",
5
- "description": "Manage your MCP servers and toggle MCP tools on demand, inside DeepSeek Harness settings.",
5
+ "description": "Manage your MCP servers and toggle MCP tools on demand inside DeepSeek Harness settings",
6
6
  "icon": "icon.svg",
7
7
  "main": "./lib/index.js",
8
8
  "exports": {
@@ -51,7 +51,7 @@
51
51
  },
52
52
  "license": "MIT",
53
53
  "author": "Xingyu Liu <xingyuliu@outlook.sg>",
54
- "homepage": "https://github.com/hxlog/dsh-mcp-tools#readme",
54
+ "homepage": "https://github.com/hxlog/dsh-mcp-tools",
55
55
  "repository": {
56
56
  "type": "git",
57
57
  "url": "git+https://github.com/hxlog/dsh-mcp-tools.git"
package/scripts/smoke.mjs CHANGED
@@ -63,8 +63,8 @@ check('README screenshots exist (zh primary + en)', () => {
63
63
  })
64
64
  check('Chinese README is the npm/GitHub landing page', () => {
65
65
  const text = read('README.md')
66
- assert(text.includes('DeepSeek Harness 最简洁'), 'tagline missing from README.md')
67
- assert(text.includes('[English](README.en.md)'), 'language switch missing from README.md')
66
+ assert(text.includes('DeepSeek Harness 简洁'), 'tagline missing from README.md')
67
+ assert(text.includes('README.en.md'), 'language switch missing from README.md')
68
68
  })
69
69
  check('npm files whitelist contains runtime paths', () => {
70
70
  for (const entry of ['lib', 'client/client.js', 'locale', 'cordis.patch.yml', 'icon.svg', 'README.md', 'README.en.md', 'LICENSE']) {