Skip to content

mcptunnels

Give a local MCP server a public URL with one command. No accounts, no signup — tunnels are anonymous, expire after 24 hours, and are OAuth 2.1-protected by default.
Terminal demo of mcptunnel expose
Terminal window
mcptunnel expose -- npx -y @modelcontextprotocol/server-everything
# → https://tunnel.mcptunnels.xyz/t/q-3k9x2mab7c/s/mcp
# password: 9f2c1ab4e7d03815a6c02b94

One command

mcptunnel expose -- <your MCP server> spawns any stdio MCP server, bridges it to Streamable HTTP, and prints a public URL. Nothing to deploy.

No accounts

No signup, no login, no config files. The hosted relay at tunnel.mcptunnels.xyz is the default — or self-host your own tunneld.

OAuth 2.1 by default

Public endpoints are gated behind a password the CLI generates. Clients like ChatGPT, Claude, and Cursor discover the OAuth flow automatically. --no-auth for open URLs.

Ephemeral by design

Tunnels live for 24 hours, then they’re gone. Ctrl-C deletes the tunnel server-side immediately — the URL and password die with your process.

  • Connect ChatGPT, Claude, Cursor, or any remote MCP client to a server running on your laptop
  • Demo an MCP server to a teammate without deploying anything
  • Test a server against a real client during development

Generic tunnels forward raw TCP/HTTP. mcptunnels is MCP-shaped.

mcptunnels ngrok cloudflared bore
Takes an MCP server command ❌ (ports only)
stdio → Streamable HTTP bridging
No account required ❌ (named tunnels)
Self-hostable relay
Ephemeral-by-default URLs ✅ (24h TTL)

If you already have an MCP server listening on a port with its own HTTP transport, a generic tunnel works fine. mcptunnels removes the stdio bridging step and everything around it.

Status: v1. The tunnel data plane is covered by end-to-end tests; compatibility with every major hosted MCP client is not yet exhaustively verified. Bug reports welcome on GitHub.

Where mcptunnels is headed. Roughly ordered; no dates — this is a spare-time project and priorities follow real user pain.

01Shipped

v1 — MVP

  • Anonymous quick tunnels: mcptunnel expose – <cmd> → public URL.
  • No accounts; OAuth 2.1 by default behind a CLI-generated password (–no-auth for open URLs).
  • 24h TTL; a janitor sweeps expired tenants.
  • Self-hosted tunneld: single binary + SQLite, ACME TLS, Docker or bare-metal.
  • End-to-end tested data plane: WebSocket + yamux proxy, stdio bridge, SSE streaming, automatic reconnect.
02Planned

Next: permanent tunnels

The MVP’s ephemerality is the feature that lets us skip accounts — and the first thing real users will outgrow.

  • Named, stable URLs. Claim /<you>/<name> once, keep it across restarts, reboots, and laptop sleeps.
  • Minimal identity. Invite/token-based signup via the CLI — no web app.
  • Multiple services per identity, each with its own stable URL and independent agent keys.
  • CLI lifecycle: list, rotate keys, revoke, delete.
03Future

Then: scalable HTTP services

Today expose bolts a public URL onto a single local process. The destination is making MCP servers easy to run and scale as Streamable HTTP services.

  • stdio → HTTP framework. Embed the bridge as a library: serve any stdio MCP server as Streamable HTTP behind a load balancer.
  • Deployment targets. Recipes and adapters for containers, VMs, and edge platforms like Cloudflare Workers.
  • Lifecycle handled once. Sessions, stateless vs. stateful modes, horizontal scaling semantics solved in one place.
  • Graduation path. Develop against a quick tunnel; deploy to real infrastructure with the same transport.
04Future

Later: richer OAuth

Per-tunnel OAuth 2.1 (discovery metadata, DCR, PKCE) shipped with the MVP. What comes later:

  • Pluggable identity. Today it’s a per-tunnel password page; later, bring-your-own IdP (Google, GitHub, enterprise OIDC).
  • Audience isolation. Tokens scoped to a single tunnel so one compromised credential can’t roam.
  • Identity pass-through. Forward identity headers to the local server so it can make per-user decisions without OAuth code.
  • Generic TCP/HTTP tunneling of non-MCP services (ngrok’s job, done well).
  • A hosted, billing-backed SaaS. (There is a default public relay at https://tunnel.mcptunnels.xyz for convenience — it’s free and best-effort, and self-hosting stays a first-class path.)
  • A web dashboard.

File an issue describing your use case — especially if the MVP’s 24h model is the thing blocking you. That’s the signal that permanent tunnels should move up.