MCP Directory

How to add rustunnel MCP server to Windsurf

Let AI agents open and manage secure HTTP/TCP/UDP tunnels to local services over stdio. Paste the config into ~/.codeium/windsurf/mcp_config.json and restart Windsurf.

Last updated June 14, 2026 · 636 · stdio · apikey

Windsurf 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 Windsurf → Cascade → the hammer/MCP icon → Configure (or edit ~/.codeium/windsurf/mcp_config.json).
  2. 2Paste the rustunnel MCP server config below.
  3. 3Fill in placeholder secrets, then save.
  4. 4Click Refresh in the MCP panel.
  5. 5rustunnel MCP server's tools become available to Cascade.

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 Windsurf

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 + Windsurf FAQ

Where is the Windsurf config file?

Windsurf reads MCP servers from ~/.codeium/windsurf/mcp_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 Windsurf?

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