rustunnel MCP
An MCP server for rustunnel tunnels: the agent opens a local port at a public HTTPS, TCP or UDP address
- 658 ★ on the repository
- Last commit
- AGPL-3.0
Broad access
Why this level
- Exposes a local port at a public address: anyone with the link can reach the service
- The agent itself launches the rustunnel process and picks the port, and the token is stored in the MCP config
Install
- Works in
Manual install
brew tap joaoh82/rustunnel && brew install rustunnelInstalls both the rustunnel CLI and rustunnel-mcp.
Access and checks
How we reviewBroad accessThe tool can change data, run commands or handle secrets.
- Exposes a local port at a public address: anyone with the link can reach the service
- The agent itself launches the rustunnel process and picks the port, and the token is stored in the MCP config
This is third-party code. Review the repository files before installing.
What it does
rustunnel is a tunnel server in Rust: it exposes a local service to the internet over an encrypted WebSocket with TLS. The `rustunnel-mcp` MCP server from the same repository drives it. It gives an agent six tools: create_tunnel, list_tunnels, close_tunnel, get_connection_info, list_regions and get_tunnel_history. After creating a tunnel, the agent gets a public address for HTTP, TCP or UDP, as well as for P2P links and load-balanced pools. That lets you test a local server against webhooks, show a draft build or give access to another agent or device. list_tunnels returns the address of an already open tunnel, list_regions shows the eu, us and ap regions, and get_tunnel_history prints a log of past tunnels. The MCP server itself launches the `rustunnel` CLI and opens the tunnel through it, so both binaries must be in PATH. In a sandbox where the agent cannot spawn processes, get_connection_info returns the CLI command instead of launching. You can connect to the project's managed server or to your own: the addresses are set with the `--server` and `--api` flags.
Who it is for. For developers who test webhooks and demo builds on a local machine and want the agent to open a public address itself.
Good fit when
- You need to test a payment or messenger webhook against a local server and the agent should hand back a public HTTPS address
- You want to show a colleague a draft build on port 3000 without deploying it
- You need to expose a local database or game server over TCP or UDP for the length of a test
- The agent runs in a sandbox and must return a CLI command for you to run on your side
- You run your own tunnel server and want to manage it from the agent
Not a fit when
- The service holds sensitive data and has no authentication: a public address opens it to anyone with the link
- You need a permanent production address: the tunnel is meant for temporarily exposing a local port
- You need a dashboard with metrics and an audit log: the rustunnel server provides it and the MCP server has none
- The environment has no Rust tooling or Homebrew and no way to put binaries into PATH
Example request
Open a tunnel to port 3000 and give me a public HTTPS address so I can test a webhookMCP
- Transport
- stdio
- Authentication
- API key
Environment variables
RUSTUNNEL_TOKENrequired, secret- Access token from the API Keys section of the rustunnel.com dashboard or your own server
Limitations
A token is required: it is issued in your rustunnel.com dashboard under API Keys and is shown once. The free plan gives up to three tunnels and no custom subdomains, and the pay-as-you-go plan costs from $3 a month plus $0.10 per gigabyte.
The managed servers sit in Helsinki, Hillsboro and Singapore. Whether they are reachable from Russia was not checked for this card. You can run your own server. The server is distributed under the AGPLv3 license.
The MCP server installs through Homebrew or `cargo install rustunnel-mcp`. With a cargo install, the `rustunnel` CLI must be taken separately from GitHub releases or through Homebrew.
How to disable. Remove the rustunnel block from the MCP config file (`.mcp.json`, `.cursor/mcp.json` and similar) and close any open tunnels. You can revoke the token under API Keys in your dashboard.
FAQ
How do I connect rustunnel to Claude Code?
Install with `brew tap joaoh82/rustunnel && brew install rustunnel` or `cargo install rustunnel-mcp`, get a token under API Keys on rustunnel.com and add to `.mcp.json` the `rustunnel-mcp` command with the server addresses and the token in a `RUSTUNNEL_TOKEN` variable. For Cursor the repository has a one-click install button.
Can I use my own server instead of the managed one?
Yes. Put your instance's addresses in the MCP server's launch arguments. The server binary is free under AGPLv3, and in the plans table the self-host option has unlimited tunnels and subdomains.
What kinds of tunnels can the agent open?
HTTP with a public HTTPS address, TCP (for a database on port 5432, say), UDP (for a game server), P2P tunnels between two rustunnel clients and load-balanced pools.
What is the get_connection_info tool for?
It returns a ready CLI command instead of launching a process. That helps in sandboxes where the agent cannot spawn processes: you or another environment run the command.
How much does rustunnel cost?
The free plan gives up to three tunnels with TLS. Pay-as-you-go costs from $3 a month plus $0.10 per gigabyte, lifts the tunnel limit and allows custom subdomains. A self-hosted server is free.
Discussion
No questions or reviews yet.
Related
MCP serversA tunnel for localhost with self-hostable relays: a public HTTPS address for a local service, no account, plus skills for agents
An MCP server for MikroTik routers: the agent reads and changes RouterOS configuration over SSH on a chat request
A proxy between MCP transports: connects stdio clients to remote SSE and HTTP servers and exposes local servers over the network
A secure MCP runtime through which an agent operates local machines, servers and containers
SSH MCP
ssh-mcp
A security-first SSH server: command classification, policy authorization and several sign-in methods. It runs commands on remote servers
Agentgateway
agentgateway
A proxy for agentic traffic: routes and secures connections to MCP servers, LLMs, and other agents over A2A
README in short
The project description is about the tunnel server itself: architecture, building, deployment on Ubuntu with systemd and in Docker, TLS through Let's Encrypt, client configuration, a port reference, the REST API and Prometheus metrics. The managed service section lists regions, how to get a token and the plans. For agents it separately covers installing the MCP server, client setup and a skill for OpenClaw.