tunnel-client: Securely Connect Private MCP Servers to OpenAI Services

This repository profile is provided by osrepos.com, an open source repository discovery platform.

tunnel-client: Securely Connect Private MCP Servers to OpenAI Services

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.

Repository Information

Analyzed by OSRepos on September 2, 2026

Topics

Click on any tag to explore related repositories

Use at your own risk

OSRepos shares public repositories for knowledge and discovery only. Any installation, execution, configuration, or use of code from these repositories is the user's own responsibility. Always review the repository, source code, dependencies, licenses, and security implications before running or installing anything. OSRepos is not responsible for issues, damages, or losses resulting from third-party repositories.

Introduction

The 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.

Why Use tunnel-client & Key Benefits

The tunnel-client addresses critical needs for developers and organizations working with OpenAI services, particularly concerning security and network architecture. Here are its key benefits:

  • 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.
  • 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.
  • 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.
  • Integration with OpenAI Ecosystem: Specifically designed to work seamlessly with ChatGPT connectors, Codex plugins, and other OpenAI APIs, facilitating agentic workflows.
  • 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.

Installation

Using Homebrew (macOS/Linux)

Install tunnel-client from the official OpenAI tap:

brew install openai/tools/tunnel-client

Verify the installed version, then start with the guided setup:

tunnel-client --version
tunnel-client help quickstart

As a Go SDK

To embed tunnel-client directly into a Go process, you can use it as an SDK:

go get github.com/openai/tunnel-client

Building from Source

From a source checkout, you can build the client using standard Go tooling or Make targets:

go build ./...
go test ./...

For the full client, use make tunnel-client. For narrow runtime artifacts, use make runtime or make runtime-cloudflared.

Examples

Go SDK Integration

The module can run in the same process as a Go MCP server. Here's an example:

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)

Quickstart with CLI

For a guided setup and initial configuration, use the CLI's quickstart commands:

tunnel-client help quickstart
tunnel-client profiles samples list
tunnel-client profiles samples show sample_mcp_stdio_local
tunnel-client init --sample sample_mcp_stdio_local --profile local-stdio --tunnel-id tunnel_0123456789abcdef0123456789abcdef --mcp-command "python /path/to/server.py"
tunnel-client doctor --profile local-stdio --explain
tunnel-client run --profile local-stdio

Codex Assistant

Interact with the Codex assistant directly from your terminal:

tunnel-client codex assistant "Summarize what tunnel-client is doing in this checkout."

Links

Related repositories

Similar repositories that may be relevant next.

deja-vu: Retroactive Memory for AI Coding Agents

deja-vu: Retroactive Memory for AI Coding Agents

September 2, 2026

deja-vu is a powerful local-first tool that provides retroactive memory for AI coding agents, indexing past coding sessions from various agents, even those from before installation. This Go binary allows agents to recall relevant information without needing an LLM or embeddings by default. It enhances agent performance by providing context at the point of action, preventing repeated mistakes and improving efficiency.

GoAI Coding AgentsAgent Memory
Agent-Sandbox: Enterprise-Grade Sandbox for AI Agents on Kubernetes

Agent-Sandbox: Enterprise-Grade Sandbox for AI Agents on Kubernetes

August 28, 2026

Agent-Sandbox provides an easy-to-use, enterprise-grade sandbox platform for AI Agents. It allows agents to securely run untrusted LLM-generated code, perform browser and computer use, and deploy websites with multi-session and multi-tenant isolation. This self-hosted solution wraps a robust Kubernetes foundation behind a simple RESTful API, making it accessible for developers.

agentai-sandboxkubernetes-native
DeepSeek-Reasonix: Your AI Coding Agent for the Terminal

DeepSeek-Reasonix: Your AI Coding Agent for the Terminal

August 26, 2026

DeepSeek-Reasonix is an AI coding agent designed for your terminal, offering a stable and persistent environment for development tasks. Engineered with prefix-cache stability, it allows you to leave it running for continuous autonomous operation. This tool integrates seamlessly into various workflows, from CLI to VS Code, enhancing productivity with AI assistance.

ai-agentcoding-agentterminal
GoBooks: A Curated List of Essential Golang Books for All Skill Levels

GoBooks: A Curated List of Essential Golang Books for All Skill Levels

July 20, 2026

GoBooks is a highly popular GitHub repository offering a meticulously curated collection of Golang books, catering to developers from beginners to advanced practitioners. It serves as a comprehensive resource for finding the right learning materials on topics like concurrency, performance, and system design, making it easier to navigate the vast Go ecosystem.

GoGolangBooks

Source repository

Open the original repository on GitHub.

View on GitHub
OS
OSRepos

Analysis and discovery of open source repositories. Find interesting projects and follow their updates.

Monitor your website with YourWebsiteScore

OSRepos shares public repositories for knowledge and discovery only. Any installation, execution, configuration, or use of third-party repository code is at your own risk. Always review source code, dependencies, licenses, and security implications before running anything.

© 2025 OSRepos. Built with Nuxt 3 and lots of ❤️