
Momojie-S/dsh-workspace-mcp
30Last commit Aug 14, 2026
dsh-workspace-mcp DSH plugin
This plugin reads a `.dsh/mcp.servers.yml` file from the project root and automatically connects MCP servers when an agent is created in that workspace. It supports stdio and streamable-http transports, automatic reconnection with exponential backoff, and hot-reloads the config file on save. MCP tools are registered in the agent scope and cleaned up when the agent is destroyed, ensuring no cross-project interference.
How to install the dsh-workspace-mcp DSH plugin
dsh plugin --profile web add github:Momojie-S/dsh-workspace-mcpCopying does not run this command. Review the repository and version before installing the dsh-workspace-mcp DSH plugin.
dsh-workspace-mcp DSH plugin data source
dsh-workspace-mcp DSH plugin snapshot date: Aug 16, 2026
discovered
What the dsh-workspace-mcp DSH plugin can do
- Auto-loads MCP servers from `.dsh/mcp.servers.yml` based on current workspace (session cwd)
- Supports both stdio and streamable-http transport types
- Automatic reconnection with exponential backoff and configurable attempts (per-server override)
- Hot-reloads configuration file using chokidar file watcher
- Registers MCP tools into agent scope; tools are automatically cleaned up when agent is destroyed
- Respects `toolListChanged` notification from MCP servers to re-sync tool list
Where the dsh-workspace-mcp DSH plugin fits
- Each project can define its own MCP servers without interfering with others
- Use project-specific MCP tools (e.g., database, API clients) in DSH agent sessions
- Develop or test MCP servers with automatic reconnection on failure
- Switch between projects seamlessly; MCP tools follow the workspace
- Debug MCP server connection issues with verbose logging
Who the dsh-workspace-mcp DSH plugin is for
- DSH users who manage multiple projects with different MCP server requirements
- Developers who want to keep MCP server configurations scoped to individual projects
dsh-workspace-mcp DSH plugin limitations
- Only verified with DSH 0.1.0-rc.6; other versions may not be compatible
- In headless 'create and immediately message' race scenarios, the first model request may not include the MCP tools (they are guaranteed by the second request)
- Requires a `.dsh/mcp.servers.yml` file in the project root; directories without this file load no MCP servers
- During reconnection, old tools remain registered but calls to them will fail until the server is restored
- Configuration fields must align with `@deepseek-ai/dsh-mcp-client` specification
dsh-workspace-mcp DSH plugin: from the repository README
Quoted from the Momojie-S/dsh-workspace-mcp README, the upstream source of the dsh-workspace-mcp DSH plugin. Copyright remains with the original authors.
DSH 插件:按 **workspace(session cwd)** 自动加载/卸载 MCP server——每个项目自己的 `.dsh/mcp.servers.yml` 只在自己的会话生效,MCP 工具注册到 agent scope,随 agent 生灭自动回收,不同项目的 MCP 互不干扰。 ## 环境要求 - DSH `0.1.0-rc.6`(已验证) ## 用法 项目根放 `.dsh/mcp.servers.yml`: ```yaml servers: my-server: transport: stdio command: npx args: ["-y", "some-mcp-server@latest"] env: {} remote: transport: streamable-http url: https://example.com/mcp headers: Authorization: "Bearer <token>" ``` 字段与 `@deepseek-ai/dsh-mcp-client` 对齐(`transport` / `command` / `args` / `env` / `url` / `headers` / `toolCallTimeoutMs` / `reconnect`)。 - agent 创建即连接注册(`agent/created`),**首个模型请求就含这些工具**;headless "create 后立刻发消息" 的竞速场景第 1 步可能没有,第 2 步必有 - **断线自动重连**(移植官方 dsh-mcp-client 的 supervisor):启动失败与中途断线均按指数退避重连并重新注册工具;重连期间旧工具保持注册(调用会失败),server 恢复后自动换新。stdio = 重新 spawn,http = 重新握手 - server 发 `toolListChanged` 通知时自动重同步工具列表 - 改配置文件由 chokidar 监听,保存即重载;无该文件的目录不加载任何 MCP ## 安装 本插件是**组合包**(`dsh.bundle`),用 `dsh plugin` 安装进 profile,自动追加配置层,无需手编 patch: ```bash # GitHub(私仓需 git 凭据;pnpm ≥10 首次 add 会提示授权构建,按提示把包键 # 写进 ~/.dsh/profiles/web/pnpm-workspace.yaml 的 allowBuilds 后重新 add) dsh plugin --profile web add github:Momojie-S/dsh-workspace-
Read the full READMERepository license: MIT
dsh-workspace-mcp DSH plugin questions
How do I install dsh-workspace-mcp?
You can install it via the DSH plugin command: `dsh plugin --profile web add github:Momojie-S/dsh-workspace-mcp`. Alternatively, use a tarball: `dsh plugin --profile web add momojie-s-dsh-workspace-mcp-0.2.0.tgz`. After installation, restart DSH and verify with `dsh web --dump-config | Select-String workspace-mcp`.
Where should I place the MCP configuration file?
Create a `.dsh/mcp.servers.yml` file in the root of your project. The plugin reads this file relative to the workspace's current working directory. If the file does not exist, no MCP servers are loaded for that workspace.
What transport types does this plugin support?
It supports two transport types: `stdio` (e.g., running a local MCP server via `npx`) and `streamable-http` (connecting to a remote HTTP endpoint). The configuration fields align with `@deepseek-ai/dsh-mcp-client` specification.
How does automatic reconnection work?
The plugin implements exponential backoff reconnection from the official dsh-mcp-client. Initial delay is 500ms, doubling each attempt up to a max of 30 seconds. If the server stays alive longer than `maxDelayMs`, the attempt budget resets. After 10 consecutive failures, the server's tools are unloaded. You can override these settings per server in the config file.
Why don't my MCP tools appear on the first agent request?
In headless scenarios where you create an agent and immediately send a message, the first model request may not include the MCP tools because the plugin connects on the `agent/created` event. The tools are guaranteed to be available by the second request. If you wait a moment after agent creation, the first request will also include them.