dsh-mcp-json
Load MCP servers for the DeepSeek Harness from the mcp.json of Claude Code, Kiro, OpenCode, and Codex, with user and project layers and live reload
安装
npx -p @deepseek-ai/dsh dsh plugin --profile web add github:caopu16/dsh-mcp-json说明文档
阅读完整 README ↗dsh-mcp-json
English | 中文
用你的 agent 工具已有的配置文件,在 DeepSeek Harness 里挂载 MCP server。它读取 Claude Code、Kiro、OpenCode、Codex 的 mcp.json,合并之后让运行中的 server 集合与文件保持同步。
harness 的 MCP 客户端刻意做成一个插件实例对一台 server,并且不读任何文件。本包补上它不做的配置发现:新增一台 server 从此是改 JSON,而不是改 profile 的插件树。
前置条件
- 可用的
dsh安装(本包是插件,不是独立工具)。 - 至少一份 MCP 配置文件。下表任意位置都算——已有的 Claude Code 或 Kiro 配置无需新建文件、也无需任何 entry 配置就能用。
安装
dsh plugin --profile web add github:caopu16/dsh-mcp-json
本包自带 patch 层,安装即挂载加载器。构建产物 lib/ 已提交进仓库,所以 git 源安装不执行任何构建脚本。
没有 dsh 命令时
PATH 上的 dsh 来自已安装的 @deepseek-ai/dsh。如果你用的是 harness 源码 checkout,就在该 checkout 里运行 CLI:
cd /path/to/deepseek-harness
pnpm dsh plugin --profile web add github:caopu16/dsh-mcp-json
pnpm dsh --profile web
开发本插件
lib/ 是提交进仓库的,所以改动 src/ 之后必须重新构建并一并提交,使用者才能拿到:
npm install
npm run build
npm test
读取哪些位置
各层按"从宽泛到具体"依次应用,同一个 server 名出现在多层时,由最后声明它的文件定义。用户级在前、项目级在后,因此一个 checkout 可以只重定向其中一台 server,不必把其余的重写一遍。
| 顺序 | 路径 | 工具 | 方言 |
|---|---|---|---|
| 1 | ~/.claude.json | Claude Code | mcpServers |
| 2 | ~/.codex/config.toml | Codex | TOML [mcp_servers.*] |
| 3 | ~/.kiro/settings/mcp.json | Kiro | mcpServers |
| 4 | ~/.config/opencode/opencode.json[c] | OpenCode | mcp |
| 5 | ~/.dsh/mcp.json | 本 harness | mcpServers |
| 6 | /.mcp.json | Claude Code | mcpServers |
| 7 |