dsh-cli-mcp
Click on "Deploy Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@dsh-cli-mcp refactor the auth module in /home/user/myapp to use async/await"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
dsh-cli-mcp
MCP server that delegates coding tasks to your locally installed
DeepSeek Harness CLI (dsh,
npm package @deepseek-ai/dsh).
It wraps the real dsh binary instead of bundling its own copy of the agent,
so every call inherits your DeepSeek login, models and config.
This is a minimal first scaffold. The wrapped CLI is invoked one-shot via
dsh --print "<prompt>". Sessions, ACP transport, mid-run control, and the
dsh web UI integration are out of scope for v0.1.0 and will land in later
releases.
Sibling of mcode-mcp, qwen-cli-mcp, kimi-cli-mcp, pi-cli-mcp and grok-code-mcp — same architecture, same principles, DeepSeek Harness behind the wheel.
Install
npx -y dsh-cli-mcp # no install
npm install -g dsh-cli-mcp # or globalRequires Node >= 22 and a working dsh on PATH
(npm i -g @deepseek-ai/dsh or pnpm add -g @deepseek-ai/dsh).
To point the adapter at a non-PATH binary without changing global PATH:
export DSH_MCP_BIN=/path/to/dshRelated MCP server: chat2dsh
Use with Claude Code / Cursor
claude mcp add-json dsh -s user '{
"type": "stdio",
"command": "npx",
"args": ["-y", "dsh-cli-mcp"],
"timeout": 3600000
}'Any other MCP client:
{
"mcpServers": {
"dsh": { "command": "npx", "args": ["-y", "dsh-cli-mcp"] }
}
}Keep the server name short (dsh): it becomes part of the tool names your
model sees.
Available tools
Tool | Purpose |
| Run a prompt through DeepSeek Harness. Returns the final answer plus the exit code, wall time, and the last 4 KB of stderr. |
dsh
Argument | Notes |
| Required. The task for the DeepSeek Harness agent. Self-contained — |
| Optional absolute path. Defaults to the server's cwd. |
| Optional integer, default 300 000 (5 min), max 1 800 000 (30 min). Wall-clock cap on the run. |
dsh({
prompt: "Reply with exactly: hello from dsh",
cwd: "/abs/path/to/repo",
timeout_ms: 120000,
})The server spawns dsh --print "<prompt>" as a child process, waits for it
to finish, and returns one text block containing the prompt echo, the trimmed
stdout, the tail of stderr, the exit code, and the elapsed wall-clock time.
A non-zero exit code is reported as a tool error (isError: true) — the
adapter does not invent success where dsh itself returned failure.
Development
git clone https://github.com/minmax/dsh-cli-mcp.git
cd dsh-cli-mcp
pnpm install
pnpm run build
pnpm run lint
pnpm testpnpm run test:live exercises the real dsh binary end-to-end
(DSH_CLI_MCP_LIVE=1 opt-in). The default unit suite runs without dsh and
exercises the adapter's stdio JSON-RPC loop directly.
License
MIT. See LICENSE.
Available Tools
1 tooldshADestructive
Run a prompt through your locally installed DeepSeek Harness CLI (dsh --print). Blocks until dsh settles, then returns the captured stdout, the last 4 KB of stderr, the exit code, and the wall-clock time. dsh cannot see this conversation, so the prompt must be self-contained: file paths, goal, constraints, expected output format.
Inputs: prompt (required), cwd, timeout_ms.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 1 tool
Only one tool exists, so there is no possibility of confusion or overlap. The tool's purpose is clear and distinct by definition.
With a single tool named 'dsh', the name is concise and directly tied to the underlying CLI. While there is no pattern to evaluate, the naming is consistent with the server's purpose and poses no ambiguity.
A single tool is thin for most MCP servers, but here it serves a narrow, specific purpose (running a single CLI command). It feels borderline—appropriate for a minimal wrapper but could benefit from additional tools for managing or inspecting dsh state.
For its stated purpose of executing a prompt through dsh, the tool covers the essential functionality. Minor gaps exist, such as lacking support for listing available prompts or managing dsh configuration, but agents can work around these by crafting self-contained prompts.
Related MCP Connectors
A paid remote MCP for OpenAI Codex agent coordination MCP, built to return verdicts, receipts, usage
A paid remote MCP for OpenAI Codex harness MCP, built to return verdicts, receipts, usage logs, and
Shared memory MCP server for Claude Code, Codex, Gemini CLI and Cursor. Cited, editable.
Connect ChatGPT and Claude to your Mac, Windows or Linux with secure MCP remote access.
Related MCP Servers
- AlicenseNot gradedqualityBmaintenanceEnables Codex to hand off coding tasks to a locally running DeepSeek Harness Desktop Host over MCP, reusing the Host's configured model and runtime and returning a session ID for status checks, incremental event streaming, waiting, and cancellation.MIT
- AlicenseNot gradedqualityCmaintenanceEnables any MCP client to hand self-contained coding tasks to a local DeepSeek Harness instance, which executes them by reading and editing files and running commands within whitelisted directories. Exposes a health check and a blocking task-runner over stdio or authenticated HTTP, returning stdout, stderr, exit code, and duration.MIT
- AlicenseNot gradedqualityBmaintenanceEnables Codex to delegate scoped tasks to a local DeepSeek Harness over MCP — dispatching read-only reviews or authorized workspace writes, steering and monitoring runs to a terminal state, and returning structured evidence such as changed paths, test results, and assistant text. It also supports exact archival of the terminal session by full session ID.1MIT
- AlicenseAqualityBmaintenanceHand tasks from Claude Code, Codex or any MCP client to a local DeepSeek Harness, watch the run live, and get the result back when it is done.8103,410 npm213MIT