dsh-bridge
OfficialClick 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-bridgeSend a message to my DSH session to review the latest commit and provide feedback"
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-bridge
本机 DSH ↔ ChatGPT/Codex 会话 MCP 双工桥:让 DeepSeek Harness(DSH)会话与 ChatGPT 桌面应用 / Codex CLI 中的本地 Codex 会话之间实现双向消息、协同开发与对方能力调用。
零外部依赖(Node ≥ 22.5 内置
node:sqlite、WebSocket、fetch)单进程常驻 coordinator:SQLite 持久队列、会话所有权状态机、统一投递决策(steer / new_turn / queue / auto)
对 ChatGPT 桌面当前持有的活跃会话不抢占:自动降级为排队(mailbox),等桌面释放后经
session_claim切换所有权同一 MCP server 同时供 ChatGPT 桌面应用与 Codex CLI 加载(共享
~/.codex/config.toml的[mcp_servers.*]段)
设计基线见仓库内两份文档:
dsh-codex-mcp-bridge.md—— 方案(评审稿)
架构
ChatGPT 桌面任务 Codex CLI / bridge 控制台
│ MCP stdio │ WS / CLI
▼ ▼
┌──────────────────────────────────────────────────────────┐
│ dsh-bridge Coordinator │
│ - 统一 session interface(steer/start/queue/auto) │
│ - 会话注册表 / writer ownership / active execution │
│ - SQLite mailbox、回执、事件游标 │
└───────────────┬──────────────────────────┬───────────────┘
│ │
DshSessionAdapter CodexHostAdapter
HTTP + SSE JSON-RPC over WS
│ │
▼ ▼
DSH Web :3080 bridge 管理的 Codex App Server核心模块:
组件 | 路径 | 说明 |
Coordinator |
| 单例进程:DB、registry、mailbox、双 adapter、unix socket IPC、 |
DshSessionAdapter |
| DSH Web HTTP RPC( |
CodexHostAdapter |
| 独立 Codex App Server(WS JSON-RPC: |
Delivery 决策 |
| steer / new_turn / queue / auto 的单一实现 |
MCP stdio 前端 |
| 供 ChatGPT 桌面 / Codex CLI 加载(9 个工具) |
DSH CLI |
|
|
MCP 工具面:bridge_status、session_send、session_guide、session_receive、session_ack、session_ownership、task_submit、task_report、capabilities。
Related MCP server: backchannel
快速开始(Linux)
git clone https://github.com/SoftDefender/dsh-bridge.git
cd dsh-bridge
node --version # 需要 ≥ 22.5
# 1) 生成默认配置(默认即适用;可调整端口/路径)
mkdir -p ~/.codex-bridge
node src/coordinator.mjs & # 先启动一次即可生成默认桥配置目录
curl http://127.0.0.1:45170/healthz # 健康检查:双 host up
# 2) CLI 冒烟
node src/frontends/cli.mjs status默认
codex.cli_path = /usr/lib/chatgpt/resources/codex(ChatGPT 桌面内置二进制)。 纯 Codex CLI 环境可改为codex(PATH 内)。其他平台/路径在~/.codex-bridge/bridge.toml调整。
接入 ChatGPT 桌面应用 / Codex CLI
两者共用同一配置段(追加到 ~/.codex/config.toml):
[mcp_servers.dsh-bridge]
command = "node"
args = ["/home/<user>/dsh-bridge/src/frontends/mcp_stdio.mjs"]
startup_timeout_sec = 30
[mcp_servers.dsh-bridge.env]
DSH_BRIDGE_SOCKET = "/home/<user>/.codex-bridge/run/coordinator.sock"ChatGPT 桌面应用:重启应用后自动加载;会话内即可直接调用 9 个 MCP 工具。
Codex CLI:同段自动生效;也可
codex mcp add dsh-bridge -- node <abs-path>/src/frontends/mcp_stdio.mjs。coordinator 必须先于以上任一端运行(
mcp_stdio.mjs是无状态薄前端,仅转发到 coordinator.sock)。
CLI 用法
# 别名
alias dsh-bridge='node /home/<user>/dsh-bridge/src/frontends/cli.mjs'
dsh-bridge status # coordinator + 双 host + 队列
dsh-bridge session create --cwd /path/to/workspace # 新建 bridge 拥有的 Codex 会话
dsh-bridge session claim <threadId> | release <threadId> # 所有权切换(不抢占桌面会话)
dsh-bridge guide --to codex:<threadId> --message "优先处理测试失败" --delivery auto
dsh-bridge send --to dsh:<sessionId> --text "hello" # 向 DSH 会话发消息
dsh-bridge receive --to codex:<threadId> --status all # 收件箱(含排队消息)
dsh-bridge ack --message-id <id> --reply "收到"
dsh-bridge task submit --to codex:<threadId> --kind task --title T --brief B
dsh-bridge task report <taskId> --status done --summary S
dsh-bridge capabilities目标格式:dsh:<DSH sessionId> 或 codex:<threadId>。
测试
node --no-warnings --test test/unit.test.mjs # 单测(无需外部依赖)
node --no-warnings --test test/integration_codex.test.mjs # 真实 App Server 集成(慢,消耗少量模型配额)
bash test/e2e.sh # coordinator 进程级端到端(需已启动 coordinator)已覆盖场景:新建会话 turn/start → turn/steer 执行中改向闭环;已存在(bridge 拥有)会话再次引导;桌面持有会话自动降级排队且不误报;claim 拒绝抢占;SQLite 持久化与优雅停机。
与 ChatGPT 原生协同机制的定位差异
dsh-bridge | ChatGPT 桌面 collab agent | |
范围 | 跨应用:DSH ↔ ChatGPT/Codex 会话 | 应用内:ChatGPT 会话之间 |
触发 | MCP 工具 / CLI / 桥队列 | 应用内任务分派 |
外部可编程性 | 完全可编程(协议/CLI/库) | 不可外部编程接入 |
适用 | 跨模型(DeepSeek ↔ GPT)协同开发 | 同模型多会话分工 |
两者互补:dsh-bridge 面向"DSH 与 ChatGPT/Codex 的跨应用双工协同"。
已知限制
桌面应用当前持有的活跃会话不可被外部直接 steer(单写者所有权);通过排队 +
session_claim(桌面释放后)切换。turn/steer影响后续模型决策,不强制中断正在执行的 shell/MCP 工具;取消请用turn/interrupt。App Server WebSocket transport 为实验性(codex 官方标注);升级 Codex 后需重跑集成测试。
DSH HTTP schema 处于 developer preview;coordinator 启动时做 capability probe,探测失败即拒绝相关操作(fail-closed)。
License
MIT
This server cannot be installed
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 Servers
- Alicense-qualityDmaintenanceA stateless MCP server that enables real-time, bidirectional messaging and collaboration between different IDEs and AI agents. It facilitates client-to-client communication, allowing tools like Cursor, VS Code, and Windsurf to coordinate workflows and share information seamlessly.1MIT
- Alicense-qualityBmaintenanceMCP server for async messaging between AI coding agents, enabling cross-harness and cross-machine communication with Slack-like semantics and mail-shaped delivery.2MIT
- Alicense-qualityDmaintenanceMCP server that enables AI coding agents to communicate, share state, and coordinate work in real time via MCP tools or REST API.895MIT
- Alicense-qualityCmaintenanceMCP server for end-to-end encrypted multi-agent chat rooms, enabling turn-based hosts like Codex and Claude Code to claim, process, and acknowledge tasks.1MIT
Related MCP Connectors
Remote MCP server for The Colony — a social network for AI agents (posts, DMs, search, marketplace).
Real-time chat hub for AI agents — Claude Code, Cursor, Cline, Codex over MCP or REST.
StremAI MCP: shared memory for AI coding agents. Connected agents can recall. OAuth + local stdio.
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/SoftDefender/dsh-bridge'
If you have feedback or need assistance with the MCP directory API, please join our Discord server