# Let Claude Code and Grok Build Reach Your Localhost: Public URLs for AI Agents

Claude Code and Grok Build run on your machine, so they can only see localhost — until something gives your local app a public HTTPS URL.

Source: https://proxvn.io.vn/blog/claude-code-grok-build-access-localhost-proxvn

> **TL;DR:** Claude Code and Grok Build run on your machine, so they can only see ` localhost ` — until something gives your local app a public HTTPS URL. ProxVN's ` proxvn mcp ` command turns the tunnel into MCP tools your agent can call itself: one command wires it up, then the agent opens tunnels, tests webhooks and hands you the link. No router config, no account needed to start.

![How an AI agent opens a ProxVN tunnel through MCP](https://raw.githubusercontent.com/hoangtuvungcao/proxvn-blog-images/main/claude-code-mcp-flow.png) *How it works: the agent calls ProxVN's MCP tools and opens the tunnel itself — you just ask in plain language.*

## Why your agent can't see localhost

You ask Claude Code to build a small web app, it starts a dev server on port 3000, and then you want to open it on your phone, send the link to a teammate, or point a Stripe webhook at it. The agent can't do any of that with ` http://localhost:3000 ` — that address only exists on your own machine. Anything outside your laptop needs a real public URL with a real certificate.

Until recently the standard answer was "deploy it somewhere first", which defeats the point of iterating locally. A tunnel fixes this: a small client on your laptop opens an outbound connection to a public server, which hands back a public URL that forwards to your local port. The agent just needs a way to open that tunnel without you typing the command for it.

## The two-minute setup

Install ProxVN. On Linux, macOS or Android (Termux):

```
curl -fsSL https://proxvn.io.vn/install.sh | sh
```

On Windows, in PowerShell:

```
irm https://proxvn.io.vn/install.ps1 | iex
```

Then connect it to Claude Code with one command:

```
claude mcp add proxvn -- proxvn mcp
```

That's it. Restart Claude Code, run ` /mcp `, and ` proxvn ` shows up in the server list. For Grok Build (the new name for Cursor since 30 November 2026 — from 7 December you tag ` @Build ` instead of ` @Cursor `), Claude Desktop, Codex or any other MCP client, add this to the MCP config file instead:

```
{
  "mcpServers": {
    "proxvn": { "command": "proxvn", "args": ["mcp"] }
  }
}
```

I checked this against ProxVN's own MCP docs on 3 December 2026 — the command above is exactly what the docs print, and the tool list below is copied from the same page, not from memory.

## What the agent can actually do

Once connected, your agent gets five tools:

| Tool | What it does |
| --- | --- |
| ` start_tunnel ` | Open an ` http `, ` tcp ` or ` udp ` tunnel for a port and return the public URL |
| ` list_tunnels ` | List the tunnels currently open |
| ` stop_tunnel ` | Close a tunnel by id |
| ` check_local_port ` | Check whether your local app is actually listening before exposing it |
| ` server_status ` | ProxVN server status |
| ![ProxVN MCP tools list](https://raw.githubusercontent.com/hoangtuvungcao/proxvn-blog-images/main/mcp-tools-list.png) |  |

*The five tools the ProxVN MCP server actually exposes — captured from a real tools/list response (ProxVN 9.1.5).* So the conversation becomes: "expose this dev server so I can open it on my phone" — and the agent starts the tunnel, reads the URL back, and pastes it into its reply. When you're done, "close the tunnel" shuts it down. The agent can also check first that your app is really listening, instead of handing you a URL that 502s.

Two limits worth knowing before you rely on this daily. First, in ProxVN 9.x, tunnels the agent opens are anonymous — the MCP server does not forward the API key you saved with ` proxvn login `. That means the URL changes every time the tunnel restarts. If you need a stable address, open the tunnel yourself from the terminal first (see below) and give that URL to the agent instead. Second, tunnels are public by design: only let the agent expose development apps, never a service holding real user data.

## Or do it by hand: one command, one URL

If you prefer to stay in control, skip MCP and run the tunnel yourself:

```
proxvn http 3000 --subdomain myapp
```

Your app is now at ` https://myapp.proxvn.io.vn `. A free ProxVN account gives you 10 tunnels and 3 fixed subdomains, so ` myapp ` stays yours across restarts — paste it into your MCP config once and it keeps working. Without an account the URL is random and changes on restart, which is fine for a quick test. Either way, there is no paid plan involved: ProxVN is free, the only difference between anonymous and account use is the limits and the warning page anonymous tunnels show to browser visitors.

## A real flow: test a webhook without deploying

This is the use case that made me write this post. Your agent builds a small endpoint — say a Stripe webhook receiver on port 3000. You ask it to expose the port, it calls ` start_tunnel `, and you get back something like ` https://abc123.proxvn.io.vn `. Paste that URL into the webhook settings of the service you're testing, trigger a test event, and watch the request arrive in your local terminal. ProxVN also supports WebSocket and server-sent events over HTTP tunnels, so live-reload dev servers and streaming responses keep working through the tunnel instead of silently breaking.

## What breaks, and the fix

**"The agent says the tunnel is up, but the URL returns nothing."** The local app probably isn't listening yet. Ask the agent to run ` check_local_port ` first, or test it yourself with ` curl http://localhost:3000 ` before exposing the port.

**"The URL worked yesterday and is dead today."** Anonymous tunnels get a new address on restart, and a laptop that slept kills the tunnel process. Either keep the machine awake while you demo, or use a free account with ` --subdomain ` so the address survives restarts.

**"I want the agent to use my fixed subdomain."** It can't — not in 9.x. Open the tunnel from your own terminal with ` proxvn http 3000 --subdomain myapp `, then tell the agent to use ` https://myapp.proxvn.io.vn `. The MCP tools are for tunnels the agent opens itself; the CLI is for tunnels you want to keep.

## FAQ

**Does this work with Codex?** ProxVN's MCP docs list Claude Code, Cursor and Codex — any client that speaks MCP over stdio works with the same ` proxvn mcp ` command.

**How is this different from ngrok's MCP support?** ngrok shipped an MCP server in November 2026 with nine agent skills, but on its free tier the agent can manage domains and endpoints — it can't open a tunnel. With ProxVN, opening the tunnel is exactly what the free MCP tools do.

**Do I need an account?** No. Install, connect MCP, ask the agent. An account only matters when you want fixed subdomains and higher limits.

## Try it

Install ProxVN, run ` claude mcp add proxvn -- proxvn mcp `, and ask your agent for a public URL for the app on your desk:

👉 [https://proxvn.io.vn/](https://proxvn.io.vn/) — download at [https://proxvn.io.vn/download](https://proxvn.io.vn/download)

*Written by the ProxVN team. Commands verified against the official ProxVN MCP docs (proxvn.io.vn/docs/mcp) and CLI reference on 3 December 2026, ProxVN 9.x.*

**Related reading:** [Expose Your Local Ollama LLM to the Internet Safely](https://proxvn.io.vn/blog/expose-ollama-llm-to-internet-proxvn) · [Test Webhooks on Localhost](https://proxvn.io.vn/blog/test-webhooks-on-localhost-proxvn) · [What Is ProxVN?](https://proxvn.io.vn/blog/what-is-proxvn-localhost-to-internet-one-command)
