codex-mcp-dsh
Server Configuration
Describes the environment variables required to run the server.
| Name | Required | Description | Default |
|---|---|---|---|
| DSH_BIN | No | Executable for dsh; Windows auto-resolves npm .cmd shim to Node entry. | dsh |
| DSH_HOME | No | dsh config and credentials directory. | ~/.dsh |
| DSH_MODEL | No | Session-level model override; empty uses dsh settings. | empty (uses dsh settings) |
| DSH_PROFILE | No | ACP profile used for ACP transport. | acp |
| DSH_WEB_URL | No | Explicit URL of an existing service to attach (advanced). Empty means manage own service. | empty |
| DSH_WORKSPACE | No | Default workspace directory. | startup directory |
| DSH_BRIDGE_LOG | No | Log level: debug/info/silent. | info |
| DSH_BRIDGE_ENTRY | No | Entry diagnostic label (codex/webcodex/...), not used for authorization. | empty |
| DSH_WEB_URL_FILE | No | Private connection state / launch URL file. | $DSH_HOME/bridge-web.json |
| DSH_BRIDGE_WEB_HOST | No | Host for the management service; only loopback allowed. | 127.0.0.1 |
| DSH_BRIDGE_WEB_PORT | No | Port for management service; 0 = system-assigned free port. | 0 |
| CHATGPT_WEB_MCP_ROOT | No | Checkout of third-party chatgpt-web-mcp; read-only import. | empty |
| DSH_BRIDGE_TRANSPORT | No | Transport mode: 'acp' (default, backward compatible) or 'web' (recommended native Web). | acp |
| DSH_BRIDGE_PERMISSION | No | ACP permission response policy: allow/deny. | allow |
| DSH_BRIDGE_TIMEOUT_MS | No | Timeout for a single turn in ms. | 1800000 |
| DSH_BRIDGE_GATEWAY_DIR | No | Private job state directory. | $DSH_HOME/bridge-gateway |
| DSH_BRIDGE_ALLOWED_ROOTS | No | JSON array of allowed workspace roots for submissions. | empty (deny all) |
| DSH_BRIDGE_SESSIONS_FILE | No | ACP session cache file. | $DSH_HOME/bridge-sessions.json |
| DSH_BRIDGE_CANCEL_GRACE_MS | No | Grace period after cancel before returning unknown. | 5000 |
| DSH_BRIDGE_CLOSE_TIMEOUT_MS | No | Timeout for single session/close. | 60000 |
| DSH_BRIDGE_MAX_OUTPUT_CHARS | No | Max characters returned to client (truncated). | 60000 |
| DSH_BRIDGE_SHUTDOWN_WAIT_MS | No | Wait limit when MCP disconnects during startup. | 5000 |
| DSH_BRIDGE_WEB_OPEN_BROWSER | No | Whether to open default browser on dsh_start. | true |
| DSH_BRIDGE_WEB_STOP_ON_EXIT | No | Whether to stop own service when MCP disconnects (0/1). | 0 |
| DSH_BRIDGE_PLANNER_MAX_CHARS | No | Max chars for task/context. | 16000 |
| DSH_BRIDGE_WEB_SESSIONS_FILE | No | Web session cache file. | $DSH_HOME/bridge-web-sessions.json |
| DSH_BRIDGE_GATEWAY_MAX_LISTED | No | Max list entries. | 50 |
| DSH_BRIDGE_GATEWAY_MAX_STAGES | No | Max progress entries. | 12 |
| DSH_BRIDGE_PLANNER_TIMEOUT_MS | No | Timeout for a single consultation. | 900000 |
| DSH_BRIDGE_STARTUP_TIMEOUT_MS | No | Startup handshake / session/new resume budget. | 60000 |
| DSH_BRIDGE_WORKSPACE_LOCK_DIR | No | Cross-process workspace fence directory. | empty (fence disabled) |
| DSH_BRIDGE_CLOSE_ALL_BUDGET_MS | No | Total budget for closing all sessions on exit. | 120000 |
| DSH_BRIDGE_GATEWAY_WAIT_MAX_MS | No | Max wait for dsh_job single call. | 20000 |
| DSH_BRIDGE_PLANNER_ANSWER_TIER | No | Answer tier; must be Pro. | Pro |
| DSH_BRIDGE_WEB_BUSY_RECHECK_MS | No | How long to recheck when session reports running. | 1500 |
| DSH_BRIDGE_WEB_STOP_TIMEOUT_MS | No | Timeout for stopping management service. | 10000 |
| DSH_BRIDGE_GATEWAY_OPEN_BROWSER | No | Whether to open native Web UI per authority. | true |
| DSH_BRIDGE_PROGRESS_INTERVAL_MS | No | Interval for idle heartbeat progress notifications; 0 disables periodic heartbeats. | 10000 |
| DSH_BRIDGE_WEB_LAUNCH_TIMEOUT_MS | No | Timeout waiting for dsh web to print launch URL. | 60000 |
| DSH_BRIDGE_GATEWAY_CANCEL_POLL_MS | No | Interval for worker polling cancel request files. | 500 |
| DSH_BRIDGE_GATEWAY_JOB_TIMEOUT_MS | No | Timeout for a single worker native turn. | 0 (uses DSH_BRIDGE_TIMEOUT_MS) |
| DSH_BRIDGE_GATEWAY_START_GRACE_MS | No | How long a queued job without live worker is reported as unknown. | 30000 |
| DSH_BRIDGE_WEB_REQUEST_TIMEOUT_MS | No | Timeout for single HTTP request / token-to-cookie exchange. | 20000 |
| DSH_BRIDGE_PLANNER_PROBE_TIMEOUT_MS | No | Timeout for status/models probe. | 60000 |
| DSH_BRIDGE_PROMPT_RESPONSE_GRACE_MS | No | Extra budget for ACP session/prompt request. | 5000 |
| DSH_BRIDGE_WEB_PREFLIGHT_TIMEOUT_MS | No | Timeout for preflight before sending prompt. | 15000 |
| DSH_BRIDGE_GATEWAY_PROGRESS_WRITE_MS | No | Progress write throttle. | 1000 |
Instructions
Guidance the server publishes about itself, which clients place ahead of the tool catalog so the model reads it before choosing anything.
This server publishes no instructions, or was last inspected before Glama recorded them.
Capabilities
Features and capabilities supported by this server
Protocol revision2025-11-25
| Capability | Details |
|---|---|
| tools | {
"listChanged": true
} |
Tools
Functions exposed to the LLM to take actions
| Name | Description |
|---|---|
| dsh_startA | 显式启动/连接本机 DSH 并完成握手(幂等:连续或并发调用只启动一个)。transport=acp(默认)启动 dsh --profile acp;transport=web(DSH_BRIDGE_TRANSPORT=web)会自动管理一个本地 Web 服务:复用已记录的服务,或(默认端口 0)新起一个 dsh web 子进程并把它捕获的 token 私密换成浏览器 cookie。完成后返回 running:true、state、web_url(不含 token);web 模式下默认会在用户默认浏览器里打开原生 Web UI,可用 open_browser:false 关闭。返回的 web_url 就是本桥正在驱动的那个原生 Web 服务:请用这个 URL(不要假设固定端口——用户机器上的 3080 可能是另一个未被本桥连接的服务),并在其中选择同一个 workspace/session 观察同一段对话与权限提示。失败返回明确错误且桥保持可调用,可重试。 |
| dsh_runA | 把任务交给 DeepSeek Harness 执行并返回最终答复。若 dsh 尚未启动会自动启动;默认复用当前 cwd 的会话。这是一个同步的 tools/call:保持 pending,直到原生回合给出最终结果(或超时/取消),不要轮询、不要并发重复提交。仅当客户端提供 progressToken 时才回传 progress 通知(起始/阶段/空闲心跳),它只是活动信息,不代表完成,也不改变客户端超时或配额。web transport 下若原生回合在等待权限审批,进度会显示 waiting_for_approval;审批只在原生 Web UI(dsh_start 返回的 web_url)里回答,本桥不会自动批准、也不会修改原生权限配置;因等待审批而超时时,错误里会说明并且不会重发任务。较长或预计耗时不确定的任务优先用 dsh_submit + dsh_job,避免同步调用被客户端期限截断。 |
| dsh_sessionA | 查看/恢复/关闭 DSH 会话。list/status 始终可答(未启动时返回缓存视图),并可用 cwd/session_id 收窄结果:过滤只作用于已经存在(running 或缓存)的会话行,绝不创建目录、不隐式启动或恢复任何会话,无匹配时返回空数组;不带过滤参数时仍返回完整视图(包含原生错误行)。resume/close 需要 dsh 正在运行。 |
| dsh_statusA | 只读状态,不会隐式启动 dsh。running/state 可区分 stopped/starting/running/error;ok=true 表示 dsh 健康(未启动为 false);并保留二进制、版本、活会话数、会话能力、配置来源。 |
| dsh_modelA | 原生模型目录与选择(仅 web transport 可用;ACP 明确返回 UNSUPPORTED_TRANSPORT,绝不假装成功)。action=list 读取公开模型目录(provider/model/reasoning effort 与部署默认值);action=status 用 cwd 或 session_id 查看某个已有会话的 modelSelection projection(next/lastUsed),并以目录 default 作为尚无选择时的回退(current = projection.next ?? catalog.default,与原生 Web UI 一致);action=select 为已有会话选择 provider/model/可选 reasoning_effort:先按实时目录校验所有 id(禁止猜测),再调用一次原生 session/selectModel,然后回读 projection 与目录默认值并给出 verified。该原生 API 同时选择「本会话下一次请求」并尝试把同一选择保存为全局默认(保存失败仅由原生记日志),因此不是 session-only。本工具不创建/恢复/启动会话,不修改 settings.yaml,也不使用模型的自我描述作为身份依据。 |
| dsh_workspaceA | 为给定绝对目录建立/复用一个 DSH 会话:缺失目录连同父目录创建,已有目录安全复用且绝不覆盖已有文件;必要时自动启动/连接 DSH。返回 created(本次是否新建目录)、cwd(规范绝对路径)、session_id 与成功状态;web transport 下还会创建真实的原生 Workspace(workspace_id)并把原生会话挂到它上面,另返回不含 token 的 web_url。 |
Prompts
Interactive templates invoked by user choice
| Name | Description |
|---|---|
No prompts | |
Resources
Contextual data attached and managed by the client
| Name | Description |
|---|---|
No resources | |
TDQS
Scored across 6 tools
Each tool maps to a distinct lifecycle area (start, run, session, status, workspace, model), and the descriptions are detailed enough to resolve most ambiguity. However, dsh_session's list/status view overlaps conceptually with dsh_status, and dsh_run's auto-start behavior blurs the boundary with dsh_start.
All tools share a clear dsh_ prefix and consistent snake_case, making the family easy to recognize. The pattern is slightly mixed, though: start/run are verbs while session/status/workspace/model are nouns, so it is not a uniform verb_noun convention.
Six tools is a well-scoped set for this domain. Each tool covers a distinct concern with no obvious redundancy, and the count falls comfortably within the ideal range.
The core surface covers starting, running, session management, status, workspace setup, and model selection. Notable gaps exist, however: there is no explicit stop/shutdown operation, and dsh_run's guidance to prefer dsh_submit + dsh_job for long tasks references async tooling that is absent from this server.