dsh-cordis-mcp
dsh-cordis-mcp
把 DeepSeek Harness 的动态 Cordis 工具集以 MCP(Streamable HTTP)暴露给 Claude Code:Claude Code 可以实时加载、定义、运行、更新、停止、删除 DSH 的动态插件——和你在 DSH 会话里用 cordis_define / cordis_run / cordis_stop / cordis_undefine / cordis_inspect_* 完全同一套能力,同一个运行时代理。
┌─────────────┐ MCP (Streamable HTTP, loopback) ┌───────────────────────────┐
│ Claude Code │ ────── http://127.0.0.1:8090/mcp ──▶ │ DSH host (本插件) │
│ (claude) │ ────── JSON-RPC 2.0 ───────────────▶ │ dynamicCordisRunner │
└─────────────┘ │ cordisInspect │
│ agents (会话解析) │
└───────────────────────────┘插件挂在现有 web 端口上,不新开端口、不发布服务;MCP 端点强制 Bearer 认证,token 在 DSH 设置 → dsh-cordis-mcp 页面配置(首次自动生成,可自定义/重新生成)。
能力(10 个工具)
MCP 工具 | 对应 DSH 工具 | 作用 |
| — | 桥状态:会话解析、活会话列表、插件数 |
| — | 列出可管理的活 DSH 会话(插件按会话归属) |
|
| 列出目标会话的全部动态插件与状态 |
|
| 插件/包详情;带 |
|
| Inspect provider 目录(host + client) |
|
| 跑一次只读 inspect 查询(服务/事件/内建/槽位/主题/工具目录) |
|
| 定义不可变 Package(新建插件或追加版本) |
|
| 激活 Package( |
|
| 停止运行、取消未决审批,保留定义与版本 |
|
| 永久删除插件(含全部 Package、授权、版本指针) |
含 Client half 的包首次运行仍走 DSH 的审批流:
dsh_plugin_run返回awaiting-approval,在 DSH Web GUI 的 Run 卡片上点允许后异步完成——和 DSH 会话内一致。
Related MCP server: cc-plugin-mcp
一键安装
curl -fsSL https://raw.githubusercontent.com/GeekRicardo/dsh-cordis-mcp/main/install.sh | bash脚本做的事(可先 --dry-run 预览):
在
~/.dsh/profiles/web/package.json写入依赖"dsh-cordis-mcp": "github:GeekRicardo/dsh-cordis-mcp";把
dsh-cordis-mcp追加进dsh.profile.bundles;cd ~/.dsh/profiles/web && pnpm install;校验 bundles 已注册,提示重启。
重启 DSH 并硬刷新页面后,MCP 端点随 web 服务就绪:
pm2 restart dsh-web # 若用 pm2 托管;否则用你的启动方式重启接入 Claude Code
# 端口换成你 DSH web 的实际端口(启动日志会打印完整地址)
claude mcp add dsh --transport http http://127.0.0.1:8090/mcp
claude mcp list # 确认 connected认证(强制,不能直连)
MCP 端点强制 Bearer 认证,未带 token 一律 401(未配置 token 则 503)。token 在 DSH 设置 → dsh-cordis-mcp 页面里配置:首次使用自动生成并持久化,页面可查看/复制/自定义/重新生成。把 token 填进 .mcp.json 的请求头:
{
"mcpServers": {
"dsh": {
"type": "http",
"url": "http://127.0.0.1:8090/mcp",
"headers": { "Authorization": "Bearer <设置页里的 token>" }
}
}
}token 解析优先级:设置页配置 > DSH_MCP_TOKEN 环境变量 > 自动生成。改 token 立即生效(无需重启);重新生成后旧 token 立即失效,需同步更新 Claude Code 配置。
会话语义(重要)
动态插件按会话归属,且是进程内存态(DSH 重启即清空)。桥的会话解析顺序:
调用参数里的
sessionId(可用dsh_sessions查);环境变量
DSH_MCP_DEFAULT_SESSION指定;当前唯一活会话;
多个活会话但未指定 → 报错列出可选,要求传
sessionId。
其他环境变量
变量 | 默认 | 说明 |
|
| MCP 端点路径(挂在 webServer 上) |
| 无 | 认证 token 的回退来源(设置页未配置时使用) |
| 无 | 未显式传 |
安全边界
强制 Bearer 认证:无 token 一律 401 / 503,端点永远不能直连;
只接受 loopback Host(
127.*/localhost/::1),拒绝一切外部访问;拒绝
sec-fetch-site: cross-site的浏览器请求,且永不返回 CORS 头——网页读不到响应;设置页路由
/dsh-cordis-mcp/settings仅放行同源 loopback(不带 MCP token,但改的只是 token 配置本身);该端点能 define/run/删除插件,等同 shell 权限,别把端口暴露到非本机。
工作原理
文件 | 职责 |
| 纯 MCP JSON-RPC 层(initialize / ping / tools/list / tools/call),零 DSH 依赖 |
| 10 个工具的输入校验 + 会话解析,封装 |
| 纯 token 解析/生成(设置 > env > 自动生成) |
| MCP route 的 HTTP 层:强制认证、body 读取、loopback/跨站防护 |
| Cordis 插件:注入 5 个宿主服务、settings 命名空间、 |
| 设置页 UI:token 查看/复制/自定义/重新生成 + 端点地址 |
卸载
# 1. 从 ~/.dsh/profiles/web/package.json 的 dsh.profile.bundles 移除 "dsh-cordis-mcp"
# 2. 移除 dependencies 里的 "dsh-cordis-mcp"
# 3. cd ~/.dsh/profiles/web && pnpm install
# 4. 重启 DSH;claude mcp remove dsh前置条件
DeepSeek Harness 已初始化 web profile(
~/.dsh/profiles/web存在),且当前会话跑在带 Cordis 工具集的 preset 上(宿主侧dynamicCordisRunner服务存在,默认即有);本机装有 Claude Code CLI 并已登录;
Node.js ≥ 20、pnpm 可用。
Troubleshooting
现象 | 原因与处理 |
| DSH 未重启 / 端口不对。重启后在 DSH 启动日志里找 |
| 含 Client half 的包需要你在 DSH Web GUI 的 Run 卡片上允许;授权后重跑 |
报 | 有多个活会话,先 |
报 | DSH Web GUI 没打开任何会话;打开后再试 |
401 / |
|
503 / | host 未初始化 token(异常态)——在设置页保存任意 token 或重启 DSH |
插件重启后消失 | 动态插件是进程内存态,属预期;本桥只管理运行中的 DSH 进程 |
License
MIT
This server cannot be installed
Maintenance
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Related MCP Servers
- AlicenseNot gradedqualityCmaintenanceEnables MCP clients to spawn and control Codex CLI and Claude Code sessions on the host machine, with session management and filesystem access.4MIT
- AlicenseBqualityDmaintenanceMCP server for accessing Claude Code plugins. Enables retrieving plugin lists and detailed information via MCP clients like Claude Desktop, Cursor.2MIT
- AlicenseBqualityCmaintenanceExposes self-owned AI agent plugins as tools to Claude Code via a stdio MCP server, allowing Claude to call system info, calculator, or scribe transcriber directly.3MIT
- AlicenseNot gradedqualityBmaintenanceEnables Claude Code sessions to query fleet status, focus terminals, and manage sessions programmatically via MCP tools.1MIT
Related MCP Connectors
Generate AI music via the Lacuna Music API from MCP clients like Claude Desktop & Code.
Augments MCP Server - A comprehensive framework documentation provider for Claude Code
Manage SRG+ hubs, channels, content, assets, users, and workspaces from any MCP-aware AI agent.
Latest Blog Posts
- Who's Calling? MCP Hosts Are an Identity Blind Spot (And the Spec Knows It)By Om-Shree-0709 on .mcpAgent IdentityOAuth 2.1
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
MCP directory API
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/GeekRicardo/dsh-cordis-mcp'
If you have feedback or need assistance with the MCP directory API, please join our Discord server