MCP Directory

How to add rustunnel MCP server to Cursor

Let AI agents open and manage secure HTTP/TCP/UDP tunnels to local services over stdio. Paste the config into ~/.cursor/mcp.json and restart Cursor.

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

Cursor 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 Cursor → Settings → MCP → Add new MCP server (or edit ~/.cursor/mcp.json directly).
  2. 2Paste the rustunnel MCP server config below into the "mcpServers" object.
  3. 3Fill in placeholder secrets, then save.
  4. 4Cursor reloads MCP servers automatically — check Settings → MCP for a green status dot.
  5. 5Ask Cursor to use one of rustunnel MCP server's tools to confirm it's connected.

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 Cursor

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

Where is the Cursor config file?

Cursor reads MCP servers from ~/.cursor/mcp.json. Paste the rustunnel MCP server config there under the "mcpServers" key and restart the client.

Is rustunnel MCP server safe to use with Cursor?

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