Skip to content

Get started

Prebuilt binaries for Linux and macOS (amd64/arm64) are attached to each GitHub release, along with a checksums_<os>_<arch>.txt per platform — verify with shasum -a 256 -c checksums_<os>_<arch>.txt before unpacking.

With Go 1.26+:

Terminal window
go install github.com/terragohan/mcptunnels/cmd/mcptunnel@latest

One command. expose spawns your server, bridges stdio to HTTP, and dials outbound to the hosted relay — no inbound ports, works behind NAT:

Terminal window
mcptunnel expose -- npx -y @modelcontextprotocol/server-everything

It prints the public endpoint and password, and holds the tunnel open:

https://tunnel.mcptunnels.xyz/t/q-3k9x2mab7c/s/mcp
password: 9f2c1ab4e7d03815a6c02b94

By default expose tunnels through the hosted instance at https://tunnel.mcptunnels.xyz. Pass --server only to use a different relay (for example your own self-hosted tunneld).

  • Claude Code: claude mcp add --transport http demo <printed-url>
  • ChatGPT / Cursor / others: add the URL as a remote (streamable HTTP) MCP server. OAuth is on by default — clients discover it automatically and the authorize page asks for the printed password. Use --no-auth for a plain unauthenticated endpoint.

Then call a tool. That’s the whole loop.

Ctrl-C stops everything: expose deletes the tunnel server-side (the URL and password die immediately) and exits if the MCP server exits. After 24 hours the tunnel is deleted automatically if it is still around.

Terminal A — start tunneld (plain HTTP on :8484):

Terminal window
curl -sSL https://raw.githubusercontent.com/terragohan/mcptunnels/main/tunneld.yaml -o /tmp/tunneld.yaml
go run github.com/terragohan/mcptunnels/cmd/tunneld@latest -config /tmp/tunneld.yaml

Terminal B — expose any stdio MCP server through it:

Terminal window
mcptunnel expose --server http://localhost:8484 -- \
npx -y @modelcontextprotocol/server-everything