Skip to main content
Glama

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 secret plus peer_name (to publish) or peer_target (to connect)

  • load balancing → set group + group_key (http/tcp only) to join this tunnel into a load-balanced pool; add health_check to auto-remove sick backends.

The token may be omitted if RUSTUNNEL_TOKEN is configured.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
groupNoLoad-balancing pool name. Tunnels sharing the same (group, group_key) form one pool (http/tcp only).
group_keyNoShared secret for the load-balancing group. Members of one pool must agree on this value.
health_checkNoOptional 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_hostNoLocal hostname to forward to (default 'localhost'). Use to expose a service on another host in your network.
local_portYesLocal port the service is listening on, e.g. 3000
peer_nameNoP2P publisher mode: publish the local service under this name.
peer_targetNoP2P subscriber mode: connect to a published P2P tunnel with this name.
protocolYesTunnel type
regionNoRegion ID (e.g. 'eu', 'us', 'ap'). Omit to auto-select the nearest by latency. Use list_regions to see options.
secretNoShared secret for P2P (protocol='p2p'). Publisher and subscriber must use the same value.
subdomainNoCustom subdomain (HTTP tunnels only). Server assigns a random one if omitted.
tokenNoAPI token. Optional if RUSTUNNEL_TOKEN is set in the MCP client config.
Behavior4/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations provided, the description discloses that it spawns a subprocess, the tunnel persists until close_tunnel is called or server exits, and token can be omitted if environment variable is set. No destructive behavior is indicated.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is relatively long but well-structured with sections for modes and load balancing. Every sentence adds value, though some details could be more concise. Overall, it is efficiently organized.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness5/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the tool's complexity (12 parameters, nested objects, multiple modes, no output schema), the description thoroughly covers functionality, usage scenarios, and configuration. It provides sufficient context for correct agent invocation.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 100%, so baseline is 3. The description adds significant context beyond schema by explaining protocols, load balancing, P2P modes, and health check details, enhancing understanding of parameter usage.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the tool opens a tunnel to a locally running service and provides a public URL. It lists protocols and modes, distinguishing it from sibling tools like close_tunnel and list_tunnels.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description explicitly specifies when to use this tool (e.g., webhook testing, sharing dev server). It details different protocol use cases and load balancing, but does not explicitly state when not to use it or mention alternatives.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Install Server

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/joaoh82/rustunnel'

If you have feedback or need assistance with the MCP directory API, please join our Discord server