@xiaoyilin/dsh-mcp-lazy
Lazy MCP bridge for DeepSeek Harness: servers connect on demand — only two lightweight activate/deactivate control tools are registered up front. · DSH 按需 MCP 桥接:平时只注册激活/停用控制工具,模型调用时才连接服务器并注册其全部工具。
安装
$
npx -p @deepseek-ai/dsh dsh plugin --profile web add github:leaforbook/dsh-mcp-lazy说明文档
阅读完整 README ↗Configure / 配置
Add one - id: mcp-lazy entry per MCP server in your profile's cordis.patch.yml:
在 profile 的 cordis.patch.yml 中为每个 MCP 服务器加一条 - id: mcp-lazy 条目:
- insert:
- id: mcp-lazy
name: '@xiaoyilin/dsh-mcp-lazy'
config:
transport: stdio
serverName: filesystem
command: npx
args: [-y, '@modelcontextprotocol/server-filesystem', '/tmp']
autoActivate: false # connect at startup instead (default false)
releaseOnTurnEnd: true # disconnect at end of turn (default true)
- id: mcp-lazy
name: '@xiaoyilin/dsh-mcp-lazy'
config:
transport: streamable-http
serverName: remote-api
url: http://127.0.0.1:8000/mcp
headers: {}
Config options / 配置项
| Key / 键 | Type / 类型 | Default / 默认 | Description / 说明 |
|---|---|---|---|
transport | stdio | streamable-http | — | Required. Transport for the MCP server. / 必填,MCP 传输方式。 |
serverName | string | — | Required. [A-Za-z0-9_-]{1,32}; prefixes the control tools. / 必填,作为控制工具名前缀。 |
command / args / env / cwd | — | — | stdio transport: process to spawn (env merges over the scrubbed parent env). / stdio 方式:启动命令(env 在脱敏父环境上合并)。 |
url / headers | — | — | streamable-http transport: endpoint URL and headers. / HTTP 方式:端点与请求头。 |
toolCallTimeoutMs | number | 60000 | Per-tool-call timeout. / 单次工具调用超时。 |
autoActivate | boolean | false | Connect at startup instead of on demand. / 启动即连接(退回常驻模式)。 |
releaseOnTurnEnd | boolean | true | Disconnect when the turn ends and no session is using the server. / 轮次结束且无会话使用时自动断开。 |
Config options / 配置项
| Key / 键 | Type / 类型 | Default / 默认 | Description / 说明 |
|---|---|---|---|
transport | stdio | streamable-http | — | Required. Transport for the MCP server. / 必填,MCP 传输方式。 |
serverName | string | — | Required. [A-Za-z0-9_-]{1,32}; prefixes the control tools. / 必填,作为控制工具名前缀。 |
command / args / env / cwd | — | — | stdio transport: process to spawn (env merges over the scrubbed parent env). / stdio 方式:启动命令(env 在脱敏父环境上合并)。 |
url / headers | — | — | streamable-http transport: endpoint URL and headers. / HTTP 方式:端点与请求头。 |
toolCallTimeoutMs | number | 60000 | Per-tool-call timeout. / 单次工具调用超时。 |
autoActivate | boolean | false | Connect at startup instead of on demand. / 启动即连接(退回常驻模式)。 |
releaseOnTurnEnd | boolean | true | Disconnect when the turn ends and no session is using the server. / 轮次结束且无会话使用时自动断开。 |