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.
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.
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.
How to Connect: Step-by-Step
Have a Localtonet account
Register at localtonet.com if you do not already have one. No credit card required.
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.
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.
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:
claude mcp add --transport http localtonet https://localtonet.com/mcp \
--header "Authorization: Bearer YOUR_API_KEY"
Confirm the connection:
claude mcp list
โก Cursor
Add this to ~/.cursor/mcp.json (global) or .cursor/mcp.json in your project root:
{
"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):
{
"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:
{
"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:
{
"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.
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.
Tips for Getting the Most Out of the Localtonet MCP Server
Troubleshooting Common Connection Issues
| Symptom | Likely cause | Fix |
|---|---|---|
| 401 Unauthorized | API key missing, mistyped, or revoked | Regenerate the key from the dashboard and update the Authorization header in your client config |
| Tunnel created but the URL is not reachable | The Localtonet Client is not running on the machine with the local service | Start 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 malformed | Confirm 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 connecting | The tool discovery handshake did not finish | Restart 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 โ