
rustunnel MCP server
Let AI agents open and manage secure HTTP/TCP/UDP tunnels to local services over stdio.
Add to your client
Copy the config for your MCP client and paste it into its config file.
brew tap joaoh82/rustunnel && brew install rustunnelPaste into ~/Library/Application Support/Claude/claude_desktop_config.json
{
"mcpServers": {
"rustunnel-mcp-server": {
"command": "rustunnel-mcp",
"args": [
"--server",
"edge.rustunnel.com:4040",
"--api",
"https://edge.rustunnel.com:8443"
],
"env": {
"RUSTUNNEL_TOKEN": "<your-token>"
}
}
}
}Step-by-step guides: Add to Claude Desktop · Add to Cursor · Add to Windsurf
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
About rustunnel MCP server
rustunnel-mcp is the Model Context Protocol server bundled with rustunnel, a self-hosted secure tunnel server written in Rust. The MCP server speaks stdio and lets AI agents open and manage public tunnels to local HTTP/TCP/UDP services on demand — for example to test webhooks, share a local demo over HTTPS, or expose a service from a cloud sandbox. It works with any MCP harness (Claude Code, Claude Desktop, Codex, Cursor, Windsurf, Cline, and custom agents) and can target the hosted rustunnel edge servers or a self-hosted instance.
Tools & capabilities (6)
create_tunnelOpen a tunnel and return the public URL — supports HTTP/TCP/UDP, P2P, and load-balanced pools with health checks.
list_tunnelsList all active tunnels.
close_tunnelForce-close a tunnel by ID.
list_regionsList available server regions.
get_connection_infoReturn the CLI command for cloud/sandbox agents.
get_tunnel_historyRetrieve past tunnel activity.
When to use it
- Let an AI agent expose a local HTTP service over a public HTTPS URL for webhook testing
- Share a local demo with a public URL on request, then close the tunnel when done
- Expose a local TCP service such as a database to a remote consumer
- Open a tunnel from a cloud/sandbox agent and fetch the CLI command via get_connection_info
- List and force-close active tunnels, or review past tunnel activity
Security notes
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 FAQ
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.
How do I install the MCP server?
Install via Homebrew (`brew tap joaoh82/rustunnel && brew install rustunnel`), which installs rustunnel-mcp alongside the CLI client; or build from source with `make release-mcp`. There is also a Claude Code plugin (`/plugin install rustunnel`) that configures it automatically.
Alternatives to rustunnel MCP server
Compare all alternatives →Microsoft's official browser-automation MCP using Playwright's accessibility tree (no vision model).
Up-to-date, version-specific library documentation injected into your coding agent.
LSP-powered coding agent toolkit: semantic symbol search, references and structural edits.
Compare rustunnel MCP server with: