Skip to main content

Quickstart

Get a public URL for your local MCP server in under a minute. The CLI creates your account and your tunnel for you — no manual signup, no copying tokens.

1. Install the CLI

npm install -g @alexdive/mcp-gw

(See Installation for platform-specific notes.)

2. Start your local MCP server

Any MCP server reachable over HTTP on a local port. If your MCP server speaks stdio (most reference servers do), wrap it with supergateway — see Examples.

For this quickstart, assume it's listening on http://localhost:8080.

3. Open a tunnel

mcp-gw create --target http://localhost:8080

On the first run the CLI registers an account for you and stores the credentials in ~/.mcp-gateway/credentials.json (email, password, API key) — there's nothing to copy by hand. It then creates a tunnel and prints:

Tunnel ready:
id: ab12cd34...
publicUrl: https://ab12cd34....mcp-gateway.info/
target: http://localhost:8080
WS connected. Press Ctrl+C to exit.

Leave it running — that terminal is your agent. Press Ctrl+C to stop.

Omit --target and the CLI prompts for it (default http://localhost:8080). On a fresh tunnel it may also ask for an optional label — press Enter to skip, or type a name to recognise the tunnel later.

4. Use the public URL

https://<YOUR_TUNNEL_ID>.mcp-gateway.info/mcp

Paste this URL into Claude (see Connect from Claude), Cursor, or any MCP client. Every request hits your local MCP server through the tunnel.

Managing multiple tunnels

You can keep as many tunnels as you like — e.g. one per project.

Pick from a menu. Run create with no --id/--new and the CLI lists your existing tunnels and offers to reconnect one or make a new one:

mcp-gw create
Select a tunnel to reconnect, or create a new one
1) weather
id: ab12cd34...
publicUrl: https://ab12cd34....mcp-gateway.info/
target: http://localhost:9001
status: inactive
2) + Create a new tunnel
Select [1-2] [2]:

Each tunnel's target and label are remembered locally in ~/.mcp-gateway/tunnels.json, so the menu shows where every tunnel forwards.

Reconnect a specific tunnel (no menu) — reuses its saved target:

mcp-gw create --id <TUNNEL_ID>

Always create a new tunnel (skip the menu), with a label:

mcp-gw create --new --target http://localhost:8080 --label my-server

List your tunnels:

mcp-gw list

Delete a tunnel (asks which if you omit --id):

mcp-gw rm --id <TUNNEL_ID>

Logs

Open the admin UI and sign in with the email/password the CLI generated for you (run mcp-gw whoami to print them). The Logs tab shows live requests: method, path, status code, duration, and body size.