create_tunnel
Expose a local service to the internet with a public URL for webhook testing, sharing a dev server, or remote localhost access.
Instructions
Open a tunnel to a locally running service and get a public URL. Use this when the user or task needs a public URL for a service running locally — webhook testing, sharing a dev server, or letting another agent or device reach localhost. Spawns the rustunnel CLI as a subprocess — the tunnel stays open until close_tunnel is called or the MCP server exits.
Modes:
protocol='http' → public https:// URL (web/API services)
protocol='tcp' → public host:port (databases, SSH, raw TCP)
protocol='udp' → public host:port (game servers, DNS)
protocol='p2p' → peer-to-peer; requires
secretpluspeer_name(to publish) orpeer_target(to connect)load balancing → set
group+group_key(http/tcp only) to join this tunnel into a load-balanced pool; addhealth_checkto auto-remove sick backends.
The token may be omitted if RUSTUNNEL_TOKEN is configured.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| group | No | Load-balancing pool name. Tunnels sharing the same (group, group_key) form one pool (http/tcp only). | |
| group_key | No | Shared secret for the load-balancing group. Members of one pool must agree on this value. | |
| health_check | No | Optional client-side health probe. The client probes the local service and reports health so the server routes around a sick backend. Only meaningful for load-balanced tunnels (group set). | |
| local_host | No | Local hostname to forward to (default 'localhost'). Use to expose a service on another host in your network. | |
| local_port | Yes | Local port the service is listening on, e.g. 3000 | |
| peer_name | No | P2P publisher mode: publish the local service under this name. | |
| peer_target | No | P2P subscriber mode: connect to a published P2P tunnel with this name. | |
| protocol | Yes | Tunnel type | |
| region | No | Region ID (e.g. 'eu', 'us', 'ap'). Omit to auto-select the nearest by latency. Use list_regions to see options. | |
| secret | No | Shared secret for P2P (protocol='p2p'). Publisher and subscriber must use the same value. | |
| subdomain | No | Custom subdomain (HTTP tunnels only). Server assigns a random one if omitted. | |
| token | No | API token. Optional if RUSTUNNEL_TOKEN is set in the MCP client config. |