Skip to main content
Glama
2025ashore

DSH ⇄ ChatGPT Fusion Gateway

by 2025ashore

DSH ⇄ ChatGPT Fusion Gateway

DeepSeek Harness(DSH)을 단일 에이전트/런타임으로 유지하고, ChatGPT Web을 오직 무상태(stateless)·단일 턴의 추론 공급자로만 사용하는 최소한의 MCP 브리지입니다.

DSH가 에이전트, 도구, 권한, 세션, 컴팩션(compaction), 하위 에이전트, 워크플로, 목표, 그리고 실제 파일/셸 실행을 담당합니다. 게이트웨이는 단순히 불변(immutable) DSH 컨텍스트 스냅샷 하나를 ChatGPT "Brain" 대화로 전달하고, 정확히 하나의 결정 — 최종 답변 하나, 작업 제안 하나, 또는 제한된 읽기 전용 배치(read-only batch) — 를 돌려받을 뿐입니다. 게이트웨이는 제안된 작업을 스스로 실행하지 않습니다.

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로 재시도는 멱등성을 보장합니다.

  • 멀티 워커 장애 조치(failover) — 여러 Brain 대화가 동일한 모델 라우트를 대체할 수 있으며, 중단된 클레임은 해제되어 교체된 nonce와 함께 대기 중인 정상 워커로 재전달됩니다.

  • OAuth 2.0(루프백) — 공용 ChatGPT 커넥터(/brain-mcp)에 대한 선택적 인증을 지원하며, 액세스/리프레시 토큰이 순환됩니다.

  • 크로스 플랫폼 — 게이트웨이와 Node 데몬은 Linux, macOS, Windows에서 모두 동작합니다.

  • 선택적 브라우저 웨이크 — Chrome 확장 프로그램(browser-autowake/)이 루프백 큐 메타데이터를 폴링하고, 대기 중인 작업이 있을 때 특정 라우트에 바인딩된 Brain 탭을 활성화합니다.

Related MCP server: chatgpt-mcp

요구사항

  • Node.js 18 이상 (전역 fetch 사용).

  • 워크스페이스 도구에 필요한 git(그리고 Linux에서는 설정된 command user).

DSH 자체는 DSH 전용 에이전트 루프와 도구 런타임에 반드시 있어야 합니다. 게이트웨이는 DSH에 번들된 node_modules를 자동으로 감지하거나, DSH_NODE_MODULES 환경 변수로 해당 위치를 지정할 수 있습니다.

빠른 시작

git clone <your-repo-url>
cd dsh-chatgpt-mcp
npm install

실제 자격증명 정보를 config.jsonmodel-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

의미

host / port

루프백 바인딩 주소 (기본값 127.0.0.1:7688).

workspaceRoot

도구가 접근할 수 있는 프로젝트 워크스페이스. .은 프로젝트 루트.

ownerPassword

OAuth 인증을 위한 소유자 암호 (16자 이상).

staticToken

루프백 CSV에서 Brain MCP용 정적 베어러 토큰 (32자 이상).

allowedPrograms

워크스페이스 run_command 도구가 실행할 수 있는 실행 파일.

commandUser

Linux 전용: setpriv를 통해 샌드박스 명령이 사용하는 사용자.

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 기반 스크립트(control.sh, public_quick.sh, …)는 Cloudflare quick-tunnel 및 헤드리스 Chrome 워커 풀을 위해 scripts/에 남아 있습니다.

추론 프로토콜 (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 snapshot

actionCatalog는 오직 데이터일 뿐이며(데이터만으로 존재), ChatGPT/MCP 도구로 설치되지 않습니다. action_proposal은 DSH가 나중에 자체 권한/샌드박스 정책에 따라 실행하는 후보 제안이며, 게이트웨이는 이를 실행하지 않습니다.

공개 엔드포인트는 GET|POST /brain-mcp입니다. 이전의 /mcp 경로는과 /fusion/tasks… 경로는 사용 중지 상태(HTTP 410)를 반환합니다.

권한

네이티브 3단계 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의 서비스 약관이 적용됩니다.

A
license - permissive license
Not graded
quality - not tested
C
maintenance

Maintenance

Maintainers
Response time
Release cycle
Releases (12mo)
Commit activity

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

View all related MCP servers

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…

View all MCP Connectors

Latest Blog Posts

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