dsh-session-bridge-mcp
Drive DeepSeek Harness sessions from an MCP client over stdio.
List sessions with id, title, preset, working directory, and running/idle state.
Open a session in a given working directory, reusing an idle matching session or creating a new one.
Send messages to a session in queue or steer mode and receive an
afterSeqmarker.Wait for a session to finish a turn after
afterSeq, with a timeout up to 600 seconds.Read caller prompts and assistant text after
afterSeq, excluding tool calls and thinking.Cancel the currently running turn while leaving queued messages queued.
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-session-bridge-mcp Open a DSH session in my repo and ask it to fix the failing test."
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-session-bridge ♡
Let your MCP client talk to DeepSeek Harness sessions~
@stellarie/dsh-session-bridge (≧∀≦)
Unofficial. This project has no tie to DeepSeek. It targets DeepSeek Harness
0.2.1-rc.3. It also runs on0.2.1-rc.2.
What is this?
DeepSeek Harness (DSH) is a desktop agent app. This package lets another agent drive it.
You get two small parts:
A host plugin. It runs inside the DSH app. It serves a token-guarded loopback HTTP bridge.
A stdio MCP server. Your MCP client (Claude Code, for example) starts it. It talks to the bridge.
Your client opens a normal DSH session, sends it messages, waits for the reply, and reads it. The session shows in the app like any other session. You can watch it, or take it over, any time ♡
Related MCP server: dsh-acp-mcp-bridge
Requirements
DeepSeek Harness
0.2.1-rc.3or0.2.1-rc.2, with a profile you can edit.Node.js
^22.19.0or>=24.0.0.An MCP client that speaks stdio.
Install
1. Install the plugin
Use the dsh CLI. Replace default with the name of your profile.
dsh plugin --profile default add @stellarie/dsh-session-bridgeOr install straight from GitHub. The install builds the package on your machine, so the profile must allow build scripts:
dsh plugin --profile default add github:stellarie/dsh-session-bridgeOr edit the profile by hand. Add the package to the profile package.json. Then list it in the bundles, after @deepseek-ai/dsh-web-app.
{
"dependencies": {
"@stellarie/dsh-session-bridge": "^0.1.0"
},
"dsh": {
"profile": {
"bundles": [
"@deepseek-ai/dsh-base",
"@deepseek-ai/dsh-web-app",
"@stellarie/dsh-session-bridge"
]
}
}
}The package ships a cordis.patch.yml. It inserts the plugin row for you. Restart the app.
The log shows session-bridge: serving http://127.0.0.1:…/session-bridge.
2. Register the MCP server
Point your MCP client at the copy inside the profile (<profile-dir> is your DSH profile directory):
claude mcp add dsh-session-bridge -- node <profile-dir>/node_modules/@stellarie/dsh-session-bridge/lib/mcp.jsOr run it from npm, with no profile install:
claude mcp add dsh-session-bridge -- npx -y -p @stellarie/dsh-session-bridge dsh-session-bridge-mcpAny other MCP client works too. The command is dsh-session-bridge-mcp. The transport is stdio.
The MCP server reads the endpoint file on every call. An app restart needs no MCP restart.
Tools
Tool | What it does |
| List sessions: id, title, preset, working directory, running or idle. |
| Open a session in the Workspace of |
| Send a message. Mode |
| Wait until the session ends a turn after |
| Read your prompts and the assistant text after |
| Interrupt the running turn. Queued messages stay queued. |
A typical round trip:
dsh_open_session { cwd: "C:/repo", preset: "my-preset" } → { sessionId, reused, workspaceId, effort }
dsh_send { sessionId, text: "Fix the failing test" } → { accepted, afterSeq: 41 }
dsh_wait { sessionId, afterSeq: 41 } → { ended: true, lastSeq: 58 }
dsh_read { sessionId, afterSeq: 41 } → { messages: [ … ] }
dsh_open_sessiondefaultspresettoyuu, the author's own preset. Pass your own preset id. See BACKLOG 1.
A new session sets its effort through the app's model selection. The app also saves that effort as its default for every session. See BACKLOG 5.
How the bridge stays safe (`ω´)ゞ
The bridge gives full owner control of your sessions. Read this part, please.
Every request must pass these checks, in this order:
No
Originheader. Browser pages always send one, so they are refused.A loopback
Host(127.0.0.1,localhost, or[::1]) with the server port.A bearer token, compared in constant time.
POSTonly, with a JSON body of at most 1 MiB.A method on the allowlist. Session methods:
create,prompt,page,projections,list,cancel,selectModel,modelCatalog. Workspace method:create.
The token is 32 random bytes. The plugin mints a new one at each start.
It writes endpoint.json (url, token, pid, startedAt) with mode 0600 (POSIX) and deletes it on shutdown.
Treat the endpoint file as a secret. Anyone who reads it can prompt your agents.
The bridge listens only where the DSH web server listens. It adds no port of its own.
The bridge speaks as the app owner. A prompt you send acts like a prompt you type in the app.
dsh_open_sessioncreates a Workspace forcwdwhen none exists, and it saves the new session's effort as the app default.
Configuration
Setting | Where | Default |
| plugin config in |
|
| environment of the MCP server | unset |
| environment |
|
Set the same path on both sides when you move the file.
Develop
pnpm install
pnpm run typecheck
pnpm test
pnpm run buildThe build writes lib/index.js (the plugin) and lib/mcp.js (the MCP server).
License
MIT © stellarie. Made with ♡ (๑˃ᴗ˂)ﻭ
Available Tools
6 toolsdsh_cancelA
Interrupt the running turn of a Session. Queued messages stay queued.
Inputs: sessionId (required).
dsh_list_sessionsA
List Sessions of the running DeepSeek Harness app: id, title, agent preset, working directory, and whether a turn runs.
Inputs: no named parameters.
dsh_open_sessionA
Open a Session in the running app. By default it reuses the newest idle Session with the same preset and cwd. Set reuse to false for a new Session.
Inputs: cwd (required), reuse, preset.
dsh_readA
Read caller prompts and assistant text messages of a Session with seq greater than afterSeq. Messages the app injects, tool calls, and thinking are not included.
Inputs: afterSeq (required), sessionId (required), maxMessages.
dsh_sendA
Send a user message to a Session. Returns afterSeq: pass it to dsh_wait and dsh_read to see only the new work.
Inputs: text (required), sessionId (required), mode.
dsh_waitB
Wait until the Session ends a turn after afterSeq, or until the timeout.
Inputs: afterSeq (required), sessionId (required), timeoutSec.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 6 tools
Each tool has a clearly distinct purpose: listing, opening, sending to, waiting on, reading from, and cancelling a session. The send/wait/read trio is a coordinated workflow but each step is unambiguous and descriptions clarify the afterSeq handoff.
All tools share a consistent dsh_ prefix and use a verb-first style (list_sessions, open_session, send, wait, read, cancel). The only minor deviation is that send/wait/read/cancel omit the noun, but the pattern is still predictable.
Six tools is well-scoped for a session bridge, covering the full interaction loop without redundancy. Every tool earns its place.
The surface covers listing, opening/reusing, messaging, waiting, reading, and interrupting sessions—a complete interaction lifecycle. Minor gaps like explicitly closing/deleting a session exist but agents can work around them via open with reuse=false.
Maintenance
Related MCP Connectors
Start and manage Reason cloud coding agents, projects and sessions from any MCP client.
Use a person's computer after they approve it there: files, Terminal, browser, local MCP.
Use a person's computer after they approve it there: files, Terminal, browser, local MCP.
- aXDeprecatedio.github.ax-platform
Agent-native collaboration network: orchestrate a team of long-running agents from any MCP client.
Related MCP Servers
- AlicenseNot gradedqualityBmaintenanceAn experimental MCP gateway for controlling durable DeepSeek Harness agent sessions from MCP clients, enabling session creation, observation, steering, and resumption across chat sessions.5MIT
- AlicenseNot gradedqualityCmaintenanceBridges DeepSeek Harness ACP services to MCP stdio hosts like Codex, enabling session management, model selection, background tasks, cancellation, and subagent observation.MIT
- AlicenseNot gradedqualityBmaintenanceEnables any MCP client to operate DeepSeek Harness sessions, execute tasks, and manage workspaces through an MCP server running inside the dsh process.730 npm1MIT
- AlicenseNot gradedqualityCmaintenanceEnables permission-scoped MCP clients to interact with DeepSeek Harness Desktop over a local loopback HTTP bridge, including checking status, listing models/workspaces/sessions, reading bounded session history, and creating, sending, waiting for, or canceling chats. Access is restricted per bearer token and only exposes the tools and sessions granted to that token.MIT