ChatGPT 负责想,你的电脑负责动手。以前你得人肉中转:ChatGPT 里问完方案、复制、粘到终端。这座桥把中转自动化——派活、执行、审查、回传,全程只在 ChatGPT 里打字。 ChatGPT plans, your machine executes. No more copy-pasting between tabs — dispatch, execution, review and results flow back automatically over one encrypted tunnel.
ChatGPT = 项目经理(想方案、派活)|Claude Code = 干活的工程师|Codex = 审查的同事。蓝色向下游派活,绿色原路回传结果。 ChatGPT = PM (plans, dispatches) · Claude Code = engineer (executes) · Codex = reviewer. Blue flows downstream, green flows back.
| AI | 强项Strength | 短板Limitation |
|---|---|---|
| ChatGPT(网页版) | 规划、调研、拆需求Planning, research, task decomposition | 在云端,碰不到你的电脑Cloud-only — can't touch your machine |
| Claude Code(本地) | 真改文件、真跑命令、执行落地Real file edits, real commands | 规划不如 ChatGPTWeaker at planning |
| Codex(本地) | 真改文件、真跑命令、代码审查Real edits, commands, code review | 规划不如 ChatGPTWeaker at planning |
| MCP 工具tool | 作用Purpose |
|---|---|
run_codex | 把任务交给本地 Codex 跑(执行 / 审查)Dispatch a task to local Codex (execute / review) |
run_claude_code | 把任务交给本地 Claude Code 跑(执行落地)Dispatch a task to local Claude Code |
read_file / write_file | 读写 BRIDGE_WORK_ROOT 内的文件Read/write files inside BRIDGE_WORK_ROOT |
list_dir | 列目录,供规划端探索结构List a directory for the planning side |
两个执行工具运行时带 --dangerously-bypass-approvals-and-sandbox(Codex)与 --dangerously-skip-permissions(Claude Code)。含义很直接: Both executors run with --dangerously-bypass-approvals-and-sandbox (Codex) and --dangerously-skip-permissions (Claude Code). Meaning: 谁能连到端点,谁就能在你的电脑上跑任意命令、改任意文件。whoever reaches the endpoint can run any command and touch any file on your machine.
这是个人效率工具,不是多人生产服务。请自担风险。A personal productivity tool, not a multi-user service. Use at your own risk.
克隆 + 装依赖(Python 3.10+,mcp[cli] + uvicorn)Clone + install (Python 3.10+, mcp[cli] + uvicorn)
配置 .env:生成纯 hex 的 BRIDGE_PATH_SECRET;CODEX_BIN/CLAUDE_BIN 指向真身二进制(shell 里的 codex/claude 常是函数包装,用 which 找真身)Configure .env: pure-hex BRIDGE_PATH_SECRET; point CODEX_BIN/CLAUDE_BIN at the real binaries (shell wrappers won't work)
起 server:python -m app.bridge_server --http(监听 127.0.0.1:8000)Start the server: python -m app.bridge_server --http (127.0.0.1:8000)
起隧道:cloudflared tunnel --protocol http2 --url http://localhost:8000(http2 是必须的,默认 QUIC 过夜会失活)Start the tunnel with --protocol http2 (QUIC default dies overnight)
ChatGPT → Settings → Connectors → 开发者模式 → 添加 https://xxx.trycloudflare.com/mcp/<密钥>ChatGPT → Settings → Connectors → Developer mode → add the secret URL
| 现象Symptom | 原因 / 解法Cause / fix |
|---|---|
run_codex 报fails with exit=-6 + dyld libllhttp.x.dylib not loaded | Homebrew 升级拽断了 node 的 llhttp 依赖 →upgrade broke node's llhttp → brew reinstall node |
| ChatGPT 声称「被安全检查拦截」但其实没真调claims it was "blocked" without calling anything | 没真发工具调用,自己脑补借口 → 措辞强制点名工具 + 要求原样回贴返回It never sent the call → force name the tool + demand verbatim output echo |
隧道过夜失活,报Tunnel dies overnight with quic: timeout | quick tunnel 默认 QUIC/UDP → 必须加defaults to QUIC → must add --protocol http2 |
| ChatGPT 访问端点gets 404 | 密钥路径含secret path contains _/- 被 URL 规范化吞掉 →normalized away → 必须纯 hex(pure hex via secrets.token_hex) |
| 调本地 codex/claude 没反应Local codex/claude doesn't respond | shell 里是带审批音效的函数包装 → .env 指向真身二进制shell wrappers with approval hooks → point .env at real binaries |
| trycloudflare 地址重启就变address changes on restart | quick tunnel 是临时的 → 配命名隧道绑自己域名is ephemeral → use a named tunnel with your domain |