{"name":"tunnel-client: Securely Connect Private MCP Servers to OpenAI Services","description":"The `tunnel-client` is an OpenAI-developed client that enables secure connections between private or localhost Model Context Protocol (MCP) servers and OpenAI services like ChatGPT, Codex, and AgentKit. It allows developers to integrate their internal MCP servers without exposing them to the public internet, ensuring enhanced security and operational control. This tool is ideal for scenarios requiring secure access from private networks to OpenAI's powerful AI models.","github":"https://github.com/openai/tunnel-client","url":"https://osrepos.com/repo/openai-tunnel-client","source":"osrepos.com","sourceDescription":"This repository profile is provided by osrepos.com, an open source repository discovery platform.","repositoryProfile":"https://osrepos.com/repo/openai-tunnel-client","generatedFor":"open source discovery and AI-assisted research","markdown":"https://osrepos.com/repo/openai-tunnel-client.md","json":"https://osrepos.com/repo/openai-tunnel-client.json","topics":["Go","OpenAI","ChatGPT","Codex","Agentic AI","Secure Tunnel","CLI","Developer Tools"],"keywords":["Go","OpenAI","ChatGPT","Codex","Agentic AI","Secure Tunnel","CLI","Developer Tools"],"stars":null,"summary":"The `tunnel-client` is an OpenAI-developed client that enables secure connections between private or localhost Model Context Protocol (MCP) servers and OpenAI services like ChatGPT, Codex, and AgentKit. It allows developers to integrate their internal MCP servers without exposing them to the public internet, ensuring enhanced security and operational control. This tool is ideal for scenarios requiring secure access from private networks to OpenAI's powerful AI models.","content":"## Introduction\n\nThe `tunnel-client` is an open-source client developed by OpenAI, designed to securely connect private or localhost Model Context Protocol (MCP) servers to various OpenAI services. This includes ChatGPT, Codex, the Responses API, and AgentKit. It acts as a customer-run agent for the Secure MCP Tunnel, ensuring that your internal MCP servers can interact with OpenAI's platforms without being exposed to the public internet.\n\n## Why Use tunnel-client & Key Benefits\n\nThe `tunnel-client` addresses critical needs for developers and organizations working with OpenAI services, particularly concerning security and network architecture. Here are its key benefits:\n\n*   **Secure Connectivity:** It allows private or localhost MCP servers, whether on a laptop, VM, Kubernetes cluster, or private network, to reach OpenAI-hosted products without requiring new inbound firewall rules or public endpoints.\n*   **Operational Visibility:** The client provides an operator-visible daemon with `/healthz`, `/readyz`, `/metrics`, and `/ui` endpoints, offering insights into its status before any connector or API call depends on it. The admin UI also allows live log level switching and provides redacted support bundles for diagnostics.\n*   **Flexible Deployment:** It supports various deployment scenarios, including Docker, Kubernetes, and VMs, and can even be embedded as a Go SDK within your existing Go processes.\n*   **Integration with OpenAI Ecosystem:** Specifically designed to work seamlessly with ChatGPT connectors, Codex plugins, and other OpenAI APIs, facilitating agentic workflows.\n*   **Robust Debugging:** Features like `tunnel-client doctor` validate configurations, and the admin UI offers live log level switching, redacted support bundles, and Prometheus snapshots for debugging.\n\n## Installation\n\n### Using Homebrew (macOS/Linux)\n\nInstall `tunnel-client` from the official OpenAI tap:\n\nbash\nbrew install openai/tools/tunnel-client\n\n\nVerify the installed version, then start with the guided setup:\n\nbash\ntunnel-client --version\ntunnel-client help quickstart\n\n\n### As a Go SDK\n\nTo embed `tunnel-client` directly into a Go process, you can use it as an SDK:\n\nbash\ngo get github.com/openai/tunnel-client\n\n\n### Building from Source\n\nFrom a source checkout, you can build the client using standard Go tooling or Make targets:\n\nbash\ngo build ./...\ngo test ./...\n\n\nFor the full client, use `make tunnel-client`. For narrow runtime artifacts, use `make runtime` or `make runtime-cloudflared`.\n\n## Examples\n\n### Go SDK Integration\n\nThe module can run in the same process as a Go MCP server. Here's an example:\n\ngo\nimport (\n    \"context\"\n\n    \"github.com/modelcontextprotocol/go-sdk/mcp\"\n    tunnelclient \"github.com/openai/tunnel-client\"\n)\n\nctx := context.Background()\nserver := mcp.NewServer(&mcp.Implementation{Name: \"my-server\", Version: \"1.0.0\"}, nil)\nserverTransport, tunnelTransport := mcp.NewInMemoryTransports()\ngo server.Run(ctx, serverTransport)\n\nclient, err := tunnelclient.New(tunnelclient.Config{\n    TunnelID: \"tunnel_0123456789abcdef0123456789abcdef\",\n    APIKey:   apiKey,\n}, tunnelTransport)\nif err != nil {\n    return err\n}\nreturn client.Run(ctx)\n\n\n### Quickstart with CLI\n\nFor a guided setup and initial configuration, use the CLI's quickstart commands:\n\nbash\ntunnel-client help quickstart\ntunnel-client profiles samples list\ntunnel-client profiles samples show sample_mcp_stdio_local\ntunnel-client init --sample sample_mcp_stdio_local --profile local-stdio --tunnel-id tunnel_0123456789abcdef0123456789abcdef --mcp-command \"python /path/to/server.py\"\ntunnel-client doctor --profile local-stdio --explain\ntunnel-client run --profile local-stdio\n\n\n### Codex Assistant\n\nInteract with the Codex assistant directly from your terminal:\n\nbash\ntunnel-client codex assistant \"Summarize what tunnel-client is doing in this checkout.\"\n\n\n## Links\n\n*   **GitHub Repository:** [openai/tunnel-client](https://github.com/openai/tunnel-client){:target=\"_blank\"}\n*   **Public Secure MCP Tunnel Guide:** [developers.openai.com/api/docs/guides/secure-mcp-tunnels](https://developers.openai.com/api/docs/guides/secure-mcp-tunnels){:target=\"_blank\"}\n*   **Onboarding Guide:** [docs/onboarding.md](https://github.com/openai/tunnel-client/blob/master/docs/onboarding.md){:target=\"_blank\"}\n*   **Architecture Diagrams:** [docs/architecture.md](https://github.com/openai/tunnel-client/blob/master/docs/architecture.md){:target=\"_blank\"}\n*   **Deployment Guides:** [docs/deployment/overview.md](https://github.com/openai/tunnel-client/blob/master/docs/deployment/overview.md){:target=\"_blank\"}\n*   **Troubleshooting:** [docs/troubleshooting.md](https://github.com/openai/tunnel-client/blob/master/docs/troubleshooting.md){:target=\"_blank\"}","metrics":{"detailViews":2,"githubClicks":0},"dates":{"published":null,"modified":"2026-09-02T11:14:44.000Z"}}