Introduction¶
Integrating MCP servers in DeepSeek Harness (DSH) typically uses a plugin architecture and requires editing configuration files (such as cordis.patch.yml). Manually maintaining these configuration lines is error-prone and makes it difficult to check service status in real time. The dsh-mcp-setting plugin adds an “MCP Servers” page to the DSH settings interface, allowing users to directly create, delete, update, and manage servers through the Web UI.
What Is This¶
This is a DeepSeek Harness client plugin maintained by belowthetree. It injects a settings page to provide direct management of the @deepseek-ai/dsh-mcp-client configuration lines in DSH configuration files. The plugin implements visual configuration editing and also integrates status monitoring and configuration validation.
Core Features¶
-
Server List and Overview
Displays all MCP servers from the main configuration file ($DSH_HOME/cordis.patch.yml) and those in each profile patch file, with source labels and endpoint summaries. -
Real-Time Connection Status
The page silently refreshes every 5 seconds and infers status through the loader fiber and the tool registry (mcp__<serverName>__*prefix). Displayed values include: Connected · tool count / Not connected / Failed to start / Loading. Note: During the backoff window for reconnecting after disconnection, the status may briefly display as “Connected”. -
Enable/Disable Control
Each server has a toggle that controls thedisabledflag in the loader line. DSH’s configuration hot-reloading mechanism takes effect immediately without restarting the process. -
Configuration Editing and Deletion
Supports modifying server parameters or deleting entries. During editing, fields not displayed in the form (such asreconnectandtoolCallTimeoutMs) are preserved. Deletion also removes any resulting emptyinsertpatch entries in the file. -
Add New Server
Adds a new entry to the main configuration file and automatically completes a self-descriptive header comment. -
Configuration Validation
Follows the configuration contract of@deepseek-ai/dsh-mcp-client. Validation rules include:- Uniqueness of
idandserverName commandis required for stdio transporturlis required for streamable-http transport- Naming convention matching. If validation fails, the write is rejected and a Chinese prompt is returned.
- Uniqueness of
-
Security Mechanisms
- All write operations are allowed only via local loopback access.
- A
.bakbackup file is retained before each write. - YAML documents are modified using a temporary file plus atomic commit approach, ensuring that untouched comments and
!!jsexpressions are preserved as-is.
-
Restart DSH
A “Restart DSH” button is provided at the top of the page (requires two clicks to confirm) to restart the DSH process and apply a full reload.
Installation and Activation¶
It is recommended to install it via npm to a specified DSH profile (for example, the web profile):
pnpm dsh plugin --profile web add dsh-mcp-setting
After installation, the DSH process automatically loads the plugin. In the browser, open Settings -> MCP Servers to see the new management interface.
To remove it:
pnpm dsh plugin --profile web remove dsh-mcp-setting
Typical Usage¶
- Install the plugin and restart DSH.
- Open the browser and go to the “MCP Servers” tab on the DSH settings page.
- Click the “Restart DSH” button to confirm applying the changes (if you modified the configuration).
- Observe the real-time connection status of servers in the list, and use the toggles to quickly enable or disable specific servers.
Technical Details and Notes¶
- Hot-Reload Effect: Enable/disable operations take effect immediately using DSH’s configuration hot-reloading. Add, delete, and update operations write to configuration files; it is recommended to use them together with the “Restart DSH” button.
- Development Environment: Developers can compile with
pnpm install && pnpm build, or use thedev_build_plugin -> dev_install_packageinjector production line for local development mounting. - Testing and Build: The project includes unit tests (
pnpm test), type checking (pnpm typecheck), and build scripts (pnpm build). - Environment Requirements: The Node.js version must be >= 20.