MCP Directory

How to add rustunnel MCP server to Claude Desktop

Let AI agents open and manage secure HTTP/TCP/UDP tunnels to local services over stdio. Paste the config into ~/Library/Application Support/Claude/claude_desktop_config.json and restart Claude Desktop.

Last updated June 14, 2026 ยท 636โ˜… ยท stdio ยท apikey

Claude Desktop config for rustunnel MCP server

brew tap joaoh82/rustunnel && brew install rustunnel
{
  "mcpServers": {
    "rustunnel-mcp-server": {
      "command": "rustunnel-mcp",
      "args": [
        "--server",
        "edge.rustunnel.com:4040",
        "--api",
        "https://edge.rustunnel.com:8443"
      ],
      "env": {
        "RUSTUNNEL_TOKEN": "<your-token>"
      }
    }
  }
}

Setup steps

  1. 1Open Claude Desktop โ†’ Settings โ†’ Developer โ†’ Edit Config (this opens ~/Library/Application Support/Claude/claude_desktop_config.json).
  2. 2Paste the rustunnel MCP server config below under the top-level "mcpServers" key.
  3. 3Fill in any placeholder secrets (API keys, paths) in the snippet.
  4. 4Save the file, then fully quit and reopen Claude Desktop.
  5. 5Open a chat and confirm rustunnel MCP server's tools appear under the ๐Ÿ”Œ tools menu.

Before you start

  • A rustunnel auth token supplied via RUSTUNNEL_TOKEN (free signup at rustunnel.com, Dashboard -> API Keys, or a self-hosted admin/dashboard token)
  • The rustunnel-mcp binary on PATH (installed via Homebrew alongside the rustunnel CLI, or built from source with `make release-mcp`)
  • Access to a rustunnel server โ€” either the hosted edge servers (e.g. edge.rustunnel.com) or your own self-hosted server

What rustunnel MCP server can do in Claude Desktop

create_tunnel

Open a tunnel and return the public URL โ€” supports HTTP/TCP/UDP, P2P, and load-balanced pools with health checks.

list_tunnels

List all active tunnels.

close_tunnel

Force-close a tunnel by ID.

list_regions

List available server regions.

get_connection_info

Return the CLI command for cloud/sandbox agents.

get_tunnel_history

Retrieve past tunnel activity.

Security

Authentication uses an API token supplied via the RUSTUNNEL_TOKEN environment variable (a rustunnel admin token, or a token created via the dashboard). Obtain a free token by signing up at rustunnel.com (Dashboard -> API Keys); the token is shown only once. The MCP server connects to the rustunnel control-plane and REST API over TLS (HTTPS). Tunnels expose local services to the public internet, so only tunnel services you intend to make publicly reachable.

rustunnel MCP server + Claude Desktop FAQ

Where is the Claude Desktop config file?

Claude Desktop reads MCP servers from ~/Library/Application Support/Claude/claude_desktop_config.json. Paste the rustunnel MCP server config there under the "mcpServers" key and restart the client.

Is rustunnel MCP server safe to use with Claude Desktop?

Authentication uses an API token supplied via the RUSTUNNEL_TOKEN environment variable (a rustunnel admin token, or a token created via the dashboard). Obtain a free token by signing up at rustunnel.com (Dashboard -> API Keys); the token is shown only once. The MCP server connects to the rustunnel control-plane and REST API over TLS (HTTPS). Tunnels expose local services to the public internet, so only tunnel services you intend to make publicly reachable.

What transport does the MCP server use?

stdio. The rustunnel-mcp binary implements the Model Context Protocol over stdio.

How do I authenticate?

Set the RUSTUNNEL_TOKEN environment variable to a rustunnel auth token. With it set once, the agent never has to pass a token on a tool call. Get a free token by signing up at rustunnel.com, or use your self-hosted admin/dashboard token.

Do I have to self-host a server?

No. The MCP server can connect to rustunnel's hosted edge servers (e.g. edge.rustunnel.com), which the default config targets, or to your own self-hosted rustunnel server.

View repo Full rustunnel MCP server page