DSH ⇄ ChatGPT Fusion Gateway
DSH ⇄ ChatGPT 融合网关
一个极简的 MCP 桥接器,它将 DeepSeek Harness(DSH)保持为唯一代理与运行时,并仅将 ChatGPT Web 用作无状态的、单轮推理提供方。
DSH 负责代理、工具、权限、会话、压缩、子代理、工作流、目标以及真实的文件/Shell 执行。网关只是将一份不可变的 DSH 上下文快照转发给 ChatGPT “Brain” 会话,并原样返回一个决策——一个最终答案、一个操作建议,或一个受限只读批次。网关从不自行执行所建议的操作。
User
↓
DSH UI
↓
DSH Native Agent Loop → Context / Compaction
↓
ChatGPT Fusion LLM Adapter
↓
Fusion Reasoning Gateway ← this repository
↓
ChatGPT Brain Worker (a dedicated ChatGPT Web conversation + optional wake extension)
↓
final | action_proposal | readonly_batch
↓
Gateway validation
↓
DSH Permissions / ToolRuntime → DSH Native Tool → Next DSH Tick功能特点
严格单结果推理契约 — 每个请求都携带一份完整、不可变的快照;Brain 恰好返回一个终结结果(
final、action_proposal,或由 read/glob/grep 组成的受限readonly_batch)。可恢复的投递 — 请求会记入磁盘日志;网关崩溃时可恢复进行中的声明(claim),而不是丢失它们。通过快照 + nonce 实现幂等重试。
多 worker 故障转移 — 多个 Brain 会话可以为同一模型路由提供支持;停滞的声明会被释放,并以轮换后的 nonce 重新交付给健康的备用会话。
OAuth 2.0(loopback) — 为公共 ChatGPT 连接器(
/brain-mcp)提供可选授权,并支持访问/刷新令牌轮换。跨平台 — 网关和 Node 守护进程可在 Linux、macOS 和 Windows 上运行。
可选浏览器唤醒 — 一个 Chrome 扩展(
browser-autowake/)会轮询 loopback 队列元数据,并在有待处理工作时唤醒路由所绑定的 Brain 标签页。
Related MCP server: chatgpt-mcp
运行要求
Node.js 18+(使用全局
fetch)。git(在 Linux 上还需要你配置的命令用户)用于工作区工具。
DSH 的自身代理循环和工具运行时必须可用;网关会自动检测 DSH 自带的 node_modules,或者你也可以通过 DSH_NODE_MODULES 环境变量指定其位置。
快速开始
git clone <your-repo-url>
cd dsh-chatgpt-mcp
npm install将真实凭据填入 config.json 和 model-bindings.json(所有值均以 REDACTED_* 占位符形式提供),然后启动:
npm run daemon:start # background, supervised with auto-restart
npm run daemon:status…或者在前台运行:
npm start # node server.strict.cjs网关将绑定 http://127.0.0.1:7688。详细的架构设计和不变性约束见 ARCHITECTURE.md。
配置
config.json
键 | 含义 |
| Loopback 绑定地址(默认为 |
| 工具可访问的项目工作区。 |
| 用于 OAuth 授权的拥有者密码(至少 16 个字符)。 |
| 用于 loopback Brain MCP 的静态 Bearer 令牌(至少 32 个字符)。 |
| 工作区 |
| 仅限 Linux:沙箱命令通过 |
ownerPassword、staticToken 和绑定键是必填项,使用前必须填写。在 macOS/Windows 上没有可移植的 setuid 辅助程序,因此沙箱命令以当前用户身份运行,commandUser 会被忽略。
model-bindings.json
将每条 modelId + reasoningEffort 路由映射到一个 bindingKey。bindingKey 是与对应 brain-worker-*.txt 共享的密钥;两者要保持同步。
服务控制
在 Linux、macOS 和 Windows 上行为完全相同:
node scripts/daemon.mjs start # start detached supervisor + server
node scripts/daemon.mjs stop
node scripts/daemon.mjs restart
node scripts/daemon.mjs status这些命令也通过 npm run daemon:start|stop|restart|status 暴露。仅限 Linux 的基于 screen 的脚本仍保留在 scripts/ 中(control.sh、public_quick.sh 等),用于 Cloudflare quick-tunnel 和无头 Chrome worker 池。
推理协议(v4)
网关与 ChatGPT “Brain” 之间采用严格协议:
fusion_wait_for_reasoning_request → one immutable snapshot + data-only action catalog
fusion_submit_reasoning_result → exactly one {final} | {action_proposal} | {readonly_batch}
fusion_fail_reasoning_request → terminal failure for the assigned snapshotactionCatalog 纯粹是数据——对 DSH 原生工具的描述,永远不会安装为 ChatGPT/MCP 工具。action_proposal 是一个建议,之后由 DSH 在自身的沙箱/权限策略下执行,网关不会运行它。
公共端点为 GET|POST /brain-mcp。先前的 /mcp 和 /fusion/tasks… 路由返回 HTTP 410(已禁用)。
权限
采用 DSH 原生的三级权限模型——read-only、workspace-write、danger-full-access,默认使用 workspace-write。
仓库结构
server.strict.cjs active gateway (strict v4; no legacy /mcp)
server.cjs full gateway incl. workspace file/shell tools
config.json runtime configuration (secrets are placeholders)
model-bindings.json modelId → bindingKey map
scripts/daemon.mjs cross-platform daemon (start/stop/restart/status)
scripts/*.sh Linux deployment helpers (screen, cloudflared, Chrome workers)
brain-worker-*.txt per-route prompts for dedicated Brain conversations
browser-autowake/ optional Chrome extension that wakes Brain tabs
tests/ selftests and headless integration workers
state/ logs/ runtime artifacts (gitignored)测试
npm install
node tests/reasoning-contract-v4-selftest.mjs # primary protocol test
# …plus oauth, worker-recovery, failover, context-overflow, payload-limit selftests完整的测试矩阵请参见实现说明中的 ## Verification 章节。
安全说明
默认绑定
127.0.0.1;只有 quick-tunnel 脚本会暴露公网 URL。不要将含真实密钥的
config.json或model-bindings.json提交到仓库——本仓库正是因此才默认提供占位符。在 Linux 上使用
/bin/setpriv将沙箱命令降权到commandUser;在其他平台,命令以当前用户身份运行。
DSH ⇄ ChatGPT Fusion 是一个社区桥接项目,与 OpenAI 或 DeepSeek 无关联,也未获得其认可。使用 ChatGPT 须遵守 OpenAI 的服务条款。
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
- AlicenseAqualityBmaintenanceAdds a deep_reasoning tool that consults stronger reasoning models (e.g., DeepSeek R1) to produce full reasoning traces for complex problems, helping the agent shape and cross-check its answers.1MIT
- AlicenseNot gradedqualityAmaintenanceBridges Cursor IDE Agent with ChatGPT Web for external reasoning, research, and review.15MIT
- AlicenseNot gradedqualityAmaintenanceMCP bridge enabling ChatGPT to create, view, and control DeepSeek Harness agent sessions, with session management, messaging, and approval tools.9MIT
- AlicenseNot gradedqualityBmaintenanceEnables dispatching work to DeepSeek Harness agents from Claude Code/Codex, with native progress UI, tier policy, and vision/image generation through MCP tools.0101MIT
Related MCP Connectors
Agent-to-agent reasoning-as-a-service: chain-of-thought, analysis, and decision support.
Reliable web access for AI agents: smart HTTP, rotating proxies, and full-browser rendering.
Provides cloud browser automation capabilities using Stagehand and Browserbase, enabling LLMs to i…
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/2025ashore/DSH-Brain-Bridge'
If you have feedback or need assistance with the MCP directory API, please join our Discord server