dsh-mcp-admin
dsh-mcp-admin
把 DeepSeek Harness 的 skill 与 Agent 预设管理暴露为 MCP server 的双面插件:远程 Agent 通过 MCP 协议直接修改服务器上的 skill / preset 配置,无需 SSH;host 半区记录审计日志,浏览器半区在 Settings 页提供「MCP 管理」看板展示最近的修改记录。
典型用途:在远程服务器上运行 dsh web,本地 Agent 连接 http://<服务器>:3080/mcp,形成「生产 → 评审 → 修改 → 再生产」的闭环。
架构
本地 Agent (MCP client)
│ POST /mcp (Authorization: Bearer <token>)
▼
dsh web (host 半区)
├── Streamable HTTP MCP server(stateless,每请求一个实例)
│ ├── skill_list / skill_read / skill_upsert / skill_delete
│ └── preset_list / preset_read / preset_upsert / preset_delete
├── 审计 JSONL:$DSH_HOME/mcp-admin/audit.jsonl
└── RPC 通道 /mcp-admin(audit.list,trusted-host 围栏)
▲
浏览器 Settings「MCP 管理」看板(client 半区,5s 轮询)skill 写入守护:直接写入
$DSH_HOME/skills/<name>/SKILL.md(目录 bundle;已有扁平布局<name>.md则就地覆盖保留形态)。harness 的skill-filesystemprovider 监听该目录,写完下一 agent step 即生效。preset 写入:写入
$DSH_HOME/.agent-presets/<id>/agent.cordis.yml。覆盖 system trust 的 preset 必须先传base把它 copy 进 user root(防止无意中从零遮蔽此内置 preset)。standing-mount 的文件戳机制让改动对新 session 自动生效,无需重启;正在进行的 session 不受影响。审计:每次写/删追加一条 JSONL(时间、工具、目标、动作、字节数、内容前 200 字符摘要),按
auditLimit截断。
Related MCP server: dsh-trio
安装
dsh plugin --profile web add /path/to/dsh-mcp-admin然后在 profile 的 ~/.dsh/profiles/web/cordis.patch.yml 里配置 token(必须,否则插件拒绝启动):
- id: mcp-admin
config:
token: <openssl rand -hex 32 的输出>
auditLimit: 200配置
字段 | 类型 | 默认值 | 说明 |
| string | (必填) |
|
| number | 200 | 审计日志保留条数 |
| string | 空 | 在本部署公网/局域网访问地址(如 |
MCP client 配置
最简单的方式:打开 Settings 的「MCP 管理」页,先在「当前访问地址」里填入本部署的公网/局域网地址(如 http://1.2.3.4:3080,NAT 机器必填;留空则默认使用你打开页面时的地址),保存后点击「复制 MCP 配置」— 会复制一份完整的配置说明(含 URL 和 token),直接粘贴给要配置的 Agent,它照着配置即可。注意 http:// 页面下浏览器会自动拦截剪贴板,按钮会降级为展示手动复制文本框。
手动配置的格式(Streamable HTTP 类型):
{
"mcpServers": {
"dsh-admin": {
"type": "http",
"url": "http://<服务器>:3080/mcp",
"headers": { "Authorization": "Bearer <token>" }
}
}
}工具一览
工具 | 说明 |
| 列出 user root 下的 skill(名称、描述、形态、路径) |
| 读取 SKILL.md 全文 + bundle 资源文件清单 |
| 创建/覆盖 skill(校验 kebab-case 名与 frontmatter 的 |
| 删除 user root 下的 skill |
| 列出全部 preset(含 trust 与 broken 标记) |
| 读取 preset 的 |
| 创建/覆盖 preset 组合; |
| 删除 user trust 的 preset(system 不可删) |
安全说明
harness webserver 本身无 TLS、无认证;
/mcp在/api信任围栏之外,token是唯一防线。泄露 token = 对方可以重写你的 skill 和 preset(间接远程代码执行)。建议只在反向代理终结 TLS 后暴露,或配合 harness 的
trusted-host机制限制来源。所有写操作限定在 user root(
~/.dsh/skills、~/.dsh/.agent-preset),不触碰内置 preset 与项目目录。看板 RPC 通道(
/mcp-admin)走 connection 的trusted-host围栏;审计记录不含 secret。「复制 MCP 配置说明」按钮会通过
setup-infoendpoint 把 token 回传给页面:任何能打开 Web UI 的人都能拿到 token。这与 harness 现有安全模型一致(能打开 Web UI 已经能通过session.prompt在服务器上跑 agent),但意味着 Web UI 的暴露面 = token 的暴露面。
开发
pnpm install
pnpm run build # host: tsc → lib/;client: tsdown → lib/client.js
pnpm run typecheckclient 半区的类型解析依赖本机 harness 源码树(dsh-client-* 未完整发布 npm),tsconfig*.json 里的 paths 硬编码指向 harness checkout;迁移机器时需要改这些路径。
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
This server cannot be deployed
Maintenance
Related MCP Connectors
Hosted MCP server and Agent Skills for specs, engineering threads, and project memory.
Governed AI agent skills — one library, distributed to devs and exposed to remote agents over MCP.
Host any HTTP API as a standard MCP server; auto-distribute to 12+ mainstream agent platforms.
Nifty's MCP server — exposes tasks, projects, messages, and files as tools for AI agents.
Related MCP Servers
- AlicenseNot gradedqualityCmaintenanceExposes DeepSeek Harness agent capabilities as an MCP server, letting any MCP client drive Harness to execute real coding tasks with structured results, context isolation, and parallel execution.80 npm15MIT
- AlicenseNot gradedqualityCmaintenanceTurns DeepSeek Harness into an MCP server with tools for session management, agent execution, resources, and OAuth, plus browser automation and GitHub/GitLab integration.30 npm20MIT
- AlicenseNot gradedqualityBmaintenanceEnables external MCP clients to drive DeepSeek Harness agents for real coding tasks, providing tools for task execution and queueing, session management, sandboxed file access, preset switching, and usage statistics.389 npm8GPL 3.0
- AlicenseNot gradedqualityBmaintenanceEnables centralized, versioned management and distribution of AI agent skills through a horizontally scalable MCP server, allowing agents to dynamically discover, search, and retrieve skills over HTTP/SSE.MIT