Mac Local MCP Bridge
Provides optional developer tools to install npm dependencies and run allowed npm project tasks such as test, build, lint, and typecheck in named workspace subdirectories.
Connects ChatGPT Web to an authorized local workspace through OpenAI Secure MCP Tunnels, exposing MCP tools for workspace file operations, isolated browser automation, and optional project commands.
Click on "Deploy Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@Mac Local MCP Bridgerun the latest npm build command in the project."
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
ChatGPT Web ↔ Mac Local MCP Bridge
A working-source, self-hosted macOS MCP bridge for using ChatGPT Web with an explicitly authorized local workspace.
This repository is now based on the original v0.2.1 Bridge that the maintainer successfully connected to ChatGPT, rather than the earlier independent example. It contains the 17-tool implementation and the original developer-mode upgrade bundle.
Open-source release notes: Personal
config.json, API keys, Tunnel IDs, macOS Keychain data, installednode_modules, local logs and backups were excluded. The publishedsrc/project.mjsalso includes a small security hardening change: it no longer forwards the Tunnel's complete environment to child npm tasks, and it requires a named project subfolder. This public release has not yet been tested end-to-end on a clean Mac. This is a community project, not an official OpenAI app.
Architecture
ChatGPT web (custom MCP plugin)
↓
OpenAI Secure MCP Tunnel (private outbound connection)
↓
tunnel-client on your Mac
↓
node src/server.mjs (stdio MCP server)
↓
Your chosen workspace (default: ~/Desktop/AI-Projects)
├─ read / write approved files
├─ independent Playwright Chromium browser
└─ optional npm tasks and managed development serversThis does not take over your existing signed-in Chrome session or your Mac's native GUI.
Related MCP server: ChatGPT Machine MCP
All 17 tools
Group | Tools |
File workspace (5) |
|
Isolated Playwright (6) |
|
Developer tools (6) |
|
Development commands are disabled by default. npm scripts execute code with your actual macOS account permissions. These tools are not an operating-system sandbox.
1. Requirements
macOS (Playwright Chromium support depends on your macOS version)
Node.js 22+, npm and internet connectivity
An OpenAI Platform Tunnel and a restricted runtime key (Tunnels Read + Use)
A ChatGPT workspace authorized to use custom MCP plugins
Useful docs: OpenAI Secure MCP Tunnels.
2. Install
git clone https://github.com/jinhuanxi/chatgpt-mac-local-mcp-bridge.git
cd chatgpt-mac-local-mcp-bridge
bash setup.commandThe setup script creates config.json from config.example.json, creates ~/Desktop/AI-Projects, installs npm dependencies and a standalone Playwright Chromium, and runs checks. To rerun verification:
npm run checkIf the setup.command script prompts you to press Enter, do so after checking the output.
Before connecting ChatGPT, review the newly generated local-only config.json. For example:
{
"workspaceRoot": "~/Desktop/AI-Projects",
"allowedWebHosts": ["example.com", "localhost", "127.0.0.1"],
"browserHeadless": false,
"allowProjectCommands": false,
"allowedProjectTasks": ["test", "build", "lint", "typecheck"]
}Your actual config.json must stay private and is ignored by Git. Do not give the bridge access to your entire home directory.
3. Establish an OpenAI Secure MCP Tunnel
In OpenAI Platform, create a Tunnel.
Create a least-privilege runtime API key with Tunnel Read + Use. Do not paste the key into ChatGPT, GitHub, or source files.
Install the official
tunnel-clientfollowing upstream instructions.In the newly cloned repository run:
bash connect-tunnel.commandThe script asks for the Tunnel ID, reads the API key without echoing it, initializes a mac-local-mcp profile targeting src/server.mjs, runs a diagnosis, and starts the Tunnel. Keep the terminal open while using this manual setup. If the upstream CLI changes, follow the updated official documentation rather than bypassing doctor errors.
4. Connect ChatGPT Web
In ChatGPT → Plugins, add a custom MCP server using Tunnel, select the corresponding Tunnel, review requested permissions, and publish/enable it as required by your workspace.
Try:
Use Mac Local MCP's workspace_info to show the authorized workspace.
Do not create or modify any file.Then test a safe write in a fresh demo folder. An online indicator alone is not proof: confirm ChatGPT actually calls the tool successfully.
After upgrading tools, open the plugin's Tools → Refresh, enable the newly discovered tools and save changes. ChatGPT may retain an earlier tool snapshot until you refresh.
5. Enable npm development tools only if needed
In your private config.json, set allowProjectCommands to true only after reviewing the risks. Then restart the local server or Tunnel client so the settings reload.
dev_npm_installinstalls packages with npm lifecycle scripts disabled; installed dependencies can still be risky.dev_npm_taskruns onlytest,build,lint, ortypecheckthat is present inallowedProjectTasksand the project'spackage.json.run_project_taskrunstest,build, orlint.dev_server_startattempts to restrict binding to127.0.0.1, but a project script can ignore the host argument.Project commands operate on named subdirectories of the workspace, not the workspace root.
Keep user approval enabled for file writes, package installation, browser actions with external effects and process management. An npm script can access files outside the workspace, even with the restricted task list.
6. Developer-mode upgrade from an older 12-tool installation
The upgrade/ directory includes the original v0.2.1 upgrade sources, and the upgrade script has been adapted to avoid a hard-coded path in someone else's Downloads directory.
Do not run the upgrade script on a fresh clone: this repository already contains all 17 tools. If you have a separate older 12-tool installation, first read upgrade/README.md, stop the Tunnel, back up the old directory and run the upgrade with an explicit target path, e.g.:
bash upgrade/upgrade.command "/absolute/path/to/your/old/mac-local-mcp-bridge"Refresh the ChatGPT plugin's Tools list after restarting your local Tunnel.
7. Auto-start when you sign in to your Mac
The published project includes the working application-level Bridge and a manual Tunnel connection script. It does not upload the maintainer's personal macOS LaunchAgent, runtime key or Tunnel profile. To auto-start on your Mac, set up a per-user launchd LaunchAgent that launches the existing Tunnel profile, reading your runtime key securely (e.g. from macOS Keychain). If your network uses a local proxy, the background service needs that proxy's environment and may need retry logic until the proxy becomes available.
Do not create a second live Tunnel client against the same connection without checking your existing background service.
Safety and testing
Workspace file tools block absolute paths, traversal, hidden paths and symlinks; checks are application-level only and not race-proof.
Browser automation opens a separate Chromium instance and restricts allowed HTTP(S) hostnames; it does not use your Chrome cookies.
npm tasks run as your user and are not sandboxed.
Do not commit or share
config.json, API keys, Tunnel profile YAML,node_modules, backup files or logs.Verified on the owner's Mac: 3 original unit tests passed (0 failures); ChatGPT was able to discover all 17 tool names and invoke an added tool.
Not independently verified: clean-machine installation of the sanitized public version, full Playwright/npm lifecycle flow, login-time autostart, and comprehensive security review.
See SECURITY.md and the original Chinese installation guide (written for the 12-tool baseline).
License
MIT. This project is independent and is not affiliated with or endorsed by OpenAI.
This server cannot be deployed
Maintenance
Related MCP Connectors
Use your Mac, Windows or Linux computer from ChatGPT, Claude or Codex: files, commands, documents.
Work on your own computers from Claude or ChatGPT: run commands, edit and search files.
Remote MCP server exposing your Node Command fleet (files, shell, processes, browser) to AI hosts.
MCP connector that lets ChatGPT list, search, and run your Apple Shortcuts via a local Mac agent
Related MCP Servers
- AlicenseNot gradedqualityCmaintenanceEnables ChatGPT web to safely read and modify only explicitly allowed local project files through OpenAI Secure MCP Tunnel, including git operations, file edits, and running project scripts, while enforcing strict security boundaries.28MIT
- FlicenseBqualityAmaintenanceEnables ChatGPT Web to securely control a trusted local computer through an OpenAI Secure MCP Tunnel, letting it perform file, process, Git, and other system operations on Windows, macOS, and Linux.62-
- AlicenseNot gradedqualityCmaintenanceEnables ChatGPT private connections to a local Mac runtime, letting each project folder be accessed through official OpenAI Secure MCP Tunnels for file edits, shell commands, and Git workflows.Apache 2.0
- AlicenseNot gradedqualityAmaintenanceConnects ChatGPT Web to a local development environment, enabling file reads and patches, shell execution, plan updates, and isolated worktree coordination through permissioned MCP tools.4MIT