by openai
Customer-run client for Secure MCP Tunnel: connect private or localhost MCP servers to ChatGPT, Codex, the Responses API, and AgentKit without exposing them to the public internet.
# Add to your Claude Code skills
git clone https://github.com/openai/tunnel-clientGuides for using ai agents skills like tunnel-client.
Last scanned: 8/4/2026
{
"issues": [],
"status": "PASSED",
"scannedAt": "2026-08-04T06:27:27.460Z",
"npmAuditRan": true,
"pipAuditRan": true,
"promptInjectionRan": true
}See how tunnel-client compares with popular alternatives.
tunnel-client is an open-source ai agents skill for AI coding assistants such as Claude Code, Codex CLI, and ChatGPT, built by openai. Customer-run client for Secure MCP Tunnel: connect private or localhost MCP servers to ChatGPT, Codex, the Responses API, and AgentKit without exposing them to the public internet. It has 613 GitHub stars.
Yes. tunnel-client passed SkillsLLM's automated security scan — a dependency vulnerability audit plus prompt-injection heuristics — with no high-severity issues. You can read the full report in the Security Report section on this page.
Clone the repository with "git clone https://github.com/openai/tunnel-client" and add it to your Claude Code skills directory (see the Installation section above).
tunnel-client is primarily written in Go. It is open-source under openai on GitHub, so you can review or fork the full source.
Yes. SkillsLLM lists many other AI Agents skills you can browse and compare side by side. Open the AI Agents category from the badge at the top of this page, or use the Related Skills and comparison links further down to weigh tunnel-client against similar tools.
No comments yet. Be the first to share your thoughts!
From $49 · 30 days · terms & refunds
⚠️ Third-Party Software Notice
This skill is third-party open-source software developed and hosted independently on GitHub. SkillsLLM is an informational directory and does not control or maintain the underlying repository.
Any security checks, ratings, or warnings displayed by SkillsLLM are automated and limited in scope. They do not constitute a security certification or guarantee that the software is safe, error-free, or free from malicious code, vulnerabilities, compromised dependencies, or prompt-injection risks.
Review the source code, permissions, dependencies, and configuration before installing or running any third-party skill. Use is at your own risk. To the maximum extent permitted by applicable law, SkillsLLM is not liable for losses arising from third-party software.
Automated security scan — not a certification.
tunnel-client is the customer-run agent behind Secure MCP Tunnel. It connects
a private or localhost MCP (Model Context Protocol) server to ChatGPT, Codex,
the Responses API, and AgentKit through an OpenAI-hosted MCP tunnel endpoint,
while keeping the MCP server off the public internet.
This CLI and its Go SDK run beside your private MCP server.
Applications call the OpenAI-hosted /v1/mcp/{tunnel_id} endpoint through their
MCP transport; the runtime receives those requests and delivers responses.
The poll/response endpoints are the runtime's queue protocol for client
implementers. See the architecture for the request flow
and the protocol when building a compatible runtime.
Use it when:
/healthz, /readyz, /metrics,
and /ui before a connector or API call depends on it.If you searched for "secure MCP tunnel", "MCP tunnel ChatGPT", "connect local
MCP server to ChatGPT", "connect local MCP server to Codex", "localhost to
ChatGPT", or "Codex local MCP", start with tunnel-client help quickstart,
then read the onboarding guide below.
docs/onboarding.md.docs/architecture.md.docs/permissions.md.docs/deployment/overview.md.docs/troubleshooting.md.docs/protocol.md and use
docs/openapi.json. Optional client features use the
common X-Tunnel-Client-Capabilities header.--mcp.forward-trace-context to carry W3C trace context in MCP params._meta
over stdio and Streamable HTTP.
Opt-in local span export uses
--tracing.enabled --tracing.file=/private/new-trace.jsonl. Complete traces
require compatible service queue handoff and caller parent propagation first.--forward-request-id=mcp,harpoon to include Harpoon REST
requests, --forward-request-id=mcp,oauth to include eligible queued OAuth
discovery requests, or --forward-request-id=none to disable
automatic forwarding.
The same setting is available as FORWARD_REQUEST_ID or top-level YAML
forward_request_id; see request ID forwarding.examples/go-sdk-inmemory.With a runtime API key and tunnel ID, run the built-in server_info, echo,
and uppercase tools without a separate MCP server:
export CONTROL_PLANE_API_KEY="sk-..."
export CONTROL_PLANE_TUNNEL_ID="tunnel_0123456789abcdef0123456789abcdef"
tunnel-client run --embedded-stateless-mcp-stub --health.listen-addr 127.0.0.1:0
--embedded-stateless-mcp-stub uses stateless MCP handling even when a client
sends initialize and notifications/initialized. It issues no MCP session
ID, and these demo tools do not require MCP session affinity between processes.
OAuth and application state have separate requirements.
--embedded-mcp-stub keeps its existing compatibility behavior: legacy
initialization and session requests use stateful handling; self-contained
modern discovery and tool requests use stateless handling. Choose one embedded
mode per run. Both share the embedded listen-address, Unix-socket, server-name, and
server-version options; see embedded demo configuration
for defaults and target conflicts.
The module can run in the same process as a Go MCP server. The MCP server does
not need to bind a port or use stdio: give the server side of an in-memory MCP
transport pair to your server and the client side to tunnelclient.New.
go get github.com/openai/tunnel-client
import (
"context"
"github.com/modelcontextprotocol/go-sdk/mcp"
tunnelclient "github.com/openai/tunnel-client"
)
ctx := context.Background()
server := mcp.NewServer(&mcp.Implementation{Name: "my-server", Version: "1.0.0"}, nil)
serverTransport, tunnelTransport := mcp.NewInMemoryTransports()
go server.Run(ctx, serverTransport)
client, err := tunnelclient.New(tunnelclient.Config{
TunnelID: "tunnel_0123456789abcdef0123456789abcdef",
APIKey: apiKey,
}, tunnelTransport)
if err != nil {
return err
}
return client.Run(ctx)
The runnable Go SDK example registers an echo
tool and connects it to the OpenAI Tunnel control plane.
developers.openai.com/api/docs/guides/secure-mcp-tunnelsdocs/end-user-guide.mddocs/onboarding.mddocs/permissions.mddocs/architecture.mddocs/connectors.mddocs/protocol.mddocs/openapi.jsondocs/enterprise-customer-onboarding.mddocs/configuration.mddocs/deployment/overview.mddocs/deployment/cloudflared.mddocs/troubleshooting.md, including
DNS diagnostic logs for Android / Termux.docs/development.mdexamples/go-sdk-inmemorydocs/roadmap.mdOn macOS, Homebrew is the supported installation path. Directly downloaded
release ZIPs are not currently notarized and can be blocked by Gatekeeper. If
a manually downloaded archive is blocked, do not use xattr, spctl, or
Open Anyway to bypass the check; install from the official OpenAI tap
instead:
brew install openai/tools/tunnel-client
Verify the installed version, then start with the guided setup:
tunnel-client --version
tunnel-client help quickstart
The Formula installs the matching tunnel-client, bundled cloudflared,
and companion manifest together, while exposing only the tunnel-client
command. It also installs Bash, Zsh, and Fish completions for that version.
If your shell does not load them automatically, follow
Homebrew's shell completion setup.
For Docker, Kubernetes, or VM deployments, see
docs/deployment/overview.md.
To generate the shareable guide output locally:
make end-user-guide-screenshots
make end-user-guide-html
make end-user-guide-slides
The Homebrew Formula supports brew services. It supervises
tunnel-client run using the profile at
$(brew --prefix)/etc/tunnel-client.yaml, starts at login, and restarts the
runtime after it exits. Installation and upgrades do not create or replace
that profile.
First, select the profile you already configured. If it belongs to a managed
alias, find its profile_path with tunnel-client runtimes status <alias> --json,
then run tunnel-client runtimes stop <alias> before starting the service.
Copy the profile to the service location, preserving your custom settings:
service_profile="$(brew --prefix)/etc/tunnel-client.yaml"
if [ -e "$service_profile" ]; then
cp -p "$service_profile" "$service_profile.backup.$(date +%Y%m%d%H%M%S)"
fi
install -m 600 /absolute/path/to/existing-profile.yaml "$service_profile"
Use absolute paths in this profile, including paths to MCP executables,
working directories, and secret files. The service includes Homebrew's bin
and sbin on PATH, but does not load your interactive shell configuration.
Replace shell-only env: references with persistent references