Introduction¶
DeepSeek Harness (dsh) natively provides a session center, models and presets, and workspace management in its Web UI. If you want to “remotely” create, submit tasks, and poll for results from Claude Code, Cursor, Cline, or a self-built Agent, the common approach is to wrap another layer of shell or scripts — but session state often diverges from what you see in the UI.
Below is a workflow-type dsh plugin maintained by Leawind: DSH Rice on a Stick (package name dsh-rice-on-a-stick). It starts an MCP service inside the local dsh process, exposing the session controller, model catalog, workspaces, and real-time activity to any MCP client. The same capabilities are also registered as native rice_ tools within this instance, facilitating bootstrap orchestration for dsh’s own sessions.
What Is This¶
The plugin connects to MCP clients via Streamable HTTP (default http://127.0.0.1:8090/mcp). Requests enter the same dsh host as the UI via the sessionController, rather than a simple shell wrapper.
The architectural relationship can be summarized as:
Claude Code / Cursor / Cline / your agent
│ Streamable HTTP · 127.0.0.1:8090/mcp
▼
dsh-rice-on-a-stick
│ sessionController · agents · tools · workspaces
▼
dsh host — the same sessions the UI shows
- Maintainer: Leawind
- License: MIT
- Required dsh version:
>= 0.2.1-rc.2(engines.dsh) - Current plugin version (package.json):
0.1.0-rc.1 - Node:
>= 18
Full tool and resource definitions are in the repo’s src/mcp/tools/ and src/mcp/resources.ts. Agents are advised to call dsh_get_started first; it includes a dsh crash course, recipes, and error recovery instructions.
Core Features¶
Real Sessions and Async Orchestration¶
Tools go through the host session controller, supporting create, prompt, queue, fork, archive, model switching, and more. Long-running tasks use the session_submit / session_poll / session_result pattern: a client timeout only ends the wait — it does not interrupt the dsh-side turn. To stop execution, use session_cancel.
New sessions must explicitly pass provider, model, preset (from model_list); the plugin does not auto-fill defaults. When resuming with an existing sessionId, the session’s model and preset are reused.
Approvals¶
Provides approval_list / approval_answer / approval_policy. The config option approvalControl determines who answers approvals on sessions created or resumed by this plugin:
| Value | Meaning |
|---|---|
exclusive (default) |
Only the MCP caller answers; the UI no longer shows the request |
fallback |
UI takes priority; if the UI cannot answer, the caller handles it |
off |
Display only; no answering |
Bootstrapping and Deployment Forms¶
The same MCP tool surface is registered as native rice_ tools within this dsh instance. Setting http: false allows a “bootstrap-only, no external HTTP” deployment.
Default “Tools-first”¶
Binds to 127.0.0.1 by default, with optional Bearer auth, Host/Origin allowlists, and idle transport session reclamation. resourceFirst defaults to false, so tools-only clients need no changes. Resource-first mode must be explicitly enabled.
Environment and Prerequisites¶
- A web/desktop profile is required for the settings panel and full session capabilities; minimal/headless profiles can still run the MCP service.
- MCP clients that only support stdio must provide their own Streamable HTTP bridge.
- The package is not published to npm; install it via
linkfrom the built local directory (see next section).
Installation and Activation¶
The official README process is as follows: clone the repo, install dependencies, build, then install via link into the web profile.
git clone https://github.com/Leawind/dsh-rice-on-a-stick.git
cd dsh-rice-on-a-stick
npm install
npm run build
dsh plugin --profile web add link:"$(pwd)"
After completion, restart dsh web and check the service status in Settings → MCP Service. To uninstall:
dsh plugin --profile web remove dsh-rice-on-a-stick
Connecting MCP Clients¶
Default endpoint: http://127.0.0.1:8090/mcp. Auth is disabled when no token is configured; when enabled, obtain the token from Settings → MCP Service and send it as Bearer:
{
"mcpServers": {
"dsh": {
"type": "http",
"url": "http://127.0.0.1:8090/mcp",
"headers": { "Authorization": "Bearer <token>" }
}
}
}
Typical call sequence examples (tool names and argument fields match the README):
{ "name": "model_list", "arguments": {} }
{ "name": "session_create", "arguments": { "cwd": "/path/to/project", "provider": "…", "model": "…", "preset": "standard" } }
{ "name": "session_submit", "arguments": { "sessionId": "…", "task": "…" } }
{ "name": "session_poll", "arguments": { "sessionIds": ["…"], "waitMs": 20000 } }
{ "name": "session_result", "arguments": { "sessionId": "…", "requestId": "…" } }
Configuration Essentials¶
Fields and defaults are sourced solely from src/core/config.ts; the settings panel covers all configuration items. Structural fields (listen address and port, external MCP toggle, resource-first, approval responder and wait limit, transport idle TTL, Host allowlist, etc.) are written and the plugin auto-reloads on blur or when the settings dialog is closed. There is no Apply button; invalid values report errors inline and are not written.
Common defaults:
resourceFirst: false(tools-first)approvalControl: exclusivesessionTtlMs: 604800000(one week)
In the profile’s cordis.patch.yml, you can override transport and more:
- id: dsh-rice-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'
Use Cases and Caveats¶
Who it’s for: Already using dsh for local/agent workflows and wanting to drive sessions “from the same source as the UI” uniformly via MCP, or wanting to self-orchestrate with rice_ tools within the same dsh instance.
Security (must read): The plugin exposes local code execution capabilities. It only listens on 127.0.0.1 by default, but without an authToken configured, any local process that can reach the port can drive dsh. Set an authToken; do not bind to 0.0.0.0 or expose to LAN/public before putting a reverse proxy, TLS, and auth in place. There is no directory whitelist for session cwd; callers can specify any path. Native rice_ tools bypass HTTP/auth and are callable from all sessions in this instance; if not needed, disable the corresponding registration toggle.
Before installing: The plugin runs with the current dsh process privileges; review the source code and MIT license before installing. The project evolved from a fork of chushixixin/dsh-harness-mcp-server and is now an independent repository.
The DeepSeek Harness ecosystem emphasizes “everything is a plugin”; the community directory site has no official affiliation with DeepSeek / High-Flyer, and this article serves only as a description of a third-party plugin.
Conclusion¶
After the steps above, you can create, submit, and poll real dsh sessions from an MCP client, keeping them aligned with UI-side state. For complex orchestration, start with dsh_get_started and the repo’s docs/architecture.zh.md.
- Community directory page: https://www.skillhub.cn/plugins/Leawind/dsh-carrot-on-a-stick
- Source code and README: https://github.com/Leawind/dsh-rice-on-a-stick