dsh-web-mcp
Click on "Install 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-web-mcpcreate a session in workspace 'demo' and send 'Hello world'"
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-web-mcp
๐ค AI-assisted project ยท A college student's learning project, with significant code generated by an LLM agent under human direction and review.
MCP bridge for DeepSeek Harness (DSH) web UI โ exposes the cordis RPC API over HTTP /api/<endpoint> as stdio MCP tools. Any MCP client (Codex CLI, Claude Desktop, etc.) can drive DSH sessions and benefit from prompt-prefix cache reuse.
๐ ไธญๆๆๆกฃ๏ผREADME.zh.md
What is in the box
Eight tools, all backed by DSH web's cordis RPC over HTTP /api/<endpoint>:
Tool | Purpose |
| Enumerate every workspace known to the running DSH web UI. |
| Adopt a directory (creating the workspace if missing), then create a session bound to it. Selects the model in one shot. Returns |
| Send a prompt and block until the assistant turn completes. Returns the assistant text plus per-turn token usage including |
| Wait for the in-flight turn to finish without sending a new prompt. Use it after answering a pending approval. |
| List still-pending approval requests ( |
| Answer one pending approval ( |
| Fetch cached projections: |
| Verify a session is still alive and surface its current model. Subsequent |
Related MCP server: workiq-mcp-bridge
Approval callback (ๆ้ๅฎกๆนๅ่ฐ)
DSH agents ask for permission before sensitive tool calls (e.g. a sandbox
escalation to danger-full-access). The request surfaces in the session log
as approval/asked and โ on the DSH web event stream โ as an answerable
approval/requested frame. This bridge turns that into a two-track callback:
Sampling callback (default, works with Hermes CN Desktop โฅ 0.18): while
dsh_send_message/dsh_wait_turnare waiting for the turn, the server sends the client asampling/createMessagerequest describing the tool and the DSH-provided reason; the client's answer (allowed-once/rejected) is posted back to DSH viaPOST /api/respondand the turn continues. Hermes supports this out of the box (samplingenabled by default; see its Native MCP docs). Sampling needs to run inside an MCP request, so it is only active on the real MCP transport.Tool fallback (works with any MCP client): set
auto_respond_approvals=falseondsh_send_message(or sampling fails / is unavailable), and the call returns immediately withawaitingApproval: true+pendingApprovalsinstead of waiting. The caller (or a human) then decides:dsh_send_message(...) -> {"awaitingApproval": true, "pendingApprovals": [...]} dsh_respond_approval(session_id, <approvalId>, "allowed-once") -> {"accepted": true} dsh_wait_turn(session_id, ...) -> normal turn resultdsh_list_pending_approvalslists whatever is still pending at any moment (the DSH event stream replays every unanswered approval on connect).
Wire facts (verified against DSH source and a live probe): the answer must
echo the rpcId of the approval/requested frame โ a fresh UUID minted by
the host's pending table, not the audit approvalId โ and the payload
must carry the matching approvalId. The event stream is a WebSocket
(GET /api/events.mux; plain HTTP gets 426), which is why the websockets
package is a hard dependency.
Requirements
Python 3.10+
A running
dsh webinstance onhttp://127.0.0.1:3080(override withDSH_BASE_URL)uv(recommended) orpipwebsockets(installed byuv sync; needed for the approval event stream)
Install
git clone https://github.com/cv588888888888888888888ju/dsh-web-mcp.git
cd dsh-web-mcp
uv syncThen run as a stdio MCP server:
uv run dsh-web-mcpWire up Hermes Agent
Register with hermes mcp add:
hermes mcp add dsh --command uv --args --directory C:\Users\chenty\Documents\feishu-bot\dsh-mcp run dsh-web-mcpโ ๏ธ Known pitfall (tested):
Do not pass
--env DSH_BASE_URL=...โ it gets forwarded todsh-web-mcp's argparse and fails withunrecognized arguments. SetDSH_BASE_URLas a user/system environment variable instead.A new session is required after registering (config loads at session start).
If prompted
Enable all 8 tools? [Y/n/select], answerY.
Wire up Codex CLI
Edit %USERPROFILE%\.codex\config.toml (or ~/.codex/config.toml on other OS):
[mcp_servers.dsh]
command = "uv"
args = ["--directory", "C:\\path\\to\\dsh-web-mcp", "run", "dsh-web-mcp"]
# Optional, defaults to http://127.0.0.1:3080 if omitted
[mcp_servers.dsh.env]
DSH_BASE_URL = "http://127.0.0.1:3080"Restart Codex CLI. The eight dsh_* tools appear alongside the built-in tools.
Probe
probe.py is a developer-side smoke test that exercises all tools end-to-end against the running DSH web UI โ including the approval chain (trigger a real approval, answer it with accepted: true, and wait for the turn to finish):
uv run python probe.pyIt prints a JSON blob per step; expected outcome is
{
"ok": true,
"step": "send_message",
"reply_contains": "TASK_OK",
"cacheReadTokens": 8192
}The approval steps report send_message_awaiting_approval, respond_approval
(accepted: true), and wait_turn_after_approval (reply_contains: "APPROVAL_OK").
Failure modes
DSH web not reachable โ the server starts but every tool returns
{"ok": false, "error": "DSH web not reachable at ..."}. Make suredsh webis running (dsh web --port 3080).DSH schema drift (rc.X โ rc.Y) โ unknown field errors come back as
{ok: false, error: "dsh returned <code>: <msg>"}. The model schema inmodels.pyis intentionallyextra="allow"so additional fields pass through; reported mis-parses should be filed againstmodels.py.Prompt timeout โ
dsh_send_messagetimes out aftertimeout_s(default 120s); rerun with a larger value if your prompt is long. An approval that nobody answers also holds the turn: usedsh_list_pending_approvals/dsh_respond_approval(or wait for the human in the DSH web UI) and thendsh_wait_turn.Sampling unavailable โ outside an MCP request (e.g.
probe.py) or with a client that does not implementsampling/createMessage,dsh_send_messagefalls back to returningawaitingApproval: truewithpendingApprovals; use the tool fallback above.
Configuration
Environment variables read by dsh-web-mcp:
Var | Default | Description |
|
| DSH web base URL. |
|
| Per-request timeout in seconds (generous; a single LLM turn may take ~30s). |
|
| Python |
CLI flags mirror the env vars: --base-url, --timeout, --check.
Why this exists
By default Codex CLI talks to the OpenAI / Azure providers directly. When MCP routing through DSH, the deepseek-v4-flash preset in DSH keeps system + tools + conversation prefix cached, so every subsequent turn in the same session reads 8K+ cached tokens and only pays uncached input for the new prompt + uncached output for the new reply โ measured per tokenUsage.cacheReadTokens in dsh_send_message results.
Background
This project was built as a learning exercise by an undergraduate student exploring agent tooling. The bulk of the code was generated by an LLM coding agent (Codex CLI + DeepSeek) under human direction; every line was reviewed and the behavior verified end-to-end before publication. Bugs are likely given the author's experience level โ please open issues.
Status
Pre-release. API surface follows DSH 0.1.0-rc.6 schema (rpc-map.d.ts); regenerate from source if you bump DSH.
License
Available Tools
5 toolsdsh_create_sessionA
Create a new DSH session bound to a directory; auto-creates the workspace if missing. Returns the sessionId for follow-up tool calls.
| Name | Required | Description | Default |
|---|---|---|---|
| model | No | Model id (defaults to deepseek-v4-flash). | deepseek-v4-flash |
| provider | No | Provider id (defaults to the bundled deepseek-official). | deepseek-official |
| workspace_path | No | Absolute directory path the session should be rooted at (e.g. C:\\Users\\chenty\\code). | |
| reasoning_effort | No | Optional reasoning effort id (off/high/max). |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
No annotations are provided, so the description carries the burden of behavioral disclosure. It does reveal a key side effect ('auto-creates the workspace if missing') and the return value (sessionId), but omits potential error conditions, permission requirements, or whether the operation is safe/idempotent beyond auto-creation.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is two sentences, front-loaded with the core action, and every word adds valueโno filler or redundant phrasing.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
For a tool with 0 required parameters and full schema coverage, the description explains the core behavior (auto-create workspace) and output (sessionId), linking it to follow-up calls. It lacks error-handling or prerequisite details, but the essentials for correct invocation are present.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
The input schema covers 100% of parameters with meaningful descriptions (model, provider, workspace_path, reasoning_effort). The description reinforces workspace_path's role with 'bound to a directory' but adds minimal new meaning beyond the schema, so the baseline of 3 applies.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly states the verb 'Create' and the resource 'a new DSH session' bound to a directory, with the additional behavior 'auto-creates the workspace if missing' and the return value 'sessionId'. This distinguishes it from siblings like dsh_resume_session (resume) and dsh_list_workspaces (list).
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description positions the tool as the entry point for starting a new session, noting it 'Returns the sessionId for follow-up tool calls', implying use before dsh_send_message or dsh_get_session_stats. It does not explicitly name alternatives or exclusions, but the word 'new' and the sibling names make when-to-use clear.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
dsh_get_session_statsB
Fetch cached projections (tokenUsage, sessionStats, contextPressure) for a DSH session.
| Name | Required | Description | Default |
|---|---|---|---|
| session_id | No |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
The description adds useful detail by calling the projections 'cached', implying the data may not be real-time, and lists the fields returned. However, it does not disclose error behavior, session existence requirements, or explicitly confirm read-only semantics (though 'Fetch' implies it). With no annotations, the description partially but inadequately carries the transparency burden.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is a single, front-loaded sentence that immediately states the action and key specifics. No filler or redundancy, every word contributes to understanding.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
For a simple getter, the description covers the basic purpose and lists fields, but given there is no output schema, it does not explain what the projections mean or how they behave (e.g., staleness, availability). Usage context vs. alternatives is also missing, leaving the tool functional but not fully self-contained.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
The input schema provides only a type for session_id with 0% description coverage. The description mentions 'for a DSH session', which clarifies the parameter's reference, but does not explain the expected format, source, or how to obtain a valid session_id. It fails to compensate for the lack of schema-level description.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly states the action ('Fetch') and the target ('cached projections for a DSH session'), naming specific fields (tokenUsage, sessionStats, contextPressure). This distinguishes it from sibling tools like dsh_create_session and dsh_send_message, which are write/action operations.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
No guidance is provided on when to use this tool versus alternatives, such as when a session is active vs. cached, or when to call it in a workflow. The description lacks any context about prerequisites or exclusions.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
dsh_list_workspacesA
List every DSH workspace known to the local dsh web UI.
| Name | Required | Description | Default |
|---|---|---|---|
No parameters | |||
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
With no annotations provided, the description conveys a read-only listing behavior and adds context about the data source ('local dsh web UI'), but it does not disclose return format, sorting, pagination, or potential errors. For a simple list tool this is adequate, though not rich.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is a single, front-loaded sentence with no filler words. Every word contributes to the meaning and the tool's scope.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
For a zero-parameter, no-output-schema list tool, the description fully covers what the tool does and where the data comes from. It is complete for an agent to invoke it correctly.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
The tool has zero parameters and the schema is empty (100% coverage), so the description does not need to add parameter details. The 0-param baseline of 4 applies here.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description uses a specific verb ('List') and resource ('every DSH workspace') and clearly scopes to 'the local dsh web UI,' distinguishing it from session-focused sibling tools. It is immediately obvious what this tool does.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description provides clear context for when to use this tool (when you need all workspaces known to the local UI) and implies no exclusions, though it does not explicitly name alternatives. The sibling names are all session-related, so the use case is evident.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
dsh_resume_sessionA
Re-load an existing DSH session and verify its cached state. Subsequent dsh_send_message calls reuse the prompt prefix.
| Name | Required | Description | Default |
|---|---|---|---|
| session_id | No |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
With no annotations, the description carries the full burden. It discloses that it verifies cached state and affects subsequent send_message calls, which is useful. However, it does not disclose error behavior (e.g., what happens if the session_id is invalid), authentication requirements, or whether any state is mutated. This is adequate for a simple re-load tool but leaves gaps.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is two sentences, front-loaded with the core purpose and immediately followed by a key behavioral note. Every word earns its place; there is no fluff or repetition.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
For a tool with one optional parameter and no output schema, the description is fairly complete: it covers the primary action and a key side effect. However, it omits what happens if the session is missing or invalid, and does not mention any prerequisites. Given the low complexity, this is a reasonable but not exhaustive description.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
The schema has a single string parameter 'session_id' with no description. The tool description does not explicitly explain the format or required context of session_id, relying on the phrase 'existing DSH session' to imply its purpose. This adds little meaning beyond the schema, especially since the schema coverage is 0%.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly states the tool re-loads an existing DSH session and verifies cached state, using a specific verb ('re-load') and resource ('DSH session'). It distinguishes from siblings by emphasizing 'existing' sessions, which contrasts with dsh_create_session, and notes its role relative to dsh_send_message.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description provides clear context: it is for resuming an existing session, and it explicitly mentions that subsequent dsh_send_message calls reuse the prompt prefix, implying it should be called before send. It does not explicitly state when not to use it (e.g., for new sessions), but the contrast with dsh_create_session is implicit.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
dsh_send_messageB
Send a prompt to a DSH session and block until the assistant turn completes. Result includes assistant text and token usage (cacheReadTokens / cacheWriteTokens).
| Name | Required | Description | Default |
|---|---|---|---|
| prompt | No | ||
| timeout_s | No | ||
| session_id | No | ||
| poll_interval_s | No |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
With no annotations, the description carries full responsibility. It discloses blocking behavior and result content (assistant text, token usage), which is helpful. However, it omits the polling and timeout behavior hinted at by the parameters, and gives no error semantics.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
A single sentence, front-loaded with the action, then adding key result details. No wasted words.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
The tool has no annotations or output schema, and the description leaves out parameter explanations and operational details like timeout behavior or session_id requirements. This is insufficient for a 4-parameter blocking tool.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
The schema has 0% parameter coverage and the description does not explain any parameter. Only 'prompt' is contextually implied; session_id, timeout_s, and poll_interval_s are never described, leaving the agent to guess their meaning and roles.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description uses a specific verb 'Send' with a clear resource 'prompt to a DSH session' and adds important behavioral detail about blocking until completion. This distinguishes it from sibling tools focused on session creation, stats, or resumption.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
Usage is implied: sending a prompt requires an existing session, so the user must know to create/resume one first. However, the description does not explicitly state prerequisites, alternatives, or when not to use this tool, leaving the agent without clear guidance.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
TDQS
Tool purposes are mostly distinct, but create_session and resume_session both establish a session for sending messages, and the difference (new vs existing) could confuse an agent without careful reading. Descriptions resolve the ambiguity, so only minor overlap remains.
All tools share the dsh_ prefix and follow a clean verb_noun pattern: create_session, send_message, get_session_stats, resume_session, list_workspaces. The naming is perfectly consistent and predictable.
With 5 tools, the server is well-scoped for session and workspace management. Each tool has a clear role, and the count is within the ideal range for a purpose-built MCP.
Core workflow is covered (create/resume, send, stats, list workspaces), but the surface lacks session deletion or a way to list existing sessions directly. These are notable lifecycle gaps that agents may hit when trying to manage or clean up sessions.
Maintenance
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Related MCP Connectors
Remote MCP server for supportsheep: run AI interviews and manage support content for your blog.
Talk to your public-facing AI from any MCP client โ Claude, ChatGPT, Cursor, Cline, Windsurf.
Human-input bridge for AI agents with voice-first answer links, MCP tools, and HTTP APIs.
Nifty's MCP server โ exposes tasks, projects, messages, and files as tools for AI agents.
Related MCP Servers
- FlicenseNot gradedqualityNot gradedmaintenanceBridges STDIO-based MCP clients with SSE-based MCP servers, allowing applications like Claude Desktop to connect to remote MCP servers that use SSE transport.9
- FlicenseNot gradedqualityDmaintenanceBridges any local agent or LLM to Microsoft Work IQ's remote MCP server for enterprise context grounding, tools, and chat via CLI or local MCP proxy.
- AlicenseAqualityBmaintenanceBridges OpenAI Codex CLI to any MCP client, allowing headless Codex sessions via tools like codex and codex-reply.229MIT

GenieOS MCP Serverofficial
AlicenseAqualityBmaintenanceStdio bridge for editors to connect to the GenieOS MCP server, enabling AI agents to interact with GenieOS via Streamable HTTP transport.6419MIT
Latest Blog Posts
- Who's Calling? MCP Hosts Are an Identity Blind Spot (And the Spec Knows It)By Om-Shree-0709 on .mcpAgent IdentityOAuth 2.1
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
MCP directory API
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/cv588888888888888888888ju/dsh-web-mcp'
If you have feedback or need assistance with the MCP directory API, please join our Discord server