About this project

Mac Developer Bridge is an open-source MCP (Model Context Protocol) server that connects ChatGPT to a real Mac execution environment. It exposes deterministic local tools—shell commands, filesystem operations, interactive PTY sessions, background job management, stored Codex thread reading, and optional background Chrome automation—without adding a second reasoning loop. ChatGPT remains the agent; the Mac is the execution environment. Key capabilities include: - Arbitrary shell command execution via /bin/zsh -lc under the logged-in macOS user - Detached background jobs with persistent stdout/stderr logs, status inspection, and process-group termination - Unrestricted file read, write, append, list, stat, copy, move, chmod, symlink, mkdir, and recursive delete - Unified-diff application through git apply - Stored Codex thread discovery and reading without resuming a thread or starting a Codex model turn - Paginated Codex turn retrieval for histories too large for a single response - Local JSONL auditing - Outbound-only private connectivity through OpenAI Secure MCP Tunnel, or a plain-HTTP loopback front end published over HTTPS via Cloudflare Tunnel - Per-user persistence through a macOS LaunchAgent - Fail-closed unlock latch: bridge.mjs re-reads the unlock file before every tool call, so removing it refuses the next call and exits - Local kill switch (scripts/disable.sh) that stops the front end, bridge, optional background-Chrome native host, detached shell_start job groups, interactive PTY sessions, and federated child MCP servers The optional Background Chrome integration operates the same signed-in Chrome profile through a small local extension, keeping automation in the background without stealing focus. It manages a persistent tab pool (default 8, max 32) with lease-based access, idle reclamation after 10 minutes, and self-healing capacity. Direct Chrome control via shell_exec is always refused with CHROME_BACKGROUND_REQUIRED to enforce the no-focus-stealing boundary structurally. Relaxed access is the default for normal HTTP/HTTPS work; Strict approvals mode adds per-site URL grants with 15-minute TTLs. Interactive terminal sessions use a real PTY allocated by a core Perl helper (lib/ptyhelper.pl), with tools for starting, reading, writing, resizing, signaling, and closing sessions. A 1024-byte canonical-mode line limit is enforced, and a fixed ring buffer retains recent output. The project also includes experimental features: a ChatGPT conversation kickoff tool (chatgpt_conversation_start) that starts or continues a consumer ChatGPT conversation through the signed-in page's first-party runtime action without UI typing or credential export, and a separate /v1/responses adapter for explicit OpenCodex models (chatgpt-browser and chatgpt-sol) that rebuilds stateless turns from Responses instructions/input and presents tools through a fixed JSON decision protocol. Security considerations: The bridge deliberately gives an MCP client the effective permissions of the macOS user. It is not sandboxed and has no command or path allowlist. Users are directed to read SECURITY.md before enabling it. Strict approvals mode is available for tighter browser/app workflow control, and the menu-bar app provides a live toggle. The project is released under the MIT License and is an independent open-source project, not an official OpenAI or Cloudflare product.