dsh-mcp-tools: Manage MCP Servers and Per-Tool Switches in DSH Settings

Introduction

Integrating MCP into DeepSeek Harness (DSH) often involves modifying configuration files or manually writing mcpServers JSON. This mixes remote URLs, stdio commands, and request headers/keys together; a single change usually requires a restart or reload. Furthermore, once an MCP server is connected, often all its tools enter the model’s tool schema. Unused definitions still occupy context and can be triggered accidentally. The community plugin dsh-mcp-tools (maintained by hxlog) centralizes this into Settings → MCP: add servers, test connectivity, fill in request headers like Postman, and enable or disable tools at a granular level. Below is an introduction to what it is, what it does, and how to install and get started.

What is this

dsh-mcp-tools is a DSH plugin published on npm (current package version 1.0.2, MIT License), positioned as a “simple, elegant MCP tool manager.” The README describes it as Cursor-style global MCP control: freely add, deactivate, and delete MCP interfaces and tools, suitable for MCP testing, on-demand requests, and context expansion scenarios.

The plugin is split into Host and Client: The Host reuses the DSH native MCP client via a cordis bundle patch; the Client adds a section “MCP” (id: mcp, order: 18) in Settings, using a classic script without requiring a build step. State is saved in the local ~/.dsh/dsh-mcp-tools/state.json, written atomically, and monitors external modifications for hot application.

Directory Page: SkillHub Plugin Page. Source Code & Documentation: GitHub hxlog/dsh-mcp-tools.

Core Features

Server Management

Supports two transport methods:

  1. streamable-http: Fill in URL and request headers (key-value pair lines, not a full JSON text box).
  2. stdio: Fill in command, arguments, environment variables, and working directory.

You can also paste {"mcpServers": { ... }} directly to import multiple servers at once. Toggling off a server disconnects the connection and unregisters all its tools but does not delete the configuration; it supports one-click copying of the server’s mcpServers snippet.

Request Headers & Keys

Keys for remote MCP are filled in as Postman-style key-value pairs: a default line x-mcp-key is included; values are masked by default but can be displayed line-by-line; duplicate names will trigger an inline error on the interface. The README security note indicates: request headers are saved in plaintext in the local state file, located only on the local machine; do not commit to repositories or sync to public locations; it is recommended to use separate, least-privilege keys for each MCP server.

Per-tool Control

Each MCP tool appears as a chip on the interface. Clicking to disable means the tool is not registered with the model—it neither occupies context nor can it be called accidentally; this differs from “registering then erroring during call,” as disabling takes effect at the registration stage. The list supports search, select all, invert selection, and disable all; hovering allows viewing the full tool description.

Connectivity Testing & Event Logs

“Test Connection” creates a temporary connection: initialize → tools/list → close, reporting time consumed, protocol version, and tool count, without affecting currently running servers. The “Recent Events” interface logs connections, reloads, tests, and failures.

Consistent with DSH Native Experience

The interface follows DSH’s --dsw-* design tokens, flat rows, and 32px input boxes, adapting to light/dark modes and Chinese/English languages. Except for the MCP servers you configure, the plugin makes no additional network requests, and the README states there is no telemetry.

Installation & Activation

Environment Requirements:

  • DeepSeek Harness 0.2.x (dsh web or DSH Desktop)
  • Node.js ≥ 22.13

Note: This is a DSH plugin, not a regular application dependency; npm i dsh-mcp-tools only downloads the package, but it still needs to be installed into the DSH profile at runtime. After upgrading the package version, you need to restart dsh web or DSH Desktop.

Install via Plugin Page (Recommended by README)

  1. Open DSH Web (or DSH Desktop) → Sidebar Plugins (Desktop is under Settings → Plugins).
  2. Click Install, enter dsh-mcp-tools, and confirm.
  3. Enable the new bundle, refresh the page, and open Settings → MCP.

Install via Command Line

dsh plugin --profile web add dsh-mcp-tools      # Web
dsh plugin --profile desktop add dsh-mcp-tools  # Desktop

If the MCP section does not appear in Settings, it is likely that the bundle is not enabled: confirm on the plugin page and refresh, or restart dsh web if necessary.

Typical Usage

Following the installation steps above, you can operate according to the README “Quick Start”:

  1. Go to Settings → MCP → Add Server: For remote servers, fill in the URL and paste keys into the request header lines (default x-mcp-key).
  2. Click Test Connection, and after seeing something like “Connected · 95 tools · 478 ms”, save and turn on the server switch.
  3. In the session, ask the model to call tools; DSH registers tools as mcp__<server>__<tool>. Simply disable unused tools in the list—the fewer tools enabled, the smaller the tool schema in every request.

For local stdio servers, fill in the command, arguments, environment variables, and working directory in the same form; you can also paste a full block of mcpServers JSON for batch import.

If the connection test fails, the README suggests checking: the URL, whether the server uses streamable-http (rather than standard SSE), whether request header names match the server side, and network or proxy issues.

Brief Working Principle

DeepSeek Harness Web (dsh web)
├── Host Plugin (lib/)          ← cordis bundle patch, reuses native MCP client
│   ├── manager.js             Connection, tool registration, enable/disable
│   ├── store.js               ~/.dsh/dsh-mcp-tools/state.json
│   └── routes.js              /mcp-tools/api/*
└── Client Bundle (client/client.js)
    └── Settings Section "MCP"

The Host side provides REST interfaces, such as: GET /mcp-tools/api/state, POST /servers/{test,save,delete,toggle,refresh}, POST /tools/{toggle,bulk}, POST /import, POST /reload, GET /logs (see repository docs/API.md for details).

Deleting state.json resets it to an empty configuration, and it will be automatically rebuilt on the next startup.

Scenarios & Notes

Who is it for

  • People who frequently switch or experiment with multiple MCP servers in DSH and prefer a GUI over repeatedly modifying JSON.
  • People connected to MCP with many tools who only want to expose a small number of tools to the model to control schema size.
  • People who need to perform local MCP connectivity verification and view recent connection events.

Notes before installation

The plugin runs with the current DSH process permissions, reads/writes the local ~/.dsh/dsh-mcp-tools/state.json, and connects to the MCP endpoints you configure. Before installation, you should read the source code and MIT License of the GitHub repository to ensure keys and server addresses comply with your security policy. Community directories like SkillHub are independent sites and have no official affiliation with DeepSeek / High-Flyer; the plugin is published by community maintainer hxlog and is not a built-in DSH component.

Conclusion

dsh-mcp-tools centralizes the addition, testing, toggling, and per-tool enable/disable of MCP servers into DSH Settings, emphasizing that “disabled tools do not enter the model’s tool list,” making it suitable for MCP integration and context slimming within the Harness. For further information, visit the SkillHub Directory Page and GitHub: hxlog/dsh-mcp-tools.

羽毛球分组比赛记分
小程序二维码

欢迎使用《羽毛球分组比赛记分》微信小程序

Xiaoye