dsh-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-mcp Ask DSH to fix the failing tests in this repo and show me the result"
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 MCP for Codex
Let Codex hand tasks to the DeepSeek Harness (DSH) agent already installed on your machine, and read the answer back.
Zero dependencies — the MCP server uses only Node built-ins
No install assumptions — discovers DSH Desktop (including custom install dirs, via the Windows uninstall registry) or a
dshCLI on PATHNo re-implementation — DSH keeps its own model route, tools, skills, and sandbox; Codex keeps its own conversation
Continuable — replay the returned
sessionthroughdsh_continue
Codex ──(MCP)── dsh-mcp ──(stdio)── dsh --profile headless ── DSH agentInstall
# A. Codex plugin marketplace
codex plugin marketplace add lcs331/dsh-codex-bridge
codex plugin add dsh@dsh-codex-bridge
# B. from source
git clone https://github.com/lcs331/dsh-codex-bridge.git
codex mcp add dsh -- node /abs/path/dsh-codex-bridge/bin/dsh-mcp.mjsThe npm package is not published yet. After it is published, a one-line npx installation can be added here.
Related MCP server: DSH Subagent MCP
Credentials (the usual snag)
The headless profile disables DSH's credential store, so a headless run never reads the keys saved by the Desktop UI. It looks them up in this order:
the launch environment
<task cwd>/.env$DSH_HOME/.env
Recommended: pass the key through the environment that launches Codex. For example, set it in PowerShell and start Codex from that same shell:
$env:DEEPSEEK_API_KEY = "sk-..."
codexSetting the variable in another shell after Codex is already running will not update its environment. Do not copy secrets out of DSH Desktop credential files. The MCP server passes only runtime essentials, DSH_HOME, and the configured model credential variables to the DSH child process; it does not pass the full Codex environment.
No key yet? Create one at https://platform.deepseek.com (API Keys) and provide it through the launch environment, or point OPENCODE_GO_API_KEY at a third-party route and set DSH_MCP_PATCH to the overlay that registers that provider. The same overlay is applied to headless tasks and ACP session continuations.
DSH also reads <task cwd>/.env and $DSH_HOME/.env; those files store keys in plain text. Prefer the launch environment to avoid creating another plaintext copy.
One-off, nothing on disk: $env:DEEPSEEK_API_KEY = "sk-..." before launching Codex.
Run dsh_doctor first on a new machine; it reports the discovered installation and whether a credential is reachable.
Tools
Tool | Purpose |
| List project folders registered in DSH and their workspace ids |
| List session ids and saved titles in one selected DSH workspace |
| One self-contained task, fresh DSH session, returns the final answer |
| Continue a DSH session; for an open Desktop session it waits for the completion report |
| Read a pending or completed report from an open DSH Desktop session |
| Report the discovered installation and credential status |
Call dsh_list_workspaces to select a DSH project folder. Pass its workspace_id to dsh_task; the registered folder becomes the working directory. To continue, call dsh_list_sessions with that workspace_id, then pass both the same workspace_id and a listed session_id to dsh_continue. New tasks use DSH's headless profile. For an open Desktop conversation, the optional DSH-side companion in desktop-host/ routes the message through the live Agent as a user message, so it appears in the existing DSH UI without competing for ACP's session write lock. Install it from DSH Desktop → Settings → Plugins by adding the local bundle directory <path-to-this-repo>/desktop-host, then restart DSH to load it. The Electron app exclusively manages the desktop profile, so the dsh plugin --profile desktop add ... CLI command is rejected. The bridge binds only to loopback and uses a random local bearer token stored under $DSH_HOME/plugins/dsh-codex-bridge/; the token is never returned by an MCP tool. In auto mode, dsh_continue uses only the Desktop companion and never falls back to ACP. If the companion or target session is unavailable, it stops without competing for a possible UI write lock. Set transport: "acp" explicitly only after closing the session in DSH Desktop, or use transport: "desktop" to require visible delivery. ACP keeps the saved permission and directory settings; permission requests are rejected because MCP has no interactive approval UI. Session listings include ids, saved titles, and archive state; they read only the title projection and do not return conversation contents. Existing direct cwd calls remain supported.
For an open Desktop session, dsh_continue waits for the matching DSH completion event and returns the assistant report in Codex. If the wait limit expires, use dsh_get_result with the returned request_id. Reports stay in the local DSH companion process for up to 30 minutes and are capped at 64 KiB. The bridge associates a report after it sees the exact submitted user message ID and content; when DSH omits the ID, it accepts an exact-content echo. Duplicate echoes of the same message are ignored. A distinct user message before completion still marks the result ambiguous instead of guessing.
dsh_task arguments: task (required), workspace_id, cwd, permission_mode (read-only | workspace-write | danger-full-access | auto | plan), add_dirs, timeout_sec, session_id.
DSH cannot see the Codex conversation, so every task must restate its goal, constraints, target directory, and the evidence you want back.
Safety
permission_modedefaults toworkspace-write: edits stay insidecwdnew headless tasks use approval policy
never(headless has no approval UI;askwould block forever). ACP continuations preserve the saved DSH session permissions, but permission requests are rejected because MCP has no interactive approval UI.the Desktop companion can only route to a live DSH agent; the MCP result confirms acceptance, while DSH's generated reply appears in the DSH UI
a timed-out run is killed and already-written files are not rolled back
raw DSH stderr is omitted from tool results by default; set
DSH_MCP_DEBUGto include truncated diagnostics on failure
Compatibility
Node ≥ 20 (tested on 24)
Verified on Windows 11 + DSH Desktop 2.0.24-next (
@deepseek-ai/dsh0.2.2-rc.5) + Codex CLI 0.172.0macOS/Linux discovery is implemented but untested
Development
node --test # run the test suite
node scripts/build-plugin.mjs # regenerate both vendored plugin bundles before publishingLicense
MIT
Available Tools
6 toolsdsh_continueA
Continue an existing DSH session with another instruction. The session keeps its conversation, working directory, and file changes from earlier calls. Default transport "auto" sends only through the DSH Desktop companion, so the message appears in the UI. If the companion or target session is unavailable, it stops without trying ACP. Set transport to "acp" only when you know the session is closed in DSH Desktop; set "desktop" to require visible delivery. Desktop reports can be read with dsh_get_result if the wait limit expires. Resume requires the same working directory the session recorded. Select a project session with dsh_list_sessions and pass the matching workspace_id and session_id. ACP permission requests are rejected because this tool has no interactive approval UI; saved permissions remain in effect.
Inputs: task (required), session_id (required), cwd, add_dirs, +4 more.
dsh_doctorA
Diagnose the local DeepSeek Harness installation used by this MCP server: which dsh entry was found, the DSH home, and whether a model credential is reachable. Call it when a delegation fails or before the first delegation on a new machine.
Inputs: no named parameters.
dsh_get_resultA
Read the latest status and completion report for a request sent to an open DSH Desktop session. Use the request_id returned by dsh_continue when its polling period expires. Results are stored locally and expire after 30 minutes.
Inputs: request_id (required).
dsh_list_sessionsA
List session ids and saved titles registered under one DSH workspace. This returns title metadata only, never conversation contents. Use the selected session_id together with the same workspace_id in dsh_continue.
Inputs: workspace_id (required).
dsh_list_workspacesA
List the project workspaces registered by DSH, including each workspace id, folder path, and session count. Use a returned workspace_id with dsh_task to start work in that folder or with dsh_list_sessions to choose a session.
Inputs: no named parameters.
dsh_taskA
Delegate one task to the DeepSeek Harness (DSH) agent installed on this machine and return its final answer. DSH runs as a separate coding agent with its own tools, model route, workspace, and sandbox; this call blocks until it finishes. Use it to offload research, a scoped implementation, a test run, or a second opinion, and to reach tools or skills that exist only in DSH. Each call opens a fresh DSH session unless session_id is supplied; call dsh_continue to keep working in the same session. Call dsh_list_workspaces first to choose a registered project folder.
Inputs: task (required), cwd, add_dirs, session_id, +3 more.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 6 tools
Most tools have clearly distinct roles: listing workspaces, listing sessions, delegating, continuing, reading results, and diagnosing. The main overlap is dsh_task versus dsh_continue, since dsh_task can accept a session_id while dsh_continue is the dedicated continuation tool; descriptions clarify the intended split, but the boundary is not perfectly sharp.
All names share the dsh_ prefix and snake_case, which aids recognition. However, the set is not consistently verb_noun: dsh_task and dsh_doctor are noun-like, while dsh_continue is verb-only, so the pattern is mixed but still readable.
Six tools is well-scoped for a DSH integration. Each tool covers a distinct lifecycle step: workspace discovery, session discovery, delegation, continuation, result retrieval, and diagnostics.
Core delegation lifecycle is covered: discovering workspaces and sessions, submitting tasks, continuing sessions, retrieving results, and diagnosing the installation. Minor gaps exist around cancellation, session cleanup, or explicit task-status listing, but agents can work around them.
Maintenance
Related MCP Connectors
Use your Mac, Windows or Linux computer from ChatGPT, Claude or Codex: files, commands, documents.
Read a project's prompts, logs and agents, and send new work to the agent on your own machines.
See, deploy and debug your existing DeployVera projects from coding agents.
Use your own Windows, Mac or Linux computer from ChatGPT, Claude, Cursor or Gemini CLI: run commands, read, write and search files, run long processes. Your computer only makes an outgoing connection (no open ports or VPN). Read-only mode, allowed folders, blocked commands and an action log keep you in control. Free plan available.
Related MCP Servers
- AlicenseAqualityCmaintenanceEnables Codex and Claude Code to delegate implementation, research, debugging, and long-log work to DeepSeek Harness, then observe, continue, or cancel those sessions without leaving the primary workflow.155MIT
- AlicenseNot gradedqualityBmaintenanceEnables Codex to delegate coding tasks to a persistent DeepSeek Harness agent that can read repositories, edit files, and run tests, while letting users follow up, monitor progress, and interrupt the work.66 npm5MIT
- AlicenseNot gradedqualityCmaintenanceEnables Codex to delegate tasks to DeepSeek Harness through A2A/ACP, with reusable conversation contexts and a local dashboard for task status.1MIT
- AlicenseNot gradedqualityBmaintenanceEnables Codex Desktop or CLI to delegate tasks to an already running DeepSeek Harness Desktop over an authenticated local socket, reusing that Desktop's model configuration, Skills and allowed tools without a separate API key or runtime. Each delegated session runs in its own isolated directory or Git worktree so Codex can review results before integration.2MIT