12 min read

Localtonet MCP Server: Manage Tunnels From Any AI Assistant

Connect the Localtonet MCP Server to Claude Code, Cursor, and more. Create, start, and stop tunnels without ever leaving your AI coding assistant

MCP Server ยท Tunnel Management ยท AI Coding Assistants ยท 2026

You're deep in a Claude Code session, building an integration that needs a public webhook URL. Getting one used to mean stopping, opening a browser, logging into the Localtonet dashboard, creating a tunnel, and copying the URL back into your terminal. The Localtonet MCP Server removes that detour. It's a hosted, officially registered MCP server that lets any MCP-compatible AI coding assistant create, start, stop, and manage your tunnels, auth tokens, token groups, servers, and SSO providers in plain English, without leaving the conversation. This guide covers what it is, how to authenticate it, how to connect it from the most popular AI coding tools, and the prompts that actually work.

๐Ÿ”Œ Listed in the official MCP registry ๐Ÿ”‘ Authenticates with an API key from your dashboard ๐Ÿค– Works with Claude Code, Cursor, Claude Desktop, VS Code, Windsurf

Why Switching to a Browser Tab Breaks Your Flow

Every tunnel you have ever created on Localtonet, HTTP, TCP, File Server, works the same way: open the dashboard, fill in a few fields, press Start. None of that is slow on its own. The problem shows up when you are iterating: testing a webhook, restarting a local server on a different port, checking whether the tunnel from ten minutes ago is still alive. Each of those checks means leaving your terminal, opening a browser tab, finding the right tunnel in a list, and coming back.

Do that fifteen times in an afternoon and it is not the seconds that cost you, it is the context switch. Your AI coding assistant already knows what port your server is running on and what you are trying to expose. It just could not do anything about it.

The Localtonet MCP Server puts tunnel management inside the same conversation where you are already doing the work, as a modern alternative to the dashboard, not a replacement for it.

What Is the Localtonet MCP Server?

The Localtonet MCP Server is a hosted remote server that speaks the Model Context Protocol, registered in the official MCP registry as com.localtonet/mcp, with a listed status of active. It runs at the /mcp endpoint on https://localtonet.com, using Streamable HTTP transport on MCP protocol version 1.4.0. Connect any MCP-compatible AI, Claude, Cursor, or otherwise, to that endpoint to manage your tunnels, auth tokens, token groups, servers, and SSO providers via natural language. Full technical details are published at localtonet.com/mcp-info, and clients that support server discovery can read the server card directly at https://localtonet.com/.well-known/mcp-server-card.

 Official registry listing Registered as com.localtonet/mcp, marked active, so registry-aware clients can find it without you typing the URL by hand.
 Streamable HTTP transport Model Context Protocol 1.4.0 over a single endpoint, no separate SSE stream to wire up on your side.
 API key authentication Generate a key from your Localtonet dashboard and pass it as a Bearer token. No OAuth flow, no browser popup.
 Client-agnostic Any MCP client that supports remote HTTP servers can connect: Claude Code, Cursor, Claude Desktop, VS Code, Windsurf, and others.
 Nothing to install for the MCP layer It is hosted by Localtonet, so there is no local process to run just to expose it. Your tunnels still need the Localtonet Client running to carry traffic.
This is not the same thing as McpNet Gateway

McpNet Gateway is a tool you run locally to expose your own upstream MCP servers to the internet. The Localtonet MCP Server is the opposite direction: it is Localtonet's own hosted server that lets your AI assistant manage your Localtonet account. If you are looking to expose a self-hosted MCP tool server, see the MCP Gateway tunnel instead.

What You Can Ask It To Do

The server covers more than tunnels. It sits on top of your account's management surface, so you describe the outcome instead of clicking through the dashboard.

 Create, start, and stop tunnels Describe the local port and protocol, get back a public URL, without opening the HTTP tunnel page yourself.
 Check what is running Ask what is currently active before spinning up something new, so you do not end up with duplicate subdomains.
 Manage auth tokens and token groups Create or review the Tokens that authorize your devices, and organize them into groups, from the same conversation.
 Manage servers and SSO providers Check which relay server a tunnel runs on, or review your account's SSO provider setup, without a separate settings page.

How to Connect: Step-by-Step

1

Have a Localtonet account

Register at localtonet.com if you do not already have one. No credit card required.

2

Generate an API key from your dashboard

This key is what the MCP Server uses to know which account it is acting on. Keep it private, it grants the same access as signing in.

3

Add the server to your AI coding assistant

Point your client at https://localtonet.com/mcp and pass your API key as an Authorization: Bearer header. Pick your client in the section below for the exact steps.

4

Start managing your account by asking

Once the client shows the server as connected, describe what you want in plain language, no need to memorize tool names.

Add It To Your AI Coding Assistant

๐Ÿ–ฅ Claude Code (CLI)

Run this in your terminal, not inside a Claude Code session, with your own API key in place of the placeholder:

Terminal
claude mcp add --transport http localtonet https://localtonet.com/mcp \
  --header "Authorization: Bearer YOUR_API_KEY"

Confirm the connection:

Terminal
claude mcp list

โšก Cursor

Add this to ~/.cursor/mcp.json (global) or .cursor/mcp.json in your project root:

~/.cursor/mcp.json
{
  "mcpServers": {
    "localtonet": {
      "url": "https://localtonet.com/mcp",
      "headers": {
        "Authorization": "Bearer YOUR_API_KEY"
      }
    }
  }
}

๐Ÿค– Claude Desktop

Edit the config file at ~/Library/Application Support/Claude/claude_desktop_config.json (macOS) or %APPDATA%\Claude\claude_desktop_config.json (Windows):

claude_desktop_config.json
{
  "mcpServers": {
    "localtonet": {
      "url": "https://localtonet.com/mcp",
      "headers": {
        "Authorization": "Bearer YOUR_API_KEY"
      }
    }
  }
}

Restart Claude Desktop after saving.

๐Ÿ’ป VS Code (GitHub Copilot)

Create or edit .vscode/mcp.json in your workspace. VS Code uses a top-level servers key and requires an explicit type on every entry:

.vscode/mcp.json
{
  "servers": {
    "localtonet": {
      "type": "http",
      "url": "https://localtonet.com/mcp",
      "headers": {
        "Authorization": "Bearer YOUR_API_KEY"
      }
    }
  }
}

Open the Command Palette and run "MCP: List Servers" to confirm it connected.

๐ŸŒŠ Windsurf

Windsurf's config lives at ~/.codeium/windsurf/mcp_config.json and uses serverUrl rather than url:

~/.codeium/windsurf/mcp_config.json
{
  "mcpServers": {
    "localtonet": {
      "serverUrl": "https://localtonet.com/mcp",
      "headers": {
        "Authorization": "Bearer YOUR_API_KEY"
      }
    }
  }
}

Click the MCPs icon in the Cascade panel and refresh to load it.

โš ๏ธ Most tutorials skip this step: do not commit your API key

Project-scoped config files like .cursor/mcp.json or .vscode/mcp.json are meant to be shared or committed to git. If you write your API key directly into one of those, it ships with the repository. Use a user-scoped or global config file for this server instead, or your client's variable interpolation feature if it has one, so the key never leaves your machine.

Example Prompts Once It Is Connected

You do not need to name the server or know its exact tool names. Describe what you want the way you would describe it to a teammate.

๐Ÿ’ฌ "Create an HTTP tunnel for port 3000 and give me the URL" Useful right after starting a local dev server that needs a public webhook target.
๐Ÿ’ฌ "What tunnels do I currently have running?" A quick status check before creating something new, so you do not end up with two tunnels pointed at the same port.
๐Ÿ’ฌ "Stop the tunnel pointed at port 8080" Shuts down a tunnel you are done with without opening the dashboard.
๐Ÿ’ฌ "List my auth tokens and which devices they're tied to" Handy when auditing who and what can connect to your account before adding a new device.

Tips for Getting the Most Out of the Localtonet MCP Server

๐Ÿ”‘ Treat your API key like a password It grants the same access as signing in to your account. Store it in your client's secret storage or an environment variable, not in a shared file.
๐Ÿ“‹ Ask for a status check first Before creating a new tunnel, ask what is already running. It is faster than discovering a duplicate subdomain later.
๐Ÿ›  Keep the Localtonet Client running The MCP Server manages the tunnel record. Traffic still flows through the Localtonet Client on the machine hosting your local service, so keep it running there.
๐ŸŒ Name tunnels descriptively When you ask your assistant to create one, give it a name tied to the project. Easier to find in the dashboard weeks later.

Troubleshooting Common Connection Issues

SymptomLikely causeFix
401 UnauthorizedAPI key missing, mistyped, or revokedRegenerate the key from the dashboard and update the Authorization header in your client config
Tunnel created but the URL is not reachableThe Localtonet Client is not running on the machine with the local serviceStart the Localtonet Client there. The MCP Server manages the tunnel record, not the traffic path
Client shows "Failed to connect"URL typo, or the header is malformedConfirm the URL is exactly https://localtonet.com/mcp and that the header reads "Authorization: Bearer YOUR_API_KEY" with no extra quotes
No tools appear after connectingThe tool discovery handshake did not finishRestart the client session, then check its MCP panel or log for a handshake error

Frequently Asked Questions

What is the Localtonet MCP Server?

It is a hosted server that speaks the Model Context Protocol, registered in the official MCP registry as com.localtonet/mcp. It gives MCP-compatible AI clients access to your tunnels, auth tokens, token groups, servers, and SSO providers, all through natural language.

How do I authenticate with the Localtonet MCP Server?

Generate an API key from your Localtonet dashboard and pass it as an Authorization: Bearer header when you add the server to your client. There is no separate browser sign-in step.

Is this the same thing as McpNet Gateway?

No. McpNet Gateway is a tool you run locally to expose your own MCP servers to remote clients. The Localtonet MCP Server is hosted by Localtonet and manages your Localtonet account from inside your AI assistant. They solve opposite problems.

Do I still need the Localtonet Client installed?

Yes, if you want the tunnel to actually carry traffic. The MCP Server can create, start, and stop a tunnel record, but the Localtonet Client running on the machine with your local service is still what forwards traffic through the tunnel.

Which AI coding assistants can connect to it?

Any MCP client that supports remote HTTP servers with custom headers, including Claude Code, Cursor, Claude Desktop, VS Code with GitHub Copilot, and Windsurf. The connection is the same URL and API key in every case, with the config format differing per client.

Does using the MCP Server cost anything extra?

The MCP Server itself is a different way to reach the same account management surface as your dashboard. Whatever billing already applies to your tunnels and plan continues to apply. It does not add its own separate fee.

What happens if my API key leaks?

Treat it like a leaked password. Go to your dashboard, revoke or regenerate the key, and update it in every client config where you used it.

Can I use the MCP Server and the dashboard at the same time?

Yes. Both reach the same underlying account data, so a tunnel you create from your AI assistant shows up in the dashboard immediately, and vice versa.

Where can I find the full technical reference?

At localtonet.com/mcp-info. Clients that support MCP server discovery can also read the server card directly at https://localtonet.com/.well-known/mcp-server-card.

Can I still manage my account manually if I do not want to use an AI assistant?

Of course. The dashboard is not going anywhere. The MCP Server is an additional way in, not a replacement for it.

Ready to Manage Your Account From Your AI Assistant?

Grab an API key from your dashboard, add https://localtonet.com/mcp to Claude Code, Cursor, or the client of your choice, and start managing tunnels without leaving your conversation. Free to start, no credit card required.

Get Started Free โ†’
---TAGS--- Tags: localtonet-mcp-server, mcp-tunnel-management, claude-code-mcp, cursor-mcp-server, windsurf-mcp, vs-code-copilot-mcp, streamable-http, model-context-protocol, mcp-registry, ai-coding-assistant, manage-tunnels-ai

Localtonet is a secure multi-protocol tunneling and proxy platform designed to expose localhost, devices, private services, and AI agents to the public internet supporting HTTP/HTTPS tunnels, TCP/UDP forwarding, mobile proxy infrastructure, file server publishing, latency-optimized game connectivity, and developer-ready AI agent endpoint exposure from a single unified control plane.

support