Introduction

When using MCP servers in DSH, if connections are only statically configured, adding or removing servers, as well as starting, stopping, or reconnecting, usually requires modifying the configuration and restarting. dsh-mcp-manager provides runtime MCP server management capabilities for DSH. It handles adding, removing, starting, stopping, and reconnecting within the plugin and persists the server registry to a local JSON file.

Below is an introduction to its features, installation methods, typical usage, and important considerations.

What is it

dsh-mcp-manager is a DeepSeek Harness (DSH) plugin bundle used to provide runtime MCP server management capabilities for dsh.

It supports two transport methods:

stdio
streamable-http

Bridging tools follow the following naming convention:

mcp__<serverName>__<rawName>

This is consistent with @deepseek-ai/dsh-mcp-client.

The license is MIT. package.json declares the following engines requirements:

node >=20

Core Features

Runtime Management

The plugin supports adding, removing, starting, stopping, and reconnecting MCP servers during runtime.

The server registry uses a persistent JSON file with the default path:

$DSH_HOME/mcp-manage/servers.json

It will automatically reconnect after a restart.

Agent Tools

The plugin provides six agent tools:

mcp_manage_list
mcp_manage_add
mcp_manage_remove
mcp_manage_set_enabled
mcp_manage_reload
mcp_manage_tools

These tools are used to perform management operations on MCP servers within a session.

Web UI

The Web UI provides:

Settings → MCP Servers

The page allows visually adding, editing, starting, stopping, reconnecting, and deleting servers, as well as viewing status, errors, and tool lists.

Runtime Details

  • env, headers, and url support ${VAR} expansion.
  • The registry file uses atomic writes.
  • It reconnects with exponential backoff after a disconnection.
  • It listens for MCP tools/list_changed to perform a hot sync of the tool list.
  • The stdio subprocess environment removes credential-like variables and all DSH_* variables before merging explicit env.

Installation and Enabling

The installation command is as follows:

dsh plugin --profile <name> add github:HenC49/dsh-mcp-manager

After installation, restart the profile (e.g., dsh web, etc.) for it to take effect. The HMR (Hot Module Replacement) for the current production Web profile is disabled by default; you need to restart the host after adding or updating a plugin package.

Uninstall command:

dsh plugin --profile <name> remove dsh-mcp-manager

Note that uninstalling will not delete:

$DSH_HOME/mcp-manage/servers.json

which may contain sensitive information such as env/headers. If this configuration is no longer needed, manually delete it when cleaning up thoroughly:

$DSH_HOME/mcp-manage/

Typical Usage

Adding a Server in a Session

You can describe the requirement directly in the session:

帮我添加一个 filesystem MCP 服务器,命令 npx -y @modelcontextprotocol/server-filesystem /Users/me/project

The model will call mcp_manage_add to add the server.

Maintenance in Web UI

Enter the Web UI at:

设置 → MCP 服务器

You can add, edit, start, stop, reconnect, or delete servers, and view connection status, error messages, and registered tools.

Manual Registry Editing

Manually edit:

$DSH_HOME/mcp-manage/servers.json

Changes will take effect after the next host restart or mcp_manage_reload. This registry file does not have file watching.

Running Tests

pnpm install
pnpm test

Use Cases and Notes

dsh-mcp-manager is suitable for scenarios where MCP servers need to be maintained in a session or Web UI, and minimizing configuration changes and restarts is desired. It is also suitable for DSH deployments that wish to maintain consistency with the @deepseek-ai/dsh-mcp-client tool naming.

It is important to clarify before use: this plugin runs within the current dsh host process. Before installation, you should check the source code and license to ensure its permission model meets local security requirements.

Specific notes:

  • mcp_manage_add allows the agent to spawn arbitrary commands in the host process, at the same permission level as the bash tool. If tighter restrictions are needed in the deployment, it is recommended to enable approval via permission presets.
  • ${VAR} expansion reads environment variables from the dsh host process. Do not pass through the names of host-sensitive credential variables to untrusted MCP servers.
  • Currently, only tools are bridged. MCP resources and prompts are deferred, just like in dsh-mcp-client.
  • Reachability errors for HTTP transport are exposed per request and do not trigger a stdio-style process guardian restart.
  • The configuration page currently reads the list once when opened and refreshes after a successful operation; it does not actively subscribe to real-time changes from other browser tabs.

Links

Repository address:

https://github.com/HenC49/dsh-mcp-manager