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

  1. 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.

  2. 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”.

  3. Enable/Disable Control
    Each server has a toggle that controls the disabled flag in the loader line. DSH’s configuration hot-reloading mechanism takes effect immediately without restarting the process.

  4. Configuration Editing and Deletion
    Supports modifying server parameters or deleting entries. During editing, fields not displayed in the form (such as reconnect and toolCallTimeoutMs) are preserved. Deletion also removes any resulting empty insert patch entries in the file.

  5. Add New Server
    Adds a new entry to the main configuration file and automatically completes a self-descriptive header comment.

  6. Configuration Validation
    Follows the configuration contract of @deepseek-ai/dsh-mcp-client. Validation rules include:

    • Uniqueness of id and serverName
    • command is required for stdio transport
    • url is required for streamable-http transport
    • Naming convention matching. If validation fails, the write is rejected and a Chinese prompt is returned.
  7. Security Mechanisms

    • All write operations are allowed only via local loopback access.
    • A .bak backup file is retained before each write.
    • YAML documents are modified using a temporary file plus atomic commit approach, ensuring that untouched comments and !!js expressions are preserved as-is.
  8. 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

  1. Install the plugin and restart DSH.
  2. Open the browser and go to the “MCP Servers” tab on the DSH settings page.
  3. Click the “Restart DSH” button to confirm applying the changes (if you modified the configuration).
  4. 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 the dev_build_plugin -> dev_install_package injector 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.

References