dsh-headless-mcp
This server does not currently have a deployable release on Glama. Follow the repository's setup instructions to install and configure it for your MCP client, including any required credentials and local dependencies.
dsh-headless-mcp
Give any agent a DeepSeek executor.
English | 中文
A small MCP server that delegates coding tasks to DeepSeek Harness (DSH) headless sessions.
No DSH desktop, no web host, no plugin install - just Node and a DeepSeek API key.
The DSH runtime is resolved automatically: a local dsh CLI if present, otherwise
the pinned @deepseek-ai/dsh npm package through npm exec.
Community project, not an official DeepSeek Harness product. It uses DSH's public headless profile; the agent, tools, skills, and permissions are DSH's, not reimplemented here. Runtime strategy (self-build / prebuilt / embedded fallback): RUNTIME-STRATEGY.md. Staged execution plan: EXECUTION-PLAN.md.
Why this exists
DSH already has excellent MCP bridges such as
dsh-as-mcp,
harness-relay-mcp, and
deepseek-harness-for-codex.
They run a DSH host and surface visible sessions in the UI.
That is the right tool when a human is watching.
dsh-headless-mcp is for the other case: a planner or agent needs a DeepSeek
executor in CI, on a server, in a container, or in any environment where no DSH
desktop/web host is running.
Headless - spawns
dsh --profile headlessper call, persisted session optional.Small - one npm package, two runtime dependencies, no build step.
Planner/executor contract - plan JSON schema, scout context pack, independent acceptance.
Observable - local usage ledger records which agents use DSH, how, and what it cost.
Auditable - transcripts of reasoning, tool calls, and results are readable.
Proxy-aware - DSH's own proxy policy applies when proxy variables reach it.
Related MCP server: hermes-dsh-bridge
Quick start
npx -y dsh-headless-mcpThat starts the MCP server on stdio. Point any MCP client at it:
The first executor call may download the pinned DSH runtime once (npm cache); later
calls reuse it. Run npx -y --package=dsh-headless-mcp dsh-headless runtime status
to see which backend is selected.
Codex
# ~/.codex/config.toml
[mcp_servers.dsh_headless]
command = "npx"
args = ["-y", "dsh-headless-mcp"]
tool_timeout_sec = 3600
startup_timeout_sec = 30
default_tools_approval_mode = "approve"Then restart Codex (MCP servers are read at process start) and ask it to "delegate implementation to DeepSeek via dsh-headless-mcp".
Claude Code
{
"mcpServers": {
"dsh-headless": {
"command": "npx",
"args": ["-y", "dsh-headless-mcp"]
}
}
}Cursor
{
"mcpServers": {
"dsh-headless": {
"command": "npx",
"args": ["-y", "dsh-headless-mcp"]
}
}
}More examples: examples/. The skills/plan-exec/SKILL.md file contains
a planner/executor skill for Codex and Claude-style skill systems.
One core, many plugin ecosystems
The same MCP server ships a generated face for each plugin system, so an agent browsing Codex, Claude Code, Cursor, or the portable Agent Plugins format can find and install it without knowing the npm name.
Ecosystem | Install |
Codex plugin |
|
Claude Code plugin |
|
Cursor | submit the repo at https://cursor.com/marketplace/publish, or load |
Portable Agent Plugins | point a compatible client at |
Any MCP client | use the |
DSH ecosystem | no plugin needed; use the |
Marketplace catalogs live at the repository root (.agents/plugins/,
.claude-plugin/, .cursor-plugin/). The faces are generated from one metadata
source:
npm run integrations:build
npm run integrations:checkSee integrations/README.md for the layout and how to add another ecosystem.
Tools
Tool | What it does |
| Run one self-contained task; optional |
| Validate a plan, execute it, optionally run its acceptance command. |
| Read-only reconnaissance; returns a bounded |
| List persisted headless DSH sessions. |
| Render a session or run directory as readable markdown. |
| Query the local usage ledger (by agent, tool, day). |
| Report the DSH backend or bootstrap the pinned runtime. |
| Check |
Tool descriptions include the phrases a planner searches for: delegate implementation to DeepSeek, planner needs an executor, headless DSH.
Plan -> execute -> verify
dsh_run_plan takes the same JSON shape a planner produces:
{
"goal": "Add pagination to the list endpoint without changing the response shape.",
"steps": [
{ "id": 1, "title": "Update handler", "action": "Read src/list.ts and add offset/limit parsing...", "files": ["src/list.ts"] },
{ "id": 2, "title": "Add tests", "action": "Cover default, limit-only, offset-only, and out-of-range cases.", "files": ["test/list.test.ts"] }
],
"acceptance": ["npm test -- list"],
"risks": ["Existing callers may rely on the full response body."]
}The executor treats the plan as authoritative, reports deviations, and the server
independently runs acceptance (pass verify explicitly) so a self-report is never
the only evidence.
Usage ledger
Every executor/scout call appends one line to ~/.dsh-headless/ledger.jsonl:
{
"schema": "dsh-headless-mcp/ledger/v1",
"ts": "2026-11-29T...Z",
"agent": { "name": "Codex", "version": "0.167.0" },
"tool": "dsh_run_plan",
"cwd": "E:\\repo",
"permission": "workspace-write",
"taskHash": "sha256:...",
"taskChars": 4200,
"sessionId": "session-...",
"outcome": "ok",
"wallSeconds": 99,
"usage": { "inputTokens": 0, "outputTokens": 0 },
"verify": { "ok": true, "exitCode": 0 },
"runDir": "~/.dsh-headless/runs/..."
}Ask an agent to call dsh_usage to answer "which agents use this DSH instance,
what do they run, what is the success rate, and where do tokens go?". The CLI has
the same view:
npx -y --package=dsh-headless-mcp dsh-headless usage summary
npx -y --package=dsh-headless-mcp dsh-headless usage events --limit 20Privacy defaults:
Task text is not stored; only a SHA-256 hash and length.
Set
DSH_HEADLESS_LOG_TASKS=1to store a 500-character redacted preview.The ledger is local-only. No telemetry is sent.
Credentials are never written.
The ledger format is documented in docs/ledger.md and published as an open JSON Schema so other DSH tools can emit compatible events.
Requirements
Node.js >= 22.19 for the bridge. The automatic npm bootstrap needs >= 24.9 because that is the engine range of
@deepseek-ai/dsh; with an older Node, pointDSH_CLIat a locally installed DSH instead.No manual DSH install is required: local
dshis used when present, otherwise the pinned npm runtime is fetched on first use. SetDSH_CLIto override.DEEPSEEK_API_KEY, orrefs.DEEPSEEK_API_KEYin~/.dsh/.credentials.yaml.
The server resolves the backend in this order: --dsh-cli / DSH_CLI -> common
install paths -> dsh on PATH -> pinned npm bootstrap.
Configuration
Environment variable | Default | Meaning |
| auto | Path to |
|
| DSH home (credentials, sessions) |
| from DSH credentials | DeepSeek API key |
|
| Runs and ledger root |
|
| Per-run logs |
|
| Usage ledger |
| unset |
|
| auto | Fallback caller name outside MCP |
| enabled |
|
| unset |
|
|
| Cache for prebuilt runtimes |
Proxy variables (HTTP_PROXY, HTTPS_PROXY, NO_PROXY) are honored by DSH when
they reach the child process. MCP clients often sanitize child environments; set
them explicitly in the server config if needed.
Security
DSH runs with the permission preset you pass (workspace-write by default). The
executor is an autonomous agent inside that workspace: it can edit files and run
commands. Do not point it at a workspace you would not let an agent modify.
The server injects DEEPSEEK_API_KEY only into the child process, never logs it,
and binds no network port in v0.1 (stdio only). See SECURITY.md.
Compatibility
DSH 0.2.x headless profile.
Windows, macOS, Linux.
MCP clients that support stdio servers (Codex, Claude Code, Cursor, custom).
No DSH plugin API or private service is used; only the public
dshCLI.
How it compares
dsh-headless-mcp | dsh-as-mcp | harness-relay-mcp | dsh-exec | |
Needs DSH host | no | yes | yes | desktop |
MCP server | yes | yes | yes | no (CLI/HTTP) |
Visible session in DSH UI | no | yes | yes | yes |
Usage ledger across agents | yes | per-session | partial | no |
Best for | CI, remote, headless agents | local visible work | control plane | terminal + sidebar |
Development
npm install
npm test
npm run check
npm run pack:checkTests use a mock dsh CLI, so they need no API key and no network.
License
MIT. Not affiliated with DeepSeek. "DeepSeek Harness" and "DSH" refer to the upstream project at https://github.com/deepseek-ai/deepseek-harness.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
This server cannot be deployed
Maintenance
Related MCP Connectors
Operate Linux, macOS and Windows from your LLM. Every action runs through an auditable allowlist.
Start and manage Reason cloud coding agents, projects and sessions from any MCP client.
Develop, manage, and debug Railway projects, services, and deployments from within agents.
Use your own Windows, Mac or Linux computer from ChatGPT, Claude, Cursor or Gemini CLI: run commands, read, write and search files, run long processes. Your computer only makes an outgoing connection (no open ports or VPN). Read-only mode, allowed folders, blocked commands and an action log keep you in control. Free plan available.
Related MCP Servers
- AlicenseAqualityCmaintenanceEnables Codex and Claude Code to delegate implementation, research, debugging, and long-log work to DeepSeek Harness, then observe, continue, or cancel those sessions without leaving the primary workflow.155MIT
- AlicenseNot gradedqualityBmaintenanceEnables 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.323 npm9GPL 3.0
- AlicenseNot gradedqualityAmaintenanceEnables hosts like Claude Code, Codex, Antigravity, and Grok to dispatch work to full DeepSeek Harness agent sessions that appear as native subagents with live progress, tier/effort presets, failure escalation, and workspace-cycle guardrails. Also lends a text-only harness multimodal abilities by describing pasted images and generating images through DeepSeek's vision model, existing CLIs, or a custom endpoint.354 npmMIT
- AlicenseNot gradedqualityAmaintenanceEnables coding hosts like Claude Code, Codex, Antigravity and Grok to dispatch tasks to full DeepSeek Harness agent sessions that appear as native subagents with live progress, tier and effort presets, escalation on failure, workspace locking and a jobs board. It also bridges text-only harness models to vision and image generation through DeepSeek's VL model, existing CLI tools, or any OpenAI-compatible endpoint.354 npmMIT