dsh-remote-mcp-manager 0.0.0-stage → 0.5.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/README.en.md +109 -0
- package/README.md +118 -2
- package/cordis.patch.yml +4 -0
- package/icon.png +0 -0
- package/icon@2x.png +0 -0
- package/lib/client.js +496 -0
- package/lib/index.js +643 -0
- package/lib/settings-card.module.css +325 -0
- package/locale/en.json +6 -0
- package/locale/zh.json +6 -0
- package/package.json +68 -3
package/README.en.md
ADDED
|
@@ -0,0 +1,109 @@
|
|
|
1
|
+
# dsh-remote-mcp-manager
|
|
2
|
+
|
|
3
|
+
A DSH plugin for managing remote and local MCP servers, from both the settings panel and the phone's native UI.
|
|
4
|
+
|
|
5
|
+

|
|
6
|
+
|
|
7
|
+
[中文](README.md) | English
|
|
8
|
+
|
|
9
|
+
## Features
|
|
10
|
+
|
|
11
|
+
### Native mobile panel (new in v0.4.0)
|
|
12
|
+
- Registers an **MCP Manager** native panel via `ctx.dshGo.panel()`, shown in the session tab bar and under "All features"
|
|
13
|
+
- Read-only overview: lists every configured MCP server with its connection status and tool count
|
|
14
|
+
- Results are cached for 60 seconds to keep the UI responsive
|
|
15
|
+
- Panel title follows the system language
|
|
16
|
+
|
|
17
|
+
### Dedicated settings page (since v0.3.0)
|
|
18
|
+
- **MCP Manager**: a top-level page in the settings sidebar
|
|
19
|
+
- **Single-card layout**: the server list and the editor form share one card and switch in place, so nothing scrolls out of view
|
|
20
|
+
- **Edit in place**: clicking "Edit" turns the card into a form
|
|
21
|
+
- **Unsaved-changes guard**: leaving a dirty form opens a modal offering "Save" or "Discard"
|
|
22
|
+
- **Themed modal**: matches the card styling in both light and dark themes
|
|
23
|
+
|
|
24
|
+
### Configuration
|
|
25
|
+
- **Remote HTTP MCP**: add a Streamable HTTP MCP server (URL, token, path, timeout)
|
|
26
|
+
- **Local process MCP**: launch a stdio MCP server (command, arguments, environment, working directory)
|
|
27
|
+
- **Connection test**: remote HTTP servers can be tested live (MCP initialization + `tools/list`)
|
|
28
|
+
- **CRUD**: add, edit, and delete configured servers
|
|
29
|
+
- **Persistence**: configuration is written to `cordis.patch.yml` and hot-reloaded
|
|
30
|
+
|
|
31
|
+
## Installation
|
|
32
|
+
|
|
33
|
+
```bash
|
|
34
|
+
dsh plugin add dsh-remote-mcp-manager
|
|
35
|
+
```
|
|
36
|
+
|
|
37
|
+
## Usage
|
|
38
|
+
|
|
39
|
+
### Managing servers
|
|
40
|
+
Open the **MCP Manager** page from the settings sidebar in the DSH Web UI. Existing servers are listed there; click **Edit** to switch that card into its form, where you can test the connection or delete the entry.
|
|
41
|
+
|
|
42
|
+
### Adding a remote HTTP server
|
|
43
|
+
- **Server name**: unique identifier, letters, digits, underscore and hyphen only, 1–32 characters
|
|
44
|
+
- **URL**: MCP server endpoint
|
|
45
|
+
- **API key / token**: optional authentication
|
|
46
|
+
- **Path**: optional URL path
|
|
47
|
+
- **Timeout**: optional, defaults to 60000 ms
|
|
48
|
+
|
|
49
|
+
### Adding a local process server
|
|
50
|
+
- **Server name**: same rules as above
|
|
51
|
+
- **Command**: executable path (for example `node`, `python`, `npx`)
|
|
52
|
+
- **Arguments**: one per line
|
|
53
|
+
- **Environment**: one `KEY=VALUE` per line
|
|
54
|
+
- **Working directory**: optional
|
|
55
|
+
|
|
56
|
+
## Transport types
|
|
57
|
+
|
|
58
|
+
| Type | Protocol | Description |
|
|
59
|
+
|------|----------|-------------|
|
|
60
|
+
| Remote HTTP | `streamable-http` | Connects to a remote MCP server |
|
|
61
|
+
| Local process | `stdio` | Spawns a local MCP subprocess |
|
|
62
|
+
|
|
63
|
+
## Changelog
|
|
64
|
+
|
|
65
|
+
### v0.4.1
|
|
66
|
+
- **Fix: incomplete npm package** — the `files` field omitted `cordis.patch.yml`, `icon.png` and `icon@2x.png`, so the plugin failed to load when installed from npm
|
|
67
|
+
- **Added: `publishConfig`** — pins publishing to the official registry and declares public access
|
|
68
|
+
|
|
69
|
+
### v0.4.0
|
|
70
|
+
- **Added: native mobile panel** — registers a `mcp-manager` panel showing each server's connection status and tool count
|
|
71
|
+
- **Added: localization** — ships `locale/zh.json` and `locale/en.json`; titles follow the system language
|
|
72
|
+
- **Added: plugin icons** — `icon.png` and `icon@2x.png`
|
|
73
|
+
- **Changed: unified plugin identifier** — renamed from `remote-mcp-manager` to `dsh-remote-mcp-manager` to match the package name
|
|
74
|
+
- **Fix: `cordis.patch.yml` was not tracked** — this file is required for the plugin to load and had been excluded by `.gitignore`, so a fresh clone could not load the plugin
|
|
75
|
+
- **Improved: server name validation** — enforces `[A-Za-z0-9_-]{1,32}` and rejects duplicates
|
|
76
|
+
- **Improved: explicit client injections** — client modules are now declared explicitly, avoiding load-order problems
|
|
77
|
+
|
|
78
|
+
> **Upgrade note**: the plugin identifier changed. When upgrading from v0.3.x, remove the old
|
|
79
|
+
> `remote-mcp-manager` in the plugin manager, then install `dsh-remote-mcp-manager`.
|
|
80
|
+
> Back up any MCP configuration previously written to `cordis.patch.yml`.
|
|
81
|
+
|
|
82
|
+
### v0.3.1
|
|
83
|
+
- **Fix: token lost after update** — front end and back end now serialize the token field consistently
|
|
84
|
+
- **Fix: connection test hanging** — HTTP requests use a 15-second timeout (`AbortController`)
|
|
85
|
+
- **Fix: save button not working** — added the save callback, guarded against saving on first load, surfaced error messages
|
|
86
|
+
- **Fix: stronger form validation** — server name format check, duplicate detection, rejects non-ASCII names
|
|
87
|
+
- **Fix: stdio options dropped** — `toolCallTimeoutMs` and `failOnStartupError` are read and written correctly
|
|
88
|
+
- **Fix: patch file recovery** — a file with only a begin marker and no end marker is repaired instead of failing silently
|
|
89
|
+
- **Security** — CSRF same-origin check, 2 MB request body limit, no duplicate header writes on error
|
|
90
|
+
- **UX** — save failures and form errors are shown, empty loads ignored, path joining fixed
|
|
91
|
+
|
|
92
|
+
### v0.3.0
|
|
93
|
+
- Top-level settings page: promoted from a card inside the "Plugins" page to its own settings page
|
|
94
|
+
- Merged card: the list and the create/edit form share one card, switched by a `mode` state
|
|
95
|
+
- Edit in place: clicking "Edit" turns the card into the form
|
|
96
|
+
- Unsaved-changes guard: a custom modal asks whether to save before leaving
|
|
97
|
+
- Sidebar label: renamed to "MCP Manager"
|
|
98
|
+
|
|
99
|
+
### v0.2.0
|
|
100
|
+
- Added stdio transport support (local process MCP)
|
|
101
|
+
- Replaced the native select with a custom dropdown
|
|
102
|
+
- Configurable timeout
|
|
103
|
+
- Session ID passthrough (`MCP-Session-Id`)
|
|
104
|
+
|
|
105
|
+
## License
|
|
106
|
+

|
|
107
|
+
|
|
108
|
+
## Version
|
|
109
|
+

|
package/README.md
CHANGED
|
@@ -1,3 +1,119 @@
|
|
|
1
|
-
|
|
1
|
+
中文 | [English](README.en.md)
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
# dsh-remote-mcp-manager
|
|
4
|
+
|
|
5
|
+
DSH 插件:设置面板与手机原生界面上管理远程MCP 服务器
|
|
6
|
+
|
|
7
|
+

|
|
8
|
+

|
|
9
|
+

|
|
10
|
+
<a href="https://github.com/ccch1mneyyy/dsh-go/stargazers"><img alt="GitHub Star 数" src="https://img.shields.io/github/stars/lwy521/dsh-remote-mcp-manager?style=flat-square&logo=github&label=Star&color=4B67B4&labelColor=2B3245"></a>
|
|
11
|
+
|
|
12
|
+
<p align="center">
|
|
13
|
+
<sub>有问题可以先看<a href="README.md">使用指南</a>遇到问题欢迎来</sub><br>
|
|
14
|
+
<sub>
|
|
15
|
+
<a href="https://qm.qq.com/q/n8IIExyQb6">QQ 群:1098700583</a></sub><br></p>
|
|
16
|
+
|
|
17
|
+
## 功能
|
|
18
|
+
|
|
19
|
+
### 设置页对象表单(v0.5.0)
|
|
20
|
+
- 每个 MCP 服务 = 一个可展开的对象槽位,标题直接显示服务名(`mcp-gateway`、`Firecrawl`…)
|
|
21
|
+
- 点开就是完整表单:服务名 / 启用服务 / 自动测速 / 地址 / 协议(左右滑动选 streamable-http、sse、stdio)/ 密钥 / 描述 / 超时
|
|
22
|
+
- **删除这个服务**:打开后该槽位被清空、服务停止挂载
|
|
23
|
+
- 最后一行是 **添加服务**,只有一个字段「填写新配置服务名」;填了就自动追加一个完整槽位,填满继续增长,**不限条数**
|
|
24
|
+
- 服务名留空只填地址时,插件会向该地址握手取 `serverInfo.name` 自动补名
|
|
25
|
+
- 整页可编辑,改完离开即保存,不再有「由配置文件固定」的只读状态
|
|
26
|
+
|
|
27
|
+
### 设置侧边栏一级页面(v0.3.0)
|
|
28
|
+
- **MCP管理**:设置侧边栏新增「MCP管理」一级页面
|
|
29
|
+
- **单个卡片集成**:配置列表和编辑/新建表单合并为单个卡片,通过状态切换
|
|
30
|
+
- **编辑即切换**:点击列表中的「编辑」按钮,卡片就地切换为编辑表单
|
|
31
|
+
- **未保存提示**:表单有修改时点击「返回」弹出自定义弹窗
|
|
32
|
+
- **自定义弹窗**:与卡片主题风格一致的模态对话框,支持深色/浅色主题
|
|
33
|
+
|
|
34
|
+
### 配置管理
|
|
35
|
+
- **HTTP 远程 MCP**:添加远程 Streamable HTTP MCP Server(URL、Token、Path、超时时间)
|
|
36
|
+
- **本地进程 MCP**:通过 stdio 启动本地 MCP Server(命令、参数、环境变量、工作目录)
|
|
37
|
+
- **测试连接**:HTTP 远程 MCP 支持实时测试连接(MCP 协议初始化 + tools/list)
|
|
38
|
+
- **CRUD 管理**:添加、编辑、删除已配置的 MCP Server
|
|
39
|
+
- **持久化**:配置写入 `cordis.patch.yml`,支持热重载
|
|
40
|
+
|
|
41
|
+
## 安装
|
|
42
|
+
|
|
43
|
+
```bash
|
|
44
|
+
dsh plugin add dsh-remote-mcp-manager
|
|
45
|
+
```
|
|
46
|
+
|
|
47
|
+
## 使用
|
|
48
|
+
|
|
49
|
+
### 管理配置
|
|
50
|
+
在 DSH Web GUI 的设置侧边栏找到「MCP管理」页面,查看已添加的 MCP Server,
|
|
51
|
+
点击「编辑」就地切换到编辑表单,可测试连接、删除。
|
|
52
|
+
|
|
53
|
+
### 新建配置(HTTP 远程)
|
|
54
|
+
- Server 名称:唯一标识,仅允许字母、数字、下划线和连字符,长度 1–32
|
|
55
|
+
- URL:MCP 服务器地址
|
|
56
|
+
- API Key / Token:可选,认证信息
|
|
57
|
+
- Path:可选,URL 路径
|
|
58
|
+
- 超时:可选,默认 60000ms
|
|
59
|
+
|
|
60
|
+
### 新建配置(本地进程)
|
|
61
|
+
- Server 名称:同上
|
|
62
|
+
- 命令:可执行文件路径(如 `node`、`python`、`npx`)
|
|
63
|
+
- 参数:每行一个参数
|
|
64
|
+
- 环境变量:每行 `KEY=VALUE`
|
|
65
|
+
- 工作目录:可选
|
|
66
|
+
|
|
67
|
+
## 传输类型
|
|
68
|
+
|
|
69
|
+
| 类型 | 协议 | 说明 |
|
|
70
|
+
|------|------|------|
|
|
71
|
+
| HTTP 远程 | `streamable-http` | 连接远程 MCP 服务器 |
|
|
72
|
+
| 本地进程 | `stdio` | 本地启动子进程 MCP |
|
|
73
|
+
|
|
74
|
+
## 变更记录
|
|
75
|
+
|
|
76
|
+
### v0.4.1
|
|
77
|
+
- **修复:npm 包内容不完整** — `files` 字段未包含 `cordis.patch.yml`、`icon.png`、`icon@2x.png`,
|
|
78
|
+
从 npm 安装后插件无法加载
|
|
79
|
+
- **新增:`publishConfig`** — 固定发布到官方 registry 并声明 public
|
|
80
|
+
|
|
81
|
+
### v0.4.0
|
|
82
|
+
- **新增:手机端原生面板** — 注册 `mcp-manager` 原生面板,展示各 MCP Server 的连通状态与工具数
|
|
83
|
+
- **新增:国际化** — 提供 `locale/zh.json`、`locale/en.json`,标题与描述跟随系统语言
|
|
84
|
+
- **新增:插件图标** — 附带 `icon.png` / `icon@2x.png`
|
|
85
|
+
- **变更:插件标识统一** — 由 `remote-mcp-manager` 改为 `dsh-remote-mcp-manager`,与包名一致
|
|
86
|
+
- **修复:`cordis.patch.yml` 未入库** — 该文件是插件加载的必需配置,此前被 `.gitignore` 排除,导致克隆后无法加载
|
|
87
|
+
- **增强:serverName 校验** — 强制 `[A-Za-z0-9_-]{1,32}` 格式并检测重名
|
|
88
|
+
- **增强:客户端注入明确** — 显式声明依赖的 client 模块,避免加载顺序问题
|
|
89
|
+
|
|
90
|
+
> **升级注意**:插件标识已变更。从 v0.3.x 升级时,请在插件管理器中移除旧的
|
|
91
|
+
> `remote-mcp-manager`,再安装 `dsh-remote-mcp-manager`。
|
|
92
|
+
> `cordis.patch.yml` 中此前写入的 MCP 配置建议先备份。
|
|
93
|
+
|
|
94
|
+
### v0.3.1
|
|
95
|
+
- **修复:更新后 token 丢失** — 前后端 token 字段序列化一致,不再丢失 API Key
|
|
96
|
+
- **修复:测试连接阻塞** — HTTP 请求添加 15 秒超时(AbortController),避免测试卡死
|
|
97
|
+
- **修复:保存按钮失效** — 增加保存回调、首次加载防误存、错误提示展示
|
|
98
|
+
- **修复:表单校验增强** — 增加 serverName 格式校验、重名检测、中文名称禁止
|
|
99
|
+
- **修复:stdio 属性丢失** — `toolCallTimeoutMs` 和 `failOnStartupError` 正确读写透传
|
|
100
|
+
- **修复:patch 文件损坏恢复** — 只含 begin 无 end 标记时自动修复,不再静默失败
|
|
101
|
+
- **安全增强** — CSRF 同源校验、请求体大小上限 2MB、错误不重复写头
|
|
102
|
+
- **体验优化** — 保存失败/表单错误提示展示、忽略空加载数据、路径拼接修复
|
|
103
|
+
|
|
104
|
+
### v0.3.0
|
|
105
|
+
- 设置侧边栏一级页面:从「插件」设置页内卡片提升为独立设置页面
|
|
106
|
+
- 合并卡片:管理配置列表和编辑/新建表单合并为单个卡片,`mode` 状态切换
|
|
107
|
+
- 编辑即切换:点击列表中「编辑」按钮,卡片就地切换为编辑表单
|
|
108
|
+
- 未保存提示:自定义模态弹窗,表单有修改时提示保存/不保存
|
|
109
|
+
- 侧边栏标签:改为「MCP管理」
|
|
110
|
+
|
|
111
|
+
### v0.2.0
|
|
112
|
+
- 添加 stdio 传输支持(本地进程 MCP)
|
|
113
|
+
- 自定义下拉组件替代原生 select
|
|
114
|
+
- 超时时间配置
|
|
115
|
+
- 会话 ID 透传支持(MCP-Session-Id)
|
|
116
|
+
|
|
117
|
+
## 更新日志
|
|
118
|
+
|
|
119
|
+
- **v0.5.0** — 设置页改成对象槽位表单(服务名作标题、点开即完整字段、删除开关、添加服务不限条数);移除只读原生面板
|
package/cordis.patch.yml
ADDED
package/icon.png
ADDED
|
Binary file
|
package/icon@2x.png
ADDED
|
Binary file
|