Preface¶
DeepSeek Harness (DSH) comes with a complete agent runtime: tools, LLM, sessions, and presets. However, it is a Cordis application, meaning external agents cannot directly invoke its capabilities.
If you are already using an MCP client like Hermes for orchestration but want to delegate specific coding tasks to the Harness for execution, you need a bridge. The dsh-harness-mcp-server introduced below is designed for this purpose: it launches an MCP service within the Harness process, exposing core services like ctx.agents, ctx.agentPresets, and ctx.tools, allowing an external “brain” to drive the Harness’s “arms” to perform real coding tasks.
What is This¶
dsh-harness-mcp-server is maintained by community contributor chushixixin, published as the npm package @chushixixin/dsh-harness-mcp-server (current version 0.1.10), under the MIT license. The project is categorized under “Workflow” in the SkillHub directory.
One-line positioning: It exposes the agent capabilities of DeepSeek Harness as an MCP service, allowing any MCP client (e.g., Hermes) to call the Harness via HTTP to execute coding tasks.
The architectural relationship is as follows:
Hermes (MCP client, brain)
│ agent_run / task_inbox (HTTP)
▼
dsh-harness-mcp-server (MCP server, :8090)
│ ctx.agents.create → mount 'standard' preset
▼
Harness agent (flash) — full toolset: bash, fs, todo, web…
Core Features¶
The plugin starts a StreamableHTTP MCP service inside the Harness, listening on 127.0.0.1:8090 by default. It exposes the following tools externally:
| Tool | Direction | Purpose |
|---|---|---|
echo |
— | Verify MCP connectivity |
harness_list_tools |
— | List the tool names registered in the Harness |
agent_run |
Client → Harness | Synchronously run a task and return structured results |
task_inbox |
Client → Harness | Push a structured task (task + memory context + cwd) into an asynchronous queue |
task_result |
Client ← Harness | Poll for the structured result of a queued task |
The structured result returned by each task includes fields such as session ID, assistant text, tool call records, change descriptions, verification methods, and leftover issues. This allows the client to write context into the task and persist changes / verification / leftovers into memory, forming a closed loop.
{
"sessionId": "...",
"assistantText": "final answer",
"toolCalls": [{ "name": "bash", "args": "..." }],
"toolResults": ["command output"],
"changes": "what was changed",
"verification": "how it was verified",
"leftovers": "open issues"
}
Other key behaviors:
- It reuses agent sessions based on
cwd, avoiding reloading the project context on each invocation (the README claims this saves about 15–20x overhead compared to a one-offdsh headless). - Bash runs in a
workspace-writesandbox; the host machine must havebubblewrapinstalled, otherwise write operations will be refused. - Each new MCP session corresponds to a separate
McpServerand transport.
Installation and Activation¶
Method 1: Install from npm (Recommended)¶
Install the package within the Harness workspace:
npm install @chushixixin/dsh-harness-mcp-server
Then reference the plugin within the Harness workspace (see the cordis.yml patch below).
Method 2: Install from Source¶
Place the repository in the packages/mcp/harness-mcp-server/ directory of the Harness workspace (pnpm workspace matches packages/*/*, requiring two levels of directories):
cd /path/to/deepseek-harness
mkdir -p packages/mcp/harness-mcp-server
# After copying the repository files to this directory:
corepack pnpm install
Register the plugin in tsconfig.host.json references and tsconfig.base.json paths (refer to the Harness plugin documentation), then build:
corepack pnpm exec tsc -b packages/mcp/harness-mcp-server
corepack pnpm run build:lib:host
cordis.yml Patch¶
- insert:
- id: harness-mcp-server
name: '@chushixixin/dsh-harness-mcp-server'
config:
http: true
port: 8090
host: 127.0.0.1 # Default: localhost only; add authentication before exposing
# authToken: 'your-secret-token' # Optional: Bearer token authentication
# workspaceRoots: ['/workspace'] # Optional: whitelist for cwd
Starting the Harness¶
Set the API key and start with the patch:
export DEEPSEEK_API_KEY=...
corepack pnpm dsh web --patch ./packages/mcp/harness-mcp-server/cordis.yml
The MCP service listens on http://127.0.0.1:8090/mcp. Point any MCP client to this address.
Typical Usage¶
Registering the MCP Endpoint in Hermes¶
printf 'n\nY\n' | hermes mcp add harness_plugin --url http://127.0.0.1:8090/mcp
Once registered, Hermes can dispatch coding tasks synchronously via agent_run, or use task_inbox / task_result for an asynchronous queue.
Connectivity Check¶
First call echo to confirm the MCP link is working, then use harness_list_tools to view the available tools on the Harness side, and finally submit specific tasks via agent_run.
Use Cases and Considerations¶
Who is this for?
- Those already using MCP clients like Hermes for task orchestration who need to delegate specific coding execution to the Harness.
- Those needing context isolation: tasks like large refactoring, if placed in the main client, might overwhelm the context and can be handled by the Harness in an isolated session.
- Those needing to execute multiple unrelated coding tasks in parallel.
Positioning Advice
The README suggests using it as a backup tool rather than the daily workhorse: for daily code changes, still drive the main agent directly; only use this plugin when context isolation or parallel execution is needed.
Security and Permissions
- It binds to
127.0.0.1by default. This service exposes unauthenticated remote code execution capabilities. Never bind it to0.0.0.0or expose it to the public Internet/LAN unless you have configured authentication, TLS, and a reverse proxy. - The plugin runs with the permissions of the current
dshprocess; you should inspect the source code and MIT license yourself before installation.
Conclusion¶
dsh-harness-mcp-server “flips” the Harness from a Cordis application into an execution layer callable by external MCP clients, fitting the “brain + arms” collaboration model of Hermes + Harness. For more details, see the SkillHub directory page and the GitHub repository.