Preface¶
The core design philosophy of DeepSeek Harness (DSH) is “everything is a plugin”. Agents running in a local Harness environment are typically confined to internal execution and cannot be directly invoked by other external harnesses (such as Claude Code, Cursor, etc.). The DSH MCP Server plugin publishes an endpoint from the host running the Harness via the Model Context Protocol (MCP), allowing other agent harnesses to interact with DSH via Streamable HTTP or stdio protocols. It exposes DSH’s sessions, agents, and tools to external callers, enabling them to start sessions, drive conversation turns, read logs, and cancel tasks.
Plugin Metadata¶
- Name:
@local/dsh-mcp-server - Maintainer: baitouwuya
- License: MIT
- Type: Host-only bundle (zero-dependency, no DSH imports, no third-party modules)
Core Capabilities¶
This plugin provides a series of tools via the MCP protocol to control and manage DSH sessions. Supported communication methods are Streamable HTTP or stdio.
Session Control¶
- Start & Continue:
dsh_run_promptis used to start a new session and run a Prompt;dsh_continue_sessionis used to send a Prompt to an existing session and maintain context. - Query & Management:
dsh_list_sessionsis used to list session indices with pagination;dsh_read_sessionis used to read a session’s conversation history (user and assistant messages only);dsh_cancel_sessionis used to cancel the current active turn of a session. - Archiving:
dsh_archive_sessionanddsh_unarchive_sessionare used to archive or unarchive sessions.
Commands & Tools¶
- Execute Commands:
dsh_run_commandis used to run slash commands (e.g.,/compact) within a session;dsh_list_commandsis used to list slash commands available to the current session’s agent. - Tool Discovery:
dsh_list_toolsis used to list the tools exposed by DSH to its own agents, allowing for permission selection in delegation Prompts.
Status & Permissions¶
- Status Monitoring:
dsh_statusreturns endpoint, configuration, version, session count, active turn, and default permission preset information. - Identity Attribution:
dsh_whoamireturns the caller’s identity (based on Header or User-Agent) and the list of sessions they created. Note: This is an attribution mechanism, not strict authentication. - Permission Presets:
dsh_list_permission_presetsis used to list deployed permission presets. - Decision Waiting:
dsh_answer_requestis used to answer pending decisions (approvals or questions);dsh_list_requestsis used to list user decisions currently pending for a session;dsh_wait_sessionis used to block and wait for the session’s current turn to end.
Typical Usage¶
-
Start a New Session
Call thedsh_run_prompttool, passing in the Prompt text and parameters (such ascwd,model,permissionPreset) to start a new DSH conversation. -
Continue Existing Session
Usedsh_continue_session, passing in thesessionIdand subsequent Prompt to continue the conversation without losing context. -
List Running Sessions
Calldsh_list_sessionsto view the ID, title, and running status of all sessions. Use themine: trueparameter to filter sessions created by the current caller. -
Run Slash Commands
Usedsh_run_commandto execute commands within a session. For example, passing"/compact"will execute the command immediately without going through a model turn.
Notes & Dependencies¶
- Zero-Dependency: The plugin is a Host-only bundle containing no DSH imports or third-party modules. As long as the Harness service contract remains unchanged, this plugin can survive Harness upgrades.
- Attribution Mechanism: Callers identify themselves via Header or User-Agent, and the system records the session owner. This is an attribution mechanism, not strict authentication; callers share the endpoint Token.
- Functional Dependencies:
- Archiving: Requires the Host’s
workspaceRegistryservice (@deepseek-ai/dsh-workspace). Otherwise, archive tools will report the service as unavailable, and archive fields will not appear in lists. - Permission Presets: Requires the Host’s
permissionPresetsservice (@deepseek-ai/dsh-permission-presets). Otherwise, permission-related fields will be missing. - Commands: Requires the Host’s
commandsservice.
- Archiving: Requires the Host’s
- Installation: Specific installation commands are not provided in the official documentation; it is recommended to refer to the GitHub repository instructions for deployment.
Summary¶
The DSH MCP Server acts as a bridge between DeepSeek Harness and external Agent Harnesses. It allows external tools to fully control the lifecycle of DSH sessions while maintaining the advantages of the Harness’s native plugin architecture.