dsh-ops-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-ops-mcprun a task to analyze the codebase and report findings"
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.
English |
DSH Carrot on a Stick
A DSH plugin that exposes DSH operations through the MCP protocol。
MCP features
Tools
Tool | Purpose |
| dsh crash course for the agent — concepts, recipes, error recovery. Call this first |
| connectivity check |
| plugin status: version, listening, uptime, queue counters, connected clients |
| list the host's global tool registry |
| registered workspaces and their sessions |
| routable providers / models / reasoning efforts, and the current default |
| run a task now, get a structured result back; |
| mid-run guidance to a running agent — |
| queue a background task, get a |
| fetch a queued task's result ( |
| queue overview: queued / running / finished |
| cancel a queued (immediate) or running task ( |
| known sessions (live + persisted), newest first |
| recent turns of a session; |
| switch an existing session's model, history preserved |
| attach a session to the workspace of its cwd |
| rename a session |
Resources
Resource-capable clients can read the same data without spending tokens, and subscribe to changes instead of polling:
URI | Content |
| deployment status |
| dsh usage guide (markdown) |
| host global tool registry |
| model catalog |
| legal |
| workspace registry |
| session list / metadata |
| conversation digest (paged) |
| raw event stream (JSONL, paged) |
| live turn window |
| queue / task detail incl. the full result |
| resident session pool |
resources/subscribe pushes task status transitions, turn-end history refreshes, and live activity over SSE — no polling. Setting resourceFirst: true in the config retires the nine read-only tools and returns results as resource references (for clients confirmed to support MCP resources; default false keeps tools and resources coexisting).
Related MCP server: hermes-dsh-bridge
Everyday patterns
One-off task — synchronous, structured summary back; continue later with sessionId (send only the delta in context):
{ "name": "agent_run", "arguments": { "task": "fix the failing test in src/auth", "cwd": "/workspace/app" } }Background queue — submit, poll cheaply, fetch once done:
{ "name": "task_inbox", "arguments": { "task": "…", "cwd": "/workspace/app" } }
{ "name": "task_result", "arguments": { "taskId": "…", "detail": "status" } }
{ "name": "task_cancel", "arguments": { "taskId": "…" } }
{ "name": "task_result", "arguments": { "taskId": "…" } }Sessions — session_list to find one, session_history to read it, select_model to switch its model, agent_steer to redirect it mid-run.
Models & presets
Priority: per-call arguments > plugin config > host default. A half-set pair completes from the lower source; unresolvable calls fail loudly.
Three ways to change models: per-call
provider+model·select_modelmid-conversation · pin via config withallowModelOverride: false. Presets (presetargument, for new sessions) work the same way underallowPresetOverride.Sessions are pooled per
cwd + model + preset: same directory, different model/preset → a separate session. Taking over a session keeps its model and preset.Continuing by
sessionIdruns in the session's own directory; an explicitly passedcwdmust match it.
Result size — detail controls token cost: summary (default, a few hundred tokens) / normal (~2k) / full (debugging); task_result adds a status level for polling. Results are structured (sessionId, model, changes, verification, leftovers, …); failures come back with isError: true.
Configuration (cordis.yml)
- insert:
- id: dsh-carrot-on-a-stick
name: 'dsh-carrot-on-a-stick'
config:
http: true
port: 8090
host: 127.0.0.1 # localhost only by default; add auth before exposing
# authToken: 'your-secret-token'
# workspaceRoots: ['/workspace'] # cwd whitelist (also gates session surfaces)
# allowedHosts: ['my-box.lan'] # extra allowed Host header values
# preset: 'standard' # agent preset to mount
# model: '' # pair with provider; empty = follow host default
# provider: ''
# reasoningEffort: '' # empty = adapter default
# allowModelOverride: true # false = pin the model
# allowPresetOverride: true # false = pin the preset
# queuePersistPath: '.dsh/queue.json'
# queuePersistKey: 'passphrase' # encrypt the persistence file
# sessionTtlMs: 86400000Field | Default | Meaning |
|
| MCP server bind address; a listen failure fails plugin startup |
| — | Bearer token; enforced on every request when set |
| — | cwd whitelist — agents may only work inside listed directories; also limits which sessions can be taken over or read |
| — | extra allowed Host-header values (bind host and loopback always allowed) |
| follow host settings | default model for spawned agents; configure as a pair |
| adapter default | default reasoning effort (ids in |
|
| whether callers may override the model per call |
|
| whether callers may pick a preset for new sessions |
|
| agent preset to mount (per-call |
|
| default |
|
| resource-first mode: read-only tools retire, results come back as resource references |
|
| bulk-attach ungrouped sessions to workspaces at startup |
|
| queue capacity, result retention, session-pool size |
|
| auto-cancel an agent turn after this long |
|
| progress heartbeat interval |
| — (off) | persist the task queue; finished results survive restarts, queued tasks re-execute, running tasks are marked interrupted |
| — (plaintext + warning) | encrypts the persistence file; wrong passphrase / corrupt file → queue starts empty |
|
| idle MCP transport sessions are reaped after this ( |
Security
⚠️ This plugin exposes local code execution (equivalent to RCE). It binds 127.0.0.1 only. When enabling:
Set
authToken— protects against other local processes and DNS rebinding;Set
workspaceRoots— without it there is no directory boundary at all; with it, execution and session reads (list / history / steer / takeover) are both constrained;Never bind
0.0.0.0or expose to LAN/WAN without a reverse proxy + TLS + auth.
Built-in guards: Host- and Origin-header allowlists (DNS-rebinding guard), HTTP surface limited to /mcp, 401 answers with a Bearer challenge, idle transport sessions reaped after sessionTtlMs. Note that spawned sessions follow the host/preset approval policy — this plugin runs unattended, so ask-style policies may pop dialogs or fail closed; verify sensitive operations under your preset before deploying. If you enable queuePersistPath, task payloads are written to that file (plaintext unless queuePersistKey is set) — choose a location with appropriate permissions.
Web settings panel
The bundle adds a Settings → dsh-carrot-on-a-stick section to the dsh web UI: live status badge, the MCP endpoint (click to copy), start/stop buttons, connected client list, and queue counters.
Known limitations
Spawned sessions follow the host/preset approval policy —
ask-style policies may pop a dialog or fail closed in unattended use.select_modelrequires the web profile'ssessionController; headless deployments fall back to the model catalog plus per-call overrides.dsh_list_toolsonly lists the host-global registry; per-agent tool visibility needs a host-side API.Without
queuePersistPaththe queue lives in memory and is lost on restart.
Acknowledgements
Started as a copy of chushixixin/dsh-harness-mcp-server (MIT, thanks @chushixixin), now an independent project.
This server cannot be deployed
Maintenance
Related MCP Connectors
Hosted MCP server for task-first delegation to remote workstations and workers.
Remote MCP server exposing your Node Command fleet (files, shell, processes, browser) to AI hosts.
1Start and manage Reason cloud coding agents, projects and sessions from any MCP client.
1Remote MCP server exposing SMI Aware tools, resources, and skills over Streamable HTTP.
Related MCP Servers
- AlicenseAqualityBmaintenanceAn MCP bridge that exposes DeepSeek Harness (DSH) web UI's cordis RPC API as stdio tools, enabling any MCP client to manage workspaces, create/resume sessions, send messages, and fetch session stats.51MIT
- AlicenseNot gradedqualityAmaintenanceEnables external MCP clients to drive DeepSeek Harness agents for real coding tasks, providing tools for task execution and queueing, session management, sandboxed file access, preset switching, and usage statistics.454 npm6GPL 3.0
- AlicenseNot gradedqualityAmaintenanceEnables local workspace management and status checks through MCP tools over an HTTP endpoint, allowing DeepSeek Harness to interact with the platform.MIT
- FlicenseAqualityCmaintenanceEnables MCP clients like Codex CLI and Claude Code to delegate tasks to a local DeepSeek Harness (dsh), with native Web transport for visible progress, model selection, and persistent long-running jobs, plus an ACP-compatible transport.6-