Skip to main content
Glama

Untun MCP - Secure Tunnels for Local Servers NPM Version License

❌ Without Untun MCP

Local development can be frustrating when you need to expose your server to the internet:

  • ❌ Complex tunnel setup and command-line arguments

  • ❌ Hard to track which tunnels are running across different terminal sessions

  • ❌ No easy way to manage multiple tunnels from a single interface

Related MCP server: Portainer MCP

✅ With Untun MCP

Untun MCP creates and manages secure tunnels directly from your AI assistant:

  • 1️⃣ Simply tell your AI assistant to create a tunnel

  • 2️⃣ Get a public URL within seconds

  • 3️⃣ Manage all your tunnels with simple natural language commands

No complex CLI commands to remember. No more lost tunnels. Easy management of multiple tunnels.

⚠️ Disclaimer

This project uses the untun package from npm but is not officially affiliated with, endorsed by, or connected to Cloudflare or UnJS. This is an independent, community-developed MCP wrapper around the untun CLI tool.

🛠️ Getting Started

Requirements

  • Node.js >= v18.0.0

  • MCP-compatible client (Cursor, Claude Desktop, VS Code, etc.)

  • untun CLI tool (installed automatically as needed)

Install in Cursor

Go to: Settings -> Cursor Settings -> MCP -> Add new global MCP server

Paste the following configuration into your Cursor ~/.cursor/mcp.json file:

{
  "mcpServers": {
    "untun": {
      "command": "npx",
      "args": ["-y", "@minte-app/untun-mcp@latest"]
    }
  }
}

Install in VS Code

Install in VS Code (npx)

Add this to your VS Code MCP config file:

{
  "servers": {
    "Untun": {
      "type": "stdio",
      "command": "npx",
      "args": ["-y", "@minte-app/untun-mcp@latest"]
    }
  }
}

Installing via Smithery

To install Untun Secure Tunnel Manager for Claude Desktop automatically via Smithery:

npx -y @smithery/cli install @minte-app/untun-mcp --client claude

Install in Claude Desktop

Add this to your Claude Desktop claude_desktop_config.json file:

{
  "mcpServers": {
    "Untun": {
      "command": "npx",
      "args": ["-y", "@minte-app/untun-mcp@latest"]
    }
  }
}

🔨 How to Use

Ask your AI assistant to create a tunnel with natural language:

Create a tunnel to my localhost:3000 server

Check your running tunnels:

Show me all my active tunnels

Stop a specific tunnel:

Stop the tunnel to localhost:3000

Available Tools

  • start_tunnel: Creates a secure tunnel from a public internet address to your local server

    • url (required): The local URL to expose (e.g., http://localhost:3000)

    • name (optional): Custom name for the tunnel

  • stop_tunnel: Stops a running tunnel or all local tunnels

    • name (optional): Name of a specific tunnel to stop

  • list_tunnels: Lists all active tunnels including their status and details

Troubleshooting

Tunnel Not Starting

If your tunnel doesn't start, try these steps:

  1. Make sure your local server is running

  2. Check if there's already a tunnel running for that port

  3. Use list_tunnels to check the status of all tunnels

Remote Tunnels

Tunnels are tracked by hostname. If you see "remote" tunnels that can't be stopped, they are likely running on another machine. You'll need to stop them from the original machine.

Development

Clone the project and install dependencies:

npm install

Build:

npm run build

License

MIT

Available Tools

3 tools
list_tunnelsA

Lists all active tunnels including their status and details.

This tool will:

  • Show all tunnels in the registry

  • Auto-detect any running tunnels not in the registry

  • Display tunnel status, name, URLs, and runtime information

  • Indicate whether tunnels are local or running on remote machines

Use this tool to check the status of your tunnels and get their public URLs.

Inputs: no named parameters.

start_tunnelA

Creates a secure tunnel from a public internet address to your local server.

This tool will:

  • Start an untun tunnel process connecting to your specified local URL

  • Return a public URL that can be used to access your local server

  • Allow you to name your tunnel for easier management

After starting a tunnel, wait a few seconds and use 'list_tunnels' to check its status and get the public URL.

Inputs: url (required), name.

stop_tunnelA

Stops a running tunnel or all local tunnels.

This tool will:

  • Stop a specific tunnel identified by name (if provided)

  • Stop all local tunnels (if no name is provided)

  • Only affects tunnels running on the current machine

  • Will not affect tunnels running on other machines

After stopping tunnels, you can use 'list_tunnels' to confirm they've been terminated.

Inputs: name.

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections.

Loading tool schema changelog…

    TDQS

    A4.5/5.0

    Scored across 3 tools

    Disambiguation5/5

    Each tool has a clearly distinct purpose with no overlap: list_tunnels for viewing status, start_tunnel for creation, and stop_tunnel for termination. The descriptions reinforce these distinct roles, making misselection unlikely.

    Naming Consistency5/5

    All tools follow a consistent verb_noun pattern (list_tunnels, start_tunnel, stop_tunnel) with uniform snake_case styling. This predictability makes the tool set easy to understand and navigate.

    Tool Count5/5

    With 3 tools, this server is well-scoped for tunnel management, covering the essential lifecycle operations: list, start, and stop. Each tool earns its place without bloat or thinness.

    Completeness5/5

    The tool set provides complete CRUD-like coverage for tunnel management: list (read), start (create), and stop (delete). There are no obvious gaps, and the descriptions indicate seamless workflow integration.

    Maintenance

    ActivityInactive
    ResponsivenessOutdated data

    Related MCP Connectors

    Related MCP Servers