Introduction¶
When configuring MCP servers in DeepSeek Harness and writing them line by line in cordis.patch.yml, temporarily disabling a server means either deleting the entire line or editing multiple places in the file. Frequently toggling is tedious and risks breaking the patch. This plugin lists the MCP loader lines already defined in your current profile as cards, each with a short description and a toggle switch. The switch only inserts or removes disabled: true on that line—every other byte stays untouched—combined with hot reload, changes take effect in about 2 seconds.
What It Is¶
This is a DeepSeek Harness plugin maintained by Echo-Li130, categorized under admin-security. After installation, an “MCP Connectors” entry appears in the left sidebar, positioned between “Plugins” and “Automation Tasks”; when collapsed into the icon bar, it shows a plug icon. The page reads all loader lines in the current profile patch where name: '@deepseek-ai/dsh-mcp-client' and the id starts with mcp-, and displays them as cards with descriptions. Each card shows the server name, line id, transport method, current tool count, and a toggle switch.
Core Features¶
- Toggle existing lines: Turning off inserts
disabled: trueon that line; turning on removes it. Before any modification, the original file is backed up ascordis.patch.yml.bak. Writes use a temp file + atomic rename, and rapid clicks are queued through a serial queue. - Hot reload takes effect: About 2 seconds after toggling, the server’s tools disappear from or reappear in the model’s tool list.
- Description configuration: Override this plugin’s line in the profile patch using the same id, with the key
serverName. Servers without a configured description show a generic note + current tool count. - Auto-discovery: The page re-reads and parses from disk on every request—no caching. It refreshes every 10 seconds while the page is visible, and once when the window returns to the foreground. A line only appears if all three conditions are met: it’s written in the same file
cordis.patch.yml, the id starts withmcp-, and it’s a loader line (name: '@deepseek-ai/dsh-mcp-client'). - Non-invasive: Does not add, edit, or delete servers; does not touch
mcp-manager’sconfig.serversmapping; does not display or read any credentials (env,headers); makes no network requests.
Installation & Enablement¶
Requires an existing DeepSeek Harness (verified on 0.2.2-rc.3, declared compatible with 0.2.x).
Method 1: Local directory
dsh plugin --profile <profile> add /path/to/dsh-mcp-toggles
You can also do this in the GUI: Plugins → Add plugin → select this directory.
Method 2: Install from a package
npm pack
dsh plugin --profile <profile> add ./dsh-mcp-toggles-1.1.0.tgz
After installation, refresh the page and “MCP Connectors” will appear in the left sidebar (between “Plugins” and “Automation Tasks”).
Typical Usage¶
- Open “MCP Connectors” in the left sidebar.
- The top of the page shows the file path it manages—confirm it’s the profile patch you intend to modify.
- Click any toggle; the page will indicate “takes effect in about 2 seconds.”
- After 2 seconds, in a new session’s tool list, that server’s tools should appear or disappear.
If the entry doesn’t appear in the sidebar, you can open it directly:
http://127.0.0.1:<DSH port>/mcp-toggles
This is an alternate page for the same endpoint, with identical functionality.
Security & Boundaries¶
- All three routes serve localhost only: the socket must be a loopback address, and the
Hostheader must be127.0.0.1/localhost/[::1]. - Backup to
.bakbefore writing; writes use temp file + atomic rename; rapid clicks are serialized through a queue. - Request body limit is 64 KiB; only
application/jsonis accepted; line ids must match^mcp-[\w-]+$. - Does not read
env; neither the page nor the API returns credentials. - To manually revert: delete that
disabled: trueline, or copy the.bakfile back over.
Compatibility & edge cases:
- Only meaningful in the Web / Desktop Harness (it depends on
webServer, the sidebarsidebar.panellist, and themainslot). - Group nodes (
name: cordis:group) do not appear in the list; if a line’sdisabledis a!!jsexpression, the toggle refuses to modify it and prompts for manual handling, rather than risking corrupting the file. - Line endings (CRLF / LF), UTF-8 BOM, and trailing newlines are all preserved as-is.
Use Cases¶
Suited for configuration scenarios where you need to frequently enable/disable MCP servers in DSH while keeping the rest of the patch file unchanged. The plugin runs with the current DSH process permissions; review the source code and license before installing.
Closing¶
This plugin achieves MCP server toggle management with a minimal scope of changes, keeping the profile patch byte-for-byte intact while providing an intuitive card-based interface. Directory: https://www.skillhub.cn/plugins/Echo-Li130/dsh-mcp-toggles; GitHub: https://github.com/Echo-Li130/dsh-mcp-toggles.