Preface

dsh-mcp-toggle is a DeepSeek Harness plugin developed by Zenjibad. It addresses a common pain point: enabling or disabling MCP servers in DSH usually requires modifying configuration files and restarting. The plugin adds a page named “MCP Servers” to DSH settings, allowing users to toggle connection status in real time directly in the interface and persist the configuration.

Features

Add a Settings Page

The plugin registers a page named mcp-toggle in DSH settings (order 70). The page is additive, listing all configured @deepseek-ai/dsh-mcp-client servers, with an independent toggle for each row.

Real-Time Toggle

Toggling the switch calls the Cordis Loader’s Entry.update({disabled}) API, immediately stopping or starting the MCP connection fiber and unregistering or registering mcp__* tools in real time, without restarting the DSH process.

Persistent Storage

Each change is appended to the $DSH_HOME/cordis.patch.yml file (home patch layer). This layer has higher priority than the configuration file, so the changes remain effective after DSH restarts.

Status Overview

The page displays the server name, enabled/disabled label, and connection phase (Connected / Stopped / Connecting / Connection failed), making the status clear at a glance.

Safety Protections

The plugin locks certain entries: the loader’s include entries, the plugin itself, and non-MCP entries cannot be modified. Operating on an unknown ID returns 404, while operating on a protected entry returns 403.

Theme Adaptation

The interface uses --dsw-alias-* design tokens and automatically adapts to light and dark themes.

Installation and Enablement

Installation Command

Install the plugin using the following command:

dsh plugin --profile web add github:Zenjibad/dsh-mcp-toggle

Reload Page

After installing or updating the plugin, you must restart DSH and perform a hard refresh in the browser page (Ctrl+F5). Hot Module Replacement (HMR) only replaces loaded bundles and does not automatically fetch new bundles.

Usage

Access Settings

After installation, find the “MCP Servers” page in DSH settings.

Toggle Servers

Click the toggle for the corresponding server in the list to enable or disable it. The operation takes effect immediately, and a toast appears below the interface.

Notes

System Requirements

It requires a DSH version with the Web Profile installed (DSH ≥ 0.1) and at least one @deepseek-ai/dsh-mcp-client record in the configuration. If no server is configured, the page displays “No MCP servers are configured”.

Behavior

The plugin has no configuration file; its behavior is defined by constants in the source code. The system distinguishes unknown IDs (returning 404) from protected entries (returning 403).

Source and Documentation

The plugin is open source, licensed under MIT.
- GitHub: https://github.com/Zenjibad/dsh-mcp-toggle
- Catalog Page: https://www.skillhub.cn/plugins/Zenjibad/dsh-mcp-toggle