DSH Plugin Store
Back to home

why913

dshx

The missing companion CLI for DeepSeek Harness (dsh): manage MCP servers with dry-run checks, migrate from Claude Code / Codex in one command | dsh 的 MCP 管理与迁移工具

Stars
1
Language
JavaScript
Created
Aug 13, 2026
Updated
Aug 14, 2026
Tools
GitHub repo

Introduction

dshx

English | 中文

The missing companion CLI for DeepSeek Harness (dsh).

Manage MCP servers, skills, and agent memory with one command — dry-run connection checks before anything is written, secret-safe config output, and one-shot migration of your existing Claude Code / Codex setup (MCP servers, skills, and global memory). Ships with a SKILL.md so the dsh agent itself knows how to use it.

npm install -g @why913/dshx

dshx mcp add everything -- npx -y @modelcontextprotocol/server-everything
# 连接测试 everything … 通过(2133ms,发现 13 个工具: echo, get-env, …)
# 已写入 ~/.dsh/profiles/web/cordis.patch.yml(id: mcp-everything)

dshx mcp import --yes
# discovers every MCP server in ~/.claude.json, ./.mcp.json and
# ~/.codex/config.toml, connection-tests each one, writes the ones that work

Why

dsh's MCP client is solid (stdio + streamable-http, auto-reconnect, hot reload) — but the only way to configure it is hand-editing cordis.patch.yml. In our timed test, an experienced agent needed 6 min 24 s to add one server by hand (finding the file, learning the patch-layer semantics, dodging the []-placeholder YAML trap). Claude Code does the same job in one command. dshx closes that gap:

hand-editingdshx
Add one server~6 min, YAML trapsone command
Broken serverdiscovered at boot, silently mounts zero toolsrefused before writing (dry-run handshake + tools/list)
Secretspasted into YAML$VAR!!js process.env.VAR references
Migrating from Claude Code / Codexre-type everythingdshx mcp import --yes

Real-world import run on a machine with 12 servers across Claude Code and Codex configs: 10 migrated, 2 correctly rejected (one endpoint returning 403, one server crashing on startup) — before either could pollute the config.

Install

npm install -g @why913/dshx        # CLI

Optional — mount it as a dsh plugin too, so the agent gets mcp_add / mcp_list / mcp_remove / mcp_test / mcp_import as native tools:

dsh plugin --profile web add @why913/dshx

Recommended — install the skill so the agent reaches for dshx on its own:

# copy skills/dshx/ from this repo into your skills directory
cp -r skills/dshx ~/.dsh/skills/dshx

dsh hot-watches the skills directory; no restart needed. In our test, the agent picked the skill up live, ran dshx mcp list and dshx mcp test zotero itself, and finished the whole task in 16 seconds.

Commands

dshx mcp add <name> -- <command> [args...]     add a local stdio server
dshx mcp add --transport http <name> <url>     add a remote streamable-http server
dshx mcp list                                  list managed servers
dshx mcp rm <name>                             remove a server
dshx mcp test <name>                           dry-run handshake + tool listing
dshx mcp import [--yes]                        migrate servers from Claude Code / Codex

dshx skill list                                list skills with validity checks
dshx skill add <owner/repo[/subdir] | path>    install a SKILL.md package (source + commit recorded)
dshx skill rm <name>                           remove a dshx-installed skill
dshx skill update <name>                       re-fetch from the recorded source
dshx skill import [--yes]                      migrate skills from ~/.claude/skills

dshx memory import [--yes]                     migrate ~/.claude/CLAUDE.md + ~/.codex/AGENTS.md
                                               into $DSH_HOME/AGENTS.md (idempotent marker blocks)

Notes: the skills directory is hot-watched by dsh, so skill add/import take effect immediately. Project-level CLAUDE.md needs no migration — dsh reads it natively.

Shared flags:

FlagMeaning
--profile <name>target profile (default web)
--globalwrite to $DSH_HOME/cordis.patch.yml (all profiles)
--env KEY=$VARenv var for stdio servers; $VAR form is stored as a !!js process.env.VAR reference — no secret lands in the file
--header 'K: V'header for http servers (values support $VAR too)
--timeout <ms>connection-test timeout (default 30000)
--no-testskip the dry-run connection test
--forceoverwrite an existing server of the same name

Design guarantees

  • Dry-run before write. add and import perform a real MCP handshake plus tools/list; an unreachable server is refused, not written.
  • Idempotent. Re-adding an existing serverName fails loudly (--force to replace). rm only ever touches rows dshx manages.
  • Comment-preserving YAML edits. Your cordis.patch.yml comments survive every edit; removing the last server restores the pristine [] placeholder.
  • No secrets in files. $VAR-form env/header values are written as !!js process.env.VAR references, dsh's own idiom.
  • Never restarts anything. Changes apply on the next dsh reload; dshx tells you instead of killing your sessions.

As a dsh plugin

Mounted via dsh plugin --profile web add @why913/dshx, the agent gets five native tools (mcp_list, mcp_add, mcp_remove, mcp_test, mcp_import) with the same guarantees — so "connect me to the GitHub MCP server" is something the agent can just do, test included. Configure the target profile on the plugin row:

- id: dshx
  name: '@why913/dshx'
  config:
    profile: web

Roadmap

  • Skill/memory management as model-facing plugin tools (skill_add, memory_import, …)
  • OAuth-authenticated MCP servers (see dsh-mcp-manager for a Web-UI approach)

Compatibility

DeepSeek Harness is in developer preview and its internals change fast. dshx only touches documented surfaces (patch files and the @deepseek-ai/dsh-mcp-client config schema) and is tested against @deepseek-ai/dsh 0.1.0-rc.6. Node ≥ 22.19.

License

MIT