Skip to main content
The tunnel creates a secure connection between ChatGPT (or other MCP clients) and your local MCP server:

Use Case

Tunneling is perfect for:
  • Testing before deployment: Verify your MCP server works with real clients
  • Development workflow: Iterate quickly without deploying each change
  • Client integration: Test with ChatGPT, Claude, or other MCP clients
  • Debugging: Troubleshoot connection issues in a production-like environment

Quick Start

This guide references mcp-use server, but you can use tunneling with any MCP server as long as they are served on the /mcp path.
If you’re using mcp-use start, you can pass the --tunnel flag to automatically create a tunnel without running a separate command:
mcp-use start --port 3000 --tunnel
1

Define Your Server

Create your MCP server with tools and resources:
npx create-mcp-use-app my-mcp-server
For more details, see the TypeScript Server documentation.
2

Start Your Local MCP Server

Start your MCP server on a local port (e.g., port 3000):
mcp-use start --port 3000
3

Create a Tunnel

Use the tunnel command to expose your local server:
npx @mcp-use/tunnel 3000
This will create a public URL that forwards to your local server. Learn more about the @mcp-use/tunnel package.
4

Use the Public URL

The command will output a public URL like:
╭────────────────────────────╮
│  🎉 Tunnel Created Successfully!           │
╰────────────────────────────╯

  🌐 Public URL:
     https://happy-blue-cat.local.mcp-use.run/mcp

  📍 Subdomain: happy-blue-cat
  🔌 Local Port: 3000
Use this URL to connect your MCP client (ChatGPT, Claude, etc.) to your local server.
Time Limits:
  • Tunnels automatically expire after 24 hours of creation
  • Inactive tunnels are cleaned up after 1 hour of no activity
Rate Limiting:
  • Maximum 10 tunnel creations per IP per hour
  • Maximum 5 active tunnels per IP at any time
  • These limits help ensure fair usage and prevent abuse
The tunnel is active only while the command is running. Press Ctrl+C to close the tunnel when you’re done testing.
Keep the terminal window open while testing. The tunnel closes when you stop the command.