dsh-mcp-connect: Managing MCP Servers in the DSH Web Settings Page

Introduction

The common way to connect MCP (Model Context Protocol) servers to DeepSeek Harness is by modifying cordis.patch.yml or hand-writing YAML. Often, you have to restart the Harness after saving to see if the tools are mounted. When connections fail, the reasons are scattered throughout the logs, and batch-migrating configurations from Claude Desktop or Cursor is cumbersome.

dsh-mcp-connect consolidates the addition, editing, testing, importing, and runtime connection of MCP servers into the “MCP Servers” section of the Web Settings page. Saving implies connecting; there is no need to manually edit YAML or restart dsh web just to change a single MCP configuration.

What is this

dsh-mcp-connect is released by community maintainer BigNewbie under the MIT license (consistent in both the README and package.json). The plugin provides an MCP management UI within the DeepSeek Harness web interface and mounts saved servers as tools at runtime, named in the format mcp__<serverName>__<tool>, available for all sessions to call.

Prerequisites: DeepSeek Harness >= 0.2.0, using the Web interface (dsh web). The engines.dsh field in package.json specifies >=0.2.0-rc.2 <0.3.0-0.

Core Features

The capabilities listed below follow the README and are available under Settings → MCP Servers after installation.

Settings Page Management UI

“MCP Servers” is an independent section; cards display real-time status, tool counts, and failure reasons. It supports enable/disable, edit, and delete (deletion requires secondary confirmation). MCP entries already present in the config file are listed as read-only cards to facilitate migration from YAML.

Two Transport Types

  • streamable-http: URL + Headers.
  • stdio: Command + Args + Env + CWD.

The README notes: sse transport is not supported (consistent with the official MCP client, supporting only stdio and streamable HTTP).

Test Before Saving

The “Test Connection” button in the form performs a real connection attempt and lists the server-side tools. You can save only after confirming everything is correct; you can also test without saving first.

JSON Batch Import

Compatible with common formats from Claude Desktop / Cursor: bare objects, objects wrapped in mcpServers, or arrays; returns added/updated/failure reasons for each entry. type can be http, streamable-http, or stdio; if omitted, it is inferred based on the presence of url or command. enabled: false or disabled: true indicates save-only without connecting.

Environment Variables and ${VAR}

Placeholders are expanded from ~/.dsh/.env during connection; non-empty variables with the same name in the process environment take precedence. The registry only stores the original placeholder text; to swap tokens, simply modify .env. String fields such as url, headers, env, args, command, and cwd support ${VAR} syntax; missing variables will trigger a clear error. The settings page top displays the .env path and variable count (names only, values do not leave the Host).

Runtime and YAML Coexistence

Save, disable, and delete take effect immediately; disabling disconnects and unregisters tools. Editing supports in-place hot updates, but serverName cannot be changed (renaming requires deletion and recreation). Additionally, it includes an mcp_servers tool, allowing the model to add, delete, test, and import servers using the same operations.

Status Meanings

Status Meaning
Connected · N tools mcp__<name>__* is callable in sessions
Connecting… Handshaking or reconnecting
Connection Failed Initial connection failed; card shows reason (including missing env var names)
Disabled No connection, no tool registration

Known Limitations (README)

Only bridges MCP tools (consistent with the official dsh-mcp-client); Resources / Prompts are not exposed to the model. Only one instance per serverName is allowed. Initial connection failures do not trigger infinite auto-retries; you need to modify the config and save or click “Reload”. Importing does not automatically rewrite plaintext keys into ${VAR}.

Installation & Activation

Sidebar Plugins → Install → Paste:

github:BigNewbie/dsh-mcp-connect

After installation, refresh the page and open Settings → MCP Servers. The package includes dsh.bundle.patch and is automatically mounted as a bundle during installation, requiring no manual YAML edits.

Method 2: Let Agent Install

plugin_manager install_bundle  target=github:BigNewbie/dsh-mcp-connect

Method 3: CLI + Manual Mounting

dsh plugin --profile web add github:BigNewbie/dsh-mcp-connect

The CLI only adds the package to the profile; it does not automatically select the bundle. You need to append the following to the end of ~/.dsh/profiles/web/cordis.patch.yml:

- insert:
    - id: mcp-connect
      name: dsh-mcp-connect

Then restart dsh web.

Uninstallation

plugin_manager remove_bundle  target=dsh-mcp-connect

Or disable/remove it on the plugin page. ~/.dsh/mcp-servers.json will not be deleted.

Typical Usage

Add Server

Open Settings → MCP Servers, select the transport type, and fill in the form. serverName allows only letters, numbers, _, and -, max 32 characters, and serves as the tool name prefix. You can click “Test Connection” first before saving.

JSON Import Example

Paste into “Import JSON”:

{
  "notes": {
    "type": "http",
    "url": "http://127.0.0.1:3000/mcp",
    "headers": { "Authorization": "Bearer ${NOTES_TOKEN}" }
  },
  "github": {
    "type": "stdio",
    "command": "npx",
    "args": ["-y", "@modelcontextprotocol/server-github"],
    "env": { "GITHUB_TOKEN": "${GITHUB_TOKEN}" }
  }
}

Configure the corresponding variables in ~/.dsh/.env, for example:

# comment
NOTES_TOKEN=your_token
SEARCH_API_KEY="Quote values with spaces or #"

After modifying .env, click “Reload” to apply the new values.

Config File Location

Server definitions are saved in ~/.dsh/mcp-servers.json (shared across all profiles) and maintained by the plugin; manual editing is generally unnecessary, but if edited, you must click “Reload”. Example structure for a single entry (excerpt from README):

{
  "version": 1,
  "servers": [
    {
      "serverName": "notes",
      "transport": "streamable-http",
      "enabled": true,
      "toolCallTimeoutMs": 60000,
      "url": "http://127.0.0.1:3000/mcp",
      "headers": { "Authorization": "Bearer ${NOTES_TOKEN}" }
    }
  ]
}

Use Cases & Notes

Who it is for: Developers who frequently switch or debug MCP in DSH Web, need to batch import configs from Cursor / Claude Desktop, or want to manage secrets via .env without writing tokens into JSON.

Permissions & Security: The plugin runs with the permissions of the current dsh web process; being able to add stdio servers is equivalent to being able to execute arbitrary commands on the local machine. The README warns against exposing dsh web to the public internet; risk is relatively controllable when listening only on loopback addresses by default. Management interfaces use the same-origin /mcp-connect/api/*, reusing DSH’s Host/Origin and login state; unauthenticated requests return 401. It is recommended to read the repository source code and the MIT license before installation to ensure compliance with your deployment strategy.

The DeepSeek Harness ecosystem emphasizes “Everything is a Plugin”; the community directory site has no official affiliation with DeepSeek / High-Flyer. This plugin comes from a community repository and is not a built-in item in the official app store.

Conclusion

dsh-mcp-connect extracts MCP configuration and connection from the YAML and restart loop into the Web settings page: test before save, JSON import, runtime mounting, and read-only comparison with existing YAML. It is suitable for daily MCP maintenance in Harness 0.2.x Web scenarios.

  • Directory Page: https://www.skillhub.cn/plugins/BigNewbie/dsh-mcp-connect
  • GitHub: https://github.com/BigNewbie/dsh-mcp-connect
羽毛球分组比赛记分
小程序二维码

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

Xiaoye