Cursor

Public URLs for localhost, from inside Cursor.

Connect Cursor to rustunnel via MCP. One JSON config gives Cursor's agent public HTTPS URLs for local dev servers, webhooks, and databases.

1. Install

installs rustunnel (CLI) + rustunnel-mcp (MCP server)
brew tap joaoh82/rustunnel && brew install rustunnel

2. Get an API token

Sign up free at rustunnel.com and create a key under Dashboard → API Keys. Self-hosting? Generate a token on your own server. Either way, it goes in RUSTUNNEL_TOKEN below — you never paste it into chat.

3. Connect Cursor

.cursor/mcp.json (project) or ~/.cursor/mcp.json (global)
{
  "mcpServers": {
    "rustunnel": {
      "command": "rustunnel-mcp",
      "args": [
        "--server", "eu.edge.rustunnel.com:4040",
        "--api", "https://eu.edge.rustunnel.com:8443"
      ],
      "env": { "RUSTUNNEL_TOKEN": "<your-token>" }
    }
  }
}

Optional: project rules

Drop this into your project so the agent reaches for rustunnel whenever a task needs a public URL:

.cursor/rules/rustunnel.mdc
---
description: Exposing local services with rustunnel
---

When a task needs a public URL for a local service (webhook testing,
sharing a dev server, reaching localhost from another device), use the
rustunnel MCP tools: create_tunnel to open it, list_tunnels to find the
URL, close_tunnel to tear it down. Prefer protocol "http" for web
services; never pass the token inline — RUSTUNNEL_TOKEN is configured.

4. Ask for a tunnel

Paste this prompt (or just describe what you need — the agent picks the right tool):

I need a public HTTPS URL for my localhost:3000 server. Use rustunnel — its MCP tools or the rustunnel CLI — to open the tunnel and give me the public URL when it's ready.

The agent gets six tools — create_tunnel, list_tunnels, close_tunnel, get_connection_info, list_regions, and get_tunnel_history — covering HTTP, TCP, and UDP tunnels, custom subdomains, regions, P2P, and load-balanced pools with health checks.

Full reference: Agent integration guideAgent manual with copy-paste recipes: rustunnel.com/agents.mdTeach the agent once and for all: npx skills add https://rustunnel.com/skills/rustunnel