Connections

OpenAI Secure MCP Tunnel setup

Set up OpenAI Secure MCP Tunnel in RepoTunnel v0.4.2: client installation, tunnel IDs, restricted runtime keys, ChatGPT connection, and pause or resume.

Guides follow the current project source. Check the release notes for your installed version.

Secure Tunnel vs Direct HTTPS

OpenAI Secure MCP Tunnel is an optional, outbound-only connection from a private RepoTunnel gateway to OpenAI's hosted tunnel. You do not need an inbound firewall port, public hostname, ngrok, Cloudflare, or Direct HTTPS for this route.

This is a separate transport from the public HTTPS MCP endpoint. ChatGPT tool arguments and responses transit OpenAI's hosted tunnel; the project is not guaranteed to remain entirely local. Platform/ChatGPT account availability, permissions, and provider limits still apply.

  • Choose Secure Tunnel when your network allows outbound HTTPS and your OpenAI organization/workspace has tunnel access.
  • Choose ngrok, Cloudflare Tunnel, or Direct HTTPS when you need a publicly reachable MCP endpoint, including for public plugin distribution.
  • Do not paste a private 127.0.0.1 MCP endpoint into ChatGPT's Tunnel connection field.

1 Create and scope the tunnel in OpenAI Platform

Open the OpenAI Platform Tunnels settings in the intended Platform organization. Create or select an existing tunnel, then copy its complete tunnel ID. Associate it with the ChatGPT workspace that will use RepoTunnel; an association only with your personal Platform organization may not make it visible in another workspace.

  1. Confirm that the intended organization or workspace supports Secure MCP Tunnel.
  2. Create or select a tunnel in Platform Tunnels settings, and associate the intended ChatGPT workspace.
  3. Copy the complete tunnel ID shown by Platform; retain its exact prefix and any namespace.
  4. Ask the organization owner/admin for Tunnels Read + Manage to create/edit and Tunnels Read + Use to run/select the tunnel. ChatGPT custom MCP permission is separate.

2 Install the official client

In RepoTunnel v0.4.2, open Connect → OpenAI Secure Tunnel. If the client is missing on a supported Linux or Windows system, choose Install verified official client. RepoTunnel downloads its supported, pinned OpenAI v0.0.18 run-only archive and verifies the official checksum before installing to a private user directory. The download does not start a tunnel or require administrator permissions.

If a supported official tunnel-client is already installed, RepoTunnel detects it instead of overwriting it. On macOS, use OpenAI's supported Homebrew installation; RepoTunnel does not encourage bypassing Gatekeeper for the unnotarized ZIP.

  1. Open Connect in RepoTunnel and locate OpenAI Secure Tunnel.
  2. Linux/Windows: if available, click Install verified official client, then wait for the installed/detected runtime status.
  3. macOS: use the official Homebrew installation command shown below, then reopen/refresh RepoTunnel if the runtime is not detected.
  4. Check that RepoTunnel reports an available client version before proceeding.
Code
brew install openai/tools/tunnel-client
Note

The Homebrew command is for macOS. Never download arbitrary repackaged client binaries or bypass Gatekeeper to work around verification.

3 Create a restricted runtime API key

Create a restricted API key in OpenAI Platform with Tunnels Read + Use permission. A tunnel ID identifies the tunnel; it is not an API key and cannot authenticate tunnel-client by itself.

Treat the runtime key as a secret. Enter it only in RepoTunnel's local Connect panel. Do not paste real credentials into a chat, project file, screenshot, example command, or bug report.

  1. Open OpenAI Platform API keys in the correct organization.
  2. Create a restricted runtime key with Tunnels Read + Use rather than an unrestricted admin key.
  3. Keep the tunnel ID and runtime API key distinct; store the latter privately until you enter it in RepoTunnel.

4 Connect through RepoTunnel

Start RepoTunnel's local MCP gateway and approve the intended project. In Connect → OpenAI Secure Tunnel, enter the complete tunnel ID and runtime API key, then choose Connect OpenAI tunnel.

Wait until the panel reports Connected rather than merely Starting. If the app displays its local tunnel dashboard address, use it to inspect readiness. Keep both RepoTunnel and tunnel-client running while ChatGPT discovers tools or sends requests.

  1. Start the local gateway and confirm the intended project is approved.
  2. Enter the tunnel ID and restricted runtime key into the local Secure Tunnel panel.
  3. Click Connect OpenAI tunnel, then wait for Connected and ready.
  4. Inspect the client dashboard/readiness when offered; resolve network errors before proceeding.
Note

The local MCP gateway stays on loopback; the tunnel-client initiates outbound HTTPS to OpenAI. The API key is supplied to the managed client process, not added to your repository.

5 Select Tunnel in ChatGPT

In a ChatGPT workspace with custom MCP access, open Plugins → Add custom MCP server (labels may vary by rollout). Choose Connection: Tunnel, then select the tunnel or paste the exact ID you entered in RepoTunnel.

For RepoTunnel's current process-token-secured local tunnel mode, choose No authentication if offered. The local client supplies the private process-bound header. Do not select the public Direct HTTPS OAuth flow unless you have separately configured a reachable authorization server.

  1. In ChatGPT, create a custom MCP server/plugin and choose Connection: Tunnel.
  2. Select or paste the same tunnel ID that RepoTunnel reports as Connected.
  3. Choose No authentication for this RepoTunnel local tunnel mode; review the security warning before creating the app.
  4. Discover/refresh tools, then request a safe read-only list of approved workspaces and check the real result.

Pause Resume Remember and Disconnect

Use Pause OpenAI tunnel to stop only the outbound client while retaining the rest of RepoTunnel's public connection settings. Resume is available for a paused session with retained credentials. Disconnect is the explicit operation to end the client and forget any remembered tunnel credentials.

On supported Linux systems, Remember in system keyring is opt-in. It saves the tunnel ID and runtime key outside project files in the OS keyring. After restarting RepoTunnel, a remembered connection restores in a paused state: you must explicitly choose Resume. On Windows/macOS the app does not currently claim persistent keyring storage for this optional tunnel.

  • Pause or Disconnect OpenAI tunnel does not turn off ngrok, Cloudflare, or Direct HTTPS.
  • The ordinary session keeps the key in memory and clears it when the app closes if it was not remembered.
  • If AI Access is paused globally, tunnel transport may be online but project tools remain blocked.
  • Disconnect also clears a previously remembered keyring entry.

Network and safety requirements

OpenAI's client needs outbound HTTPS access to api.openai.com:443, or mtls.api.openai.com:443 for supported control-plane mTLS, and local reachability to RepoTunnel. It does not require a public inbound port.

OpenAI publishes tunnel limits for request rate, serialized payload and deadlines. These are service limits, not unlimited traffic. RepoTunnel's no-monthly-tunnel-quota claim describes its own Direct HTTPS route, not the OpenAI-hosted Secure Tunnel.

  • No public hostname or router port-forward is needed for the tunnel path.
  • Credentials and tunnel access remain subject to OpenAI Platform roles and workspace association.
  • Do not publish a runtime key, disable OS safety gates, or expose the local admin dashboard to the public Internet.

Troubleshoot a missing or disconnected tunnel

If ChatGPT cannot see the tunnel, check its associated ChatGPT workspace and your Tunnels Read + Use permission. Organization roles and ChatGPT custom MCP-server permissions are separate. If the client is Starting or Disconnected, inspect RepoTunnel's status and the local dashboard for readiness.

If ChatGPT tries public OAuth discovery while using RepoTunnel's local tunneled MCP path, choose No authentication for this specific mode instead of pasting the public Direct HTTPS endpoint. OAuth authorization servers are not automatically carried through the tunnel.

If tool discovery fails after an app update, refresh the ChatGPT tool list, confirm AI Access is not paused and test a harmless approved-project read. Keep credentials out of logs and support screenshots.

Start typing to search.