ngrok Alternatives in 2026: Picking a Tunnel for AI Coding Agents
ngrok is still a quick way to put a local port on the public internet, but its free plan is now a small allowance: 3 online endpoints, 1 development domain, 3 concurrent agents, 1 GB out and 20,000 HTTP/S requests, as of 2 December 2026. For an AI coding agent the first decision is not which tunnel — it is whether the endpoint should be public at all. A production webhook from a payment or Git provider needs a public HTTPS URL; a preview on your own phone does not, and Tailscale's serve keeps it inside your private network. This guide compares ngrok, Cloudflare Tunnel, Tailscale Funnel, frp and iroh, and shows how to expose an agent endpoint without leaking the key behind it.
QCode is an independent third-party API service, not affiliated with ngrok, Cloudflare, Tailscale or n0. Facts were checked on 2026-12-02 against the official pages linked below.
Updated 2026-12-03
Key facts
- ngrok's free plan on 2 December 2026: $0 plus a $5 one-time credit, 3 online endpoints, 1 development domain, 1 user, 3 concurrent agents, 1 GB out, 20,000 HTTP/S requests, 4,000 requests per minute.
- Cloudflare Tunnel (
cloudflared) is still Cloudflare's tool for publishing an HTTP service; Cloudflare Mesh — the WARP Connector rename announced on 14 April 2026 — is a private network inside Cloudflare One, not a tunnel replacement. - Tailscale Personal costs $0 with up to 6 users and unlimited user devices (checked 2 December 2026);
tailscale servestays inside the tailnet, whiletailscale funnelgives a service a public HTTPS URL. - Tailscale's client line is 1.106.x, with 1.106.2 and 1.106.3 both released on 1 December 2026.
- iroh 1.5.0 shipped on 19 November 2026; it is a Rust QUIC library that dials a peer by public key, not a managed tunnel service.
- ngrok's MCP Gateway launched on 1 December 2026 at $10 per 1 million billable operations, and needs the upstream MCP server to already have a public HTTPS URL.
- A tunnel URL is reachable by anyone who has it: keep the QCode
cr_key in the box's environment (ANTHROPIC_AUTH_TOKENfor Claude Code), never in the URL or a committed file.
Decide first: does the endpoint need to be public?
Choose the tool from the traffic direction, not the vendor list. If something outside your network must open a connection in — a production webhook, a hosted MCP client, a client demo — you need a public HTTPS URL. A post on X in late November 2026 noted that Stripe's CLI can forward webhooks locally for tests (community), but a live endpoint still needs one. If only your own laptop and phone reach the box, a tunnel is the wrong shape.
| What the agent workflow needs | Public URL? | First choice | Watch out for |
|---|---|---|---|
| Receive a production webhook from Stripe or GitHub | Yes | ngrok or Cloudflare Tunnel | Anyone can POST to it; verify the payload signature |
| Open a dev-server preview on your phone | No | tailscale serve |
Phone must be on the same tailnet |
| Send a preview link to someone outside | Yes | Tailscale Funnel or a named Cloudflare Tunnel | Public link; no admin UI behind it |
| Let a hosted MCP client reach a local MCP server | Yes | A tunnel with auth in front (optionally put ngrok MCP Gateway in front once the server is public) | The tunnel authenticates the pipe, not the tool call |
| Administer a dev box or run an agent shell | No | Tailscale SSH or another mesh | Never expose an unauthenticated shell |
| Build P2P into your own agent tool | No | iroh | You are writing the app, not installing a VPN |
The common mistake is reaching for a public tunnel by default. A Claude Code or Codex session on a home machine mostly makes outbound requests; inbound access is needed only for the cases above. For phone access, start with Claude Code remote access over Tailscale.
Many "expose your agent" tutorials instead publish the local HTTP control port an agent listens on, which usually has no authentication. Reach that through a private mesh or an authenticating proxy.
ngrok's free plan on 2 December 2026
ngrok still has a free plan: enough for a short-lived webhook test, not for a team or an MCP endpoint that stays up. Figures below are from ngrok's pricing page, checked on 2 December 2026.
| Limit | Free plan, 2 December 2026 |
|---|---|
| Price | $0, with a $5 one-time credit |
| Online endpoints | 3 |
| Development domains | 1 |
| Users | 1 |
| Concurrent agents | 3 |
| Data transfer out | 1 GB |
| HTTP/S requests | 20,000 |
| HTTP request rate | 4,000 per minute |
For agent work the binding limits are one user, one development domain and 3 concurrent agents. A team where each developer runs a preview hits the user limit immediately, and a preview URL on the shared dev domain is awkward to hand to a client. A post on X in late November 2026 cited the request inspector — seeing the exact headers and body a webhook sent — as the reason ngrok stays open (community discussion).
ngrok is no longer only a tunnel. Its MCP Gateway, launched on 1 December 2026, puts many MCP servers behind one URL and one key at $10 per 1 million billable operations, with initialize, tools/list and denied calls free (ngrok changelog, 1 December 2026). The upstream server must still be publicly reachable, so for a server on your laptop the tunnel remains step one.
Cloudflare Tunnel, Tailscale Funnel and tailscale serve
For most developers the real 2026 choice is Cloudflare Tunnel for a public hostname and Tailscale for anything only your own devices should see.
Cloudflare Tunnel runs cloudflared on the box and publishes an HTTP service through Cloudflare's network. Cloudflare's Mesh documentation still describes Tunnel as the tool for publishing HTTP services, while Mesh handles private IP connectivity between enrolled nodes (checked 2 December 2026). A named tunnel is tied to a hostname on a domain in your Cloudflare account — a post on X in late November 2026 gave that requirement as the reason ngrok stays handy for quick tests (community).
Tailscale covers both cases with two commands. The Personal plan is $0 with up to 6 users and unlimited user devices on Tailscale's pricing page (checked 2 December 2026). On the box:
tailscale up
tailscale status
tailscale serve 3000 # tailnet only
tailscale funnel 3000 # public HTTPS
The syntax has changed across client versions; the current line is 1.106.x as of 2 December 2026, so check tailscale serve --help on the installed build. What matters is the audience: a Funnel URL is as public as an ngrok URL. serve is the safer default for a dev-server preview because the name resolves only inside the tailnet. For the wider comparison see Tailscale vs ZeroTier vs NetBird vs Cloudflare Mesh.
Self-hosted and P2P: frp and iroh
If you already pay for a VPS, frp removes vendor limits; if you are building the tool rather than using one, iroh removes the public URL entirely.
frp is an open-source reverse-proxy tunnel you host yourself. Both ends run on machines you control, one of which needs a public IP, and you own the TLS certificate, authentication and logs. That is why Chinese-language developer forums treat frp on a VPS as a long-running option (community). For a webhook that must stay up for months, you are running internet-facing infrastructure.
iroh is a Rust library from n0, not a tunnel product. Version 1.5.0 shipped on 19 November 2026, and the release post called it the last feature release of 2026. You dial a peer by public key; iroh builds a QUIC connection, punches through NAT where it can and falls back to relays where it cannot. T3 Code uses it to share projects end-to-end encrypted with no account, per a developer post on 1 December 2026 (community). We found no official iroh MCP integration, and a webhook sender needs a stable HTTPS URL. It fits when you control both ends.
Exposing an MCP server or agent webhook safely
A public URL is not the risk; an unauthenticated public URL is. Five rules cover most of the mistakes:
- Authenticate at the endpoint, not at the tunnel. The MCP server or webhook receiver checks a bearer token itself. A long random path segment is not authentication, because URLs end up in logs and chat.
- Keep test tunnels short-lived. Start one for the test, then stop it. A tunnel running for three weeks is an endpoint you have forgotten about.
- Separate inbound from outbound. The receiver accepts a payload and queues work; it should not also hold provider credentials and a shell.
- Leave the provider keys on the box. The agent calls the model API itself, and nothing in that request passes through the tunnel.
- Read the tunnel's request log. It shows what the internet is trying.
The correct shape for rule 4: the key lives in the environment of the process on the box, and the tunnel forwards only the agent's local port.
# on the box that runs the agent; the key never leaves this machine
export ANTHROPIC_BASE_URL=https://api.qcode.cc/api
export ANTHROPIC_AUTH_TOKEN=cr_your_key
claude --model claude-opus-5-5
On QCode, Claude models are served only on the Anthropic endpoint and GPT models only on the OpenAI endpoint (https://api.qcode.cc/openai/v1). That split is a safety property: a tunnel fronting a preview or an MCP server never sees either key, and the box reaches both endpoints outbound with one cr_ key. For MCP setup, see MCP servers for coding agents.
If a key leaked through a tunnel log
Treat any key that appears in a tunnel log, a screenshot or a shared config as compromised, and rotate it. Request logs often record headers alongside the URL, and a public hostname can be scanned soon after it goes live.
Rotation is the cheap path: rotate the key in the QCode dashboard, put the new one on the box, and check recent usage for anything you do not recognise. Do the same for a webhook signing secret and the tunnel's token. The checklist is in API key leak and rotation.
FAQ
Is ngrok still free in 2026?
Yes. As of 2 December 2026 the free plan costs $0 and includes a $5 one-time credit, 3 online endpoints, 1 development domain, 1 user, 3 concurrent agents, 1 GB out, 20,000 HTTP/S requests and a 4,000 request-per-minute rate limit. It is a testing allowance, not a team plan.
What is a good free alternative to ngrok?
It depends on whether the endpoint must be public. For private access from your phone, Tailscale Personal is $0 with up to 6 users and unlimited user devices (checked 2 December 2026), and tailscale serve needs no public URL. For a public hostname, use Cloudflare Tunnel.
Cloudflare Tunnel vs ngrok: which should I use?
Use ngrok for a quick webhook test where you want the request inspector, and Cloudflare Tunnel for a hostname that should stay stable. A named Cloudflare Tunnel needs a domain in your Cloudflare account, which a post on X in late November 2026 cited as the friction that keeps ngrok around (community). The tunnel itself does not authenticate your application; access control is a separate layer.
Tailscale Funnel vs tailscale serve: what is the difference?
tailscale serve publishes a local service to your tailnet only, so only devices signed in to the same network can open it. tailscale funnel publishes the same service on a public HTTPS URL anyone with the link can reach. For a preview on your own phone use serve.
Is it safe to expose an MCP server through a tunnel?
Only if the server authenticates every call itself and its tools are ones you would expose to the internet. A tunnel moves bytes; it does not decide which tool calls are acceptable. Put a bearer token in front, and never expose a server that can run shell commands without its own authorisation check.
Do coding agents need a public URL at all?
Usually not. A Claude Code or Codex session on a box makes outbound requests to the model API and needs no inbound port. A public URL is for a webhook from an external service, a hosted MCP client, or a preview for someone outside your network.
Can I use these tunnels in China?
Reachability of public hostnames varies by network and provider and can change, and free hostnames are reported to flap. Check the vendor's status page for the current state. Self-hosting is outside this article's scope, and this article does not cover access around network restrictions.
Trying agents without a monthly commitment
The tunnel is the cheap part of this stack; model tokens scale with every parallel agent. QCode sells Claude and GPT access as pay-as-you-go packs starting at $4 for $30 of usage, valid 7 days, with one cr_ key for both the Anthropic and OpenAI protocols. Anthropic and OpenAI models bill at official API price ×1.0. See /pricing if the experiment turns into a daily workflow.