Skip to main content
Glama

ChatGPT–DSH Bridge

English · 版本发布 · MIT

CI

让 ChatGPT 或 Codex 负责规划和审查,让 Windows 上的 DeepSeek Harness 执行代码任务。通过本地 MCP 启动任务、查看进度、取回结果或取消。适合想把「让一个模型执行,另一个模型复核」用在日常开发中的人。

默认只读,限定目录。 每个任务必须指向你列入白名单的项目;写入还需要你在本地签发授权。项目是独立的开源桥接工具,与 OpenAI 或 DeepSeek 无隶属关系。

5 分钟上手

需要 Windows 11、Node.js 22 或 24 LTS(最低 20)、已安装并可使用 headless profile 的 DeepSeek Harness,以及支持本地 STDIO MCP 的客户端。

git clone https://github.com/sho777564/chatgpt-dsh-bridge.git
cd chatgpt-dsh-bridge
$project = (Resolve-Path 'C:\Projects\my-app').Path # 换成实际项目目录
powershell -NoProfile -ExecutionPolicy Bypass -File .\scripts\install.ps1 -AllowedRoots $project

脚本安装依赖、验证 MCP 工具和 DSH CLI,并注册本地 marketplace。重新加载客户端并选择 ChatGPT–DSH Bridge,先调用 dsh_health_check。能收到工具响应后,试一下:

用 DSH 以只读模式检查 C:\Projects\my-app 的测试入口。列出建议运行的命令,并说明哪些命令实际执行过。

找不到 DSH 时,用 -DshCliPath 指定安装目录里的 resources\runtime\cli\bin\dsh.cmd。其他 MCP 客户端可以用 手动接入方式。普通 Chat、网页和移动客户端是否能访问本地工具取决于宿主。

Related MCP server: Shared Credit Tool

授权写入

先审查任务计划。安装时可加 -EnableWriteMode,也可以在 实际启动的桥接实例 配置中设为 writeModeEnabled: true 后重启。然后在本地 PowerShell 授权指定目录:

$bridge = Join-Path $HOME '.codex\plugins\chatgpt-dsh-bridge'
powershell -NoProfile -ExecutionPolicy Bypass -File "$bridge\scripts\approve-write.ps1" -Workspace $project -Minutes 30

有任务需要改动时,客户端传 permission_mode: "workspace-write" 和 allow_write: true。授权只匹配这一目录,签名密钥保留在本机。撤销、永久授权和配置迁移见 写入授权。

开发与验证

npm ci
npm test
npm run smoke                            # 实际 CLI 和 profile,无模型调用
npm run smoke -- --workspace "$project"  # 实际只读任务,会使用 DeepSeek 服务

从源码运行任务时,先复制 配置示例 为 bridge.config.json,并填写你自己的白名单。空白名单仅允许健康检查。默认测试使用模拟 DSH,通过真实 MCP STDIO 验证工具、任务流程和授权,不需要账号。详见 架构 和 安全边界。

欢迎提带复现步骤的 Issue 和 PR。觉得这个流程有用,欢迎点右上角 ⭐ Star,也欢迎分享给在用 DeepSeek Harness 的朋友。

Available Tools

6 tools
dsh_cancel_taskCancel a DSH taskA
Idempotent

Terminate a running DSH task and its process tree. Cancellation is idempotent: if the task already finished, returns cancelled=false. Only use when the user asks to stop, or when a task is clearly runaway.

Inputs: task_id (required), reason. Returns: ok, status, message, task_id, +2 more

dsh_get_resultGet DSH task resultA
Read-onlyIdempotent

Return the final answer, a bounded test-line summary, errors, usage, and timing for a terminal DSH task. If the task is still running, use wait_seconds (maximum 25s) rather than repeated immediate calls. Review the result before claiming that tests passed.

Inputs: task_id (required), max_chars, include_logs, wait_seconds. Returns: ok, next, result, status, +3 more

dsh_get_statusGet DSH task statusA
Read-onlyIdempotent

Return the bounded status of a DSH task. Set wait_seconds for a short long-poll (maximum 25s) instead of polling rapidly. When terminal is true, call dsh_get_result.

Inputs: task_id (required), wait_seconds. Returns: ok, next, task, message, +1 more

dsh_health_checkCheck DSH bridge healthA
Read-onlyIdempotent

Check the local DSH CLI, headless profile, DeepSeek account route, local write authorization, and credential-file presence without reading credentials. Set probe=true to make a tiny live DSH model call and verify the model connection. Does not modify files.

Inputs: probe. Returns: ok, dsh, bridge, security, +4 more

dsh_list_tasksList DSH tasksA
Read-onlyIdempotent

List the bounded set of DSH tasks retained by this MCP server process, newest first. Use to recover a task id; task state is in memory and does not survive a server restart.

Inputs: no named parameters. Returns: ok, count, tasks, max_tasks, +2 more

dsh_start_taskStart a DSH coding taskA
Destructive

Start an asynchronous headless DSH task in an absolute workspace. Permission mode: read-only (default; cannot write) or workspace-write (requires allow_write=true plus a valid local write grant for this exact workspace). The write grant is created locally; no token is sent to the model. danger-full-access is intentionally unavailable. The default is read-only. Use this only when local work is actually needed, not for ordinary conversation. Poll with dsh_get_status/dsh_get_result using wait_seconds instead of tight loops.

Inputs: task (required), workspace (required), title, allow_write, +2 more. Returns: ok, next, task, message, +1 more

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections.

Loading tool schema changelog…

    TDQS

    A4.1/5.0

    Scored across 6 tools

    Disambiguation4/5

    Each tool maps to a distinct lifecycle stage (health, start, status, result, cancel, list). The only mild overlap is dsh_get_status vs dsh_get_result, but descriptions clearly separate bounded status polling from retrieving the terminal answer.

    Naming Consistency5/5

    All tools use a consistent dsh_ prefix with a predictable verb_noun pattern (health_check, start_task, get_status, get_result, cancel_task, list_tasks). No mixed conventions.

    Tool Count5/5

    Six tools is well-scoped for an async task bridge, with each tool earning its place across the task lifecycle. Nothing feels redundant or missing at the count level.

    Completeness4/5

    Full task lifecycle is covered: health probe, start, poll status, fetch result, cancel, and list. Minor gaps like explicit cleanup/retention management or streaming output are workable given the bounded in-memory task model.

    Maintenance

    ActivityMaintained
    ResponsivenessNo recent community issues

    Related MCP Connectors

    Related MCP Servers

    • A
      license
      Not graded
      quality
      D
      maintenance
      A local MCP server that manages Claude-to-Codex task orchestration on Windows, providing tools for creating, dispatching, and monitoring tasks with safety constraints.
      MIT
    • A
      license
      Not graded
      quality
      D
      maintenance
      Local MCP server enabling Codex and ChatGPT to read/write files, execute commands, manage processes, use Git, and inspect images on the user's machine with full privileges.
      Apache 2.0
    • A
      license
      Not graded
      quality
      B
      maintenance
      A Windows proof-of-concept MCP server that connects ChatGPT developer-mode to a local Codex CLI via Secure MCP Tunnel, exposing a small set of read-only, allowlisted tools in an isolated workspace.
      2
      Apache 2.0
    • F
      license
      Not graded
      quality
      C
      maintenance
      An MCP server that lets supported AI clients like ChatGPT and Claude use locally authorised Windows tools, files, project tasks, commands, and local state, with configurable per-client authority and global access modes.
      -