Private MCP access from ChatGPT

The optional @devctl/provider-openai-mcp-tunnel package connects an OpenAI Secure MCP Tunnel to devctrl's existing controller API. ChatGPT can become your operator conversation without starting a Claude/Codex Control Room session. The controller and tunnel run on your server; your laptop can disconnect.

This is full server operator access, separate from the restricted MCP tools inside a Project. Only devctrl's recovery operator can configure it. Anyone allowed to use the selected OpenAI tunnel can invoke its operator tools. Use a dedicated tunnel and restrict its upstream organization/workspace membership. Tenant-scoped external connectors are not implemented.

Configure

  1. Sign in to devctrl as the server operator. Open Integrations → Private MCP in TUI, web or the desktop client. The same React panel serves all three.
  2. In OpenAI Platform tunnel settings, create or reuse a tunnel. Associate the intended Platform organization and ChatGPT workspace. OpenAI access/plan and workspace restrictions still apply.
  3. Select Configure tunnel and enter its tunnel_ ID (32 lowercase hexadecimal characters after the prefix). Add the Platform organization ID if required.
  4. Select Runtime API key. Enter a restricted runtime key with Tunnels Read and Use. The controller stores it encrypted. A Claude/Codex subscription login is not this API key; an OpenAI admin key is not needed by the daemon.
  5. Select Start operator access. The first start downloads the official runtime into the controller's private cache and verifies both archive and executable SHA-256. Status distinguishes preparation, connection, successful polling, authorization failure and process reconnection.
  6. In ChatGPT, add a custom MCP server, select Tunnel and choose the same tunnel ID. Upstream workspace permissions are separate from devctrl access. Confirm the tunnel's successful polling, then test controller_operations with filter: "version" and call GET /v1/version using controller_request. Linking is complete only after that real tool call succeeds. Devctrl does not create the upstream tunnel or link a ChatGPT account automatically.

OpenAI's current Secure MCP Tunnel guide documents current availability, permissions, workspace associations and setup. The configured runtime key is never printed or sent to a Project. No paid model call is needed to prepare or run the tunnel itself; model/product billing remains with the selected OpenAI surface.

Architecture and boundaries

ChatGPT / supported OpenAI client
              ↓
OpenAI tunnel service
              ↑ outbound HTTPS initiated by your server
Official tunnel-client-runtime
              ↓ private authenticated loopback MCP
devctrl controller → existing operator API handlers → durable server jobs

There is no public MCP listener, port forwarding, public tunnel URL or extra daemon in Project containers. The official runtime needs outbound HTTPS to api.openai.com:443; the initial runtime download needs the official GitHub release/download hosts. These are controller requirements, not a broadening of any Project Internet policy. The private loopback endpoint uses a random per-run header and checks the live operator grant before every request. That header is not a controller credential. The controller token never leaves its process.

The tunnel exposes two tools:

Tool Behavior
controller_operations Discover actual authenticated HTTP operations and schemas, optionally filtered by route name
controller_request Call a discovered operation through the existing operator authentication, validation and business rules

It cannot select an arbitrary origin, run a host shell, read binary transfers or attach WebSocket terminals. Local operator stdio MCP retains its existing CLI, installer and operator-local file tools. Tunnel configuration and controller transfer authority are excluded from the tunnel's own operation catalog. Use the signed-in console to stop or reconfigure the connection.

Tool inputs are bounded to 64 KiB, results to 2 MiB, and concurrent private requests to eight. Operator calls use at most a 110-second local deadline within OpenAI's upstream request budget. A timed-out call might already have queued a job; inspect its status before retrying. Neither devctrl nor its supervisor replays uncertain mutations. Jobs continue server-side after the chat closes; the client must query their status later. This does not add unsolicited pushes to ChatGPT.

Lifecycle, health and cleanup

Enabled configuration persists in the controller database. On controller startup, installed transport packages restore their enabled connections without a TUI, web browser or local client. Stopping access revokes the callback immediately, then stops the supervised runtime. Removing a key also deletes its encrypted controller credential. It does not revoke the upstream OpenAI key or delete the OpenAI tunnel; manage those in Platform.

A separate IPC supervisor owns the official runtime process group. Controller exit or crash closes that lease: the supervisor stops the runtime and removes its private temporary keys. A supervisor crash triggers bounded exponential reconnection; a client startup/download verification failure remains explicit until the operator selects Reconnect. Container shutdown also stops these management processes. Existing Project/native agent processes are unaffected.

Runtime secrets exist only in a fresh owner-private temporary directory with 0600 files. They are passed as file references, not command arguments or shared environment variables. They do not enter reusable images, Project snapshots, session metadata, WebSocket state or provider logs. Official process output is discarded. The UI retains at most 40 sanitized transport event names/timestamps; operation names and outcomes enter the existing audit journal without arguments or response bodies.

"Connected" requires an observed successful OpenAI poll, not just a live process or a listening health port. It does not prove that ChatGPT has linked the tunnel or made a tool call. The last successful poll and last observed tool call are shown separately. A 401/403 points to runtime key, tunnel permissions or organization/workspace associations; it is not a Project permission request.

The shipped runtime is official OpenAI v0.0.16, verified on 2026-10-17. Linux and macOS x64/arm64 controller runtimes are included in the release manifest. Windows clients can use a remote controller; a native Windows controller runtime is not supported by this package yet. See the upstream latest release when updating the package's pinned manifest; upgrading verifies new hashes and flags before changing the pin. This package uses the narrow runtime, not Cloudflare public networking or Harpoon HTTP callouts.

Claude and Antigravity

These clients use MCP too, but this is not the same transport feature:

Client Current official option devctrl status
ChatGPT / supported OpenAI surfaces OpenAI Secure MCP Tunnel with outbound polling Optional package and shared configuration UI implemented; each upstream account/workspace must be linked separately
Claude web Remote HTTPS MCP custom connector, with its supported OAuth or fixed-header authentication No public devctrl MCP endpoint/OAuth server added by this feature; OpenAI tunnel IDs are not Claude connector URLs
Claude CLI / desktop stdio client Local stdio MCP or supported remote transports Existing devctrl operator stdio MCP remains available in a trusted operator environment
Antigravity CLI / IDE Local command/args or remote serverUrl MCP configuration Existing managed Project MCP stays scoped; no equivalent OpenAI-hosted outbound tunnel is claimed

For Claude, see custom remote connectors and Claude CLI MCP. For Antigravity, see official MCP configuration: CLI global configuration uses ~/.gemini/config/mcp_config.json; workspace configuration uses .agents/mcp_config.json. Native CLI version support and actual integration verification remain in the client capability matrix.

Package and API

The provider is an optional controller dependency with manifest kind mcpTunnel. Remove or replace it through the existing provider package loader. An empty DEVCTL_MCP_TUNNEL_PROVIDER_PACKAGES disables this provider family. Missing packages/credentials never prevent normal controller startup. Stop a configured connection before removing its package; durable configuration remains for later reinstallation.

Method Route Purpose
GET /v1/mcp-tunnels Operator-only installed packages, safe configuration, health and bounded lifecycle events
PUT /v1/mcp-tunnels/:id {enabled, settings?, credential?, removeCredential?}; whole settings replacement, encrypted key, explicit start/stop
POST /v1/mcp-tunnels/:id/restart Reconnect the saved enabled transport without changing Project sessions

Examples without credential values:

{"enabled":false,"settings":{"tunnelId":"tunnel_0123456789abcdef0123456789abcdef"}}
{"enabled":true}

These management routes also appear in existing operator stdio MCP API discovery. Do not send a literal API key through chat to call them; enter it in the hidden console field or through a trusted local managed-secret workflow.

Tests

Normal tests mock external infrastructure and never use an OpenAI key. They cover actual process supervision, IPC disconnect/SIGKILL cleanup, private MCP authentication/revocation, malformed/oversized requests, selected tools, encrypted persistence, exact operator ownership, concurrent updates, credential redaction, UI setup and checksum-tamper rejection.

The opt-in official-runtime tests download the pinned public binary, inspect its actual --help, and forward realistic MCP envelopes through a loopback-only upstream fixture. They require no account or paid calls:

DEVCTL_TEST_REAL_MCP_TUNNEL_RUNTIME=1 \
  node --test packages/provider-openai-mcp-tunnel/*.test.mjs

A real ChatGPT connection remains an operator setup/verification step, not a claim inferred from passing fixture tests.