DSH ⇄ ChatGPT Fusion Gateway
DSH ⇄ ChatGPT Fusion Gateway
DeepSeek Harness(DSH)を単一のエージェント兼ランタイムとして維持し、ChatGPT Webをステートフル実行ではなく、ステートレスな単一ターンの推論プロバイダーとしてのみ使用する、最小限のMCPブリッジです。
DSHはエージェント、ツール、権限、セッション、コンパクション、サブエージェント、ワークフロー、目標、そして実際のファイル/シェル実行を所有します。GWゲートウェイは、1つの不変なDSHコンテキストスナップショットをChatGPTの「Brain」会話へ中継するだけで、返ってくるのは唯一の決定(最終回答、1つのアクション提案、または制限付きの読み取り専用バッチ)だけです。ゲートウェイ自身が提案されたアクションを実行することはありません。
本文書の内容は開発途上であり、本文書の原文での構成を保ちます。
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特徴
厳密な1結果推論コントラクト — 各リクエストには、完全かつ不変のスナップショットが1つ同梱され、Brainは
final、action_proposal、またはread/glob/grep による制限付きreadonly_batchのいずれか1つの終端結果だけを返します。復旧可能な配信 — リクエストはディスクにジャーナルされます。クラッシュしたゲートウェイは、in-flightクレームを失うのではなく復元します。retryはスナップショット+nonceにより冪等です。
マルチワーカーのフェイルオーバー — 複数のBrain会話が同じモデルルートをバックアップできます。停滞したクレームは解放され、ローテーションされたnonceと共に健全な予備ワーカーへ再配信されます。
OAuth 2.0(loopback) — 公開されたChatGPTコネクタ(
/brain-mcp)へのオプション認証で、アクセストークンとリフレッシュトークンをローテーションします。クロスプラットフォーム — ゲートウェイとNodeデーモンは、Linux・macOS・Windowsで動作します。
オプションのブラウザウェイク — Chrome拡張機能(
browser-autowake/)がループバックキューのメタデータをポーリングし、作業が待っている場合にルート紐付けのBrainタブをウェイクアップします。
Related MCP server: antigravity-with-chatgpt
要件
Node.js 18+(グローバルの
fetchを使用します)。ワークスペースツール用の
git(Linuxでは、設定済みのコマンドユーザーも利用します)。
DSH自体が、DSHネイティブのエージェントループとツールランタイムに利用可能でなければなりません。GWは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
Key | 意味 |
| ループバックのバインド先アドレス(既定値 |
| ツールがアクセスできるプロジェクトのワークスペース。 |
| OAuth認証用のオーナーパスワード(16文字以上)。 |
| ループバックのBrain MCP用の静的ベアラートークン(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ベースのスクリプトは、Cloudflare Quick-TunnelとヘッドレスChromeワーカープール向けにscripts/ディレクトリ(control.sh、public_quick.sh、…)に残されています。
推論プロトコル (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にバインドします。公開URLを公開するのは、クイックトンネルスクリプトのみです。実際のシークレットを含む
config.jsonやmodel-bindings.jsonをコミットしないでください — このため、このリポジトリにはプレースホルダが同梱されています。Linuxではサンドボックス化されたコマンドを
/bin/setprivを使用してcommandUserに切り替え、その他のプラットフォームでは現在のユーザーとして実行されます。
DSH ⇄ ChatGPT Fusionは、コミュニティブリッジであり、OpenAIまたはDeepSeekとは提携も承認もされていません。ChatGPTの利用には、OpenAIのサービス利用規約が適用されます。
This server cannot be deployed
Maintenance
Related MCP Connectors
Agent-to-agent reasoning-as-a-service: chain-of-thought, analysis, and decision support.
Web search, browser automation, scraping, crawling and CAPTCHA solving for AI agents.
Durable memory, headless browser and research for agents. Pay per call: x402 USDC on Base or credits
Let your AI agent operate any website through a real, logged-in browser session.
Related MCP Servers
- AlicenseNot gradedqualityAmaintenanceBridges Cursor IDE Agent with ChatGPT Web for external reasoning, research, and review.18 npmMIT
- AlicenseNot gradedqualityAmaintenanceEnables local coding agents to delegate reasoning, planning, review, derivation, and diagnosis tasks to ChatGPT Web through Chrome DevTools Protocol, with security guards and evidence-based verification.1MIT
- 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 hosts like Claude Code, Codex, Antigravity and Grok to dispatch tasks to DeepSeek Harness agents while still showing them as native subagents with live progress, tier/effort presets, escalation, dispatch guardrails and a jobs board. Also lends text-only harnesses vision and image generation through DeepSeek's VL model or existing CLIs and custom OpenAI-compatible endpoints.354 npmMIT