mcp-use, start the server with --tunnel, then copy the printed Tunnel URL. The URL you give to clients must include /mcp.
mcp-use dev --tunnel or mcp-use start --tunnel, the framework connects directly to the relay over WebSocket. It does not install or execute a native tunnel binary or a separate tunnel package. If the relay connection drops while the command is still running, the tunnel reconnects automatically and reuses the same identifier when possible.
The relay forwards both HTTP requests and WebSocket upgrades. In development, MCP App views loaded from the public tunnel keep Vite HMR: editing a local view updates the remote Inspector or client without restarting the tunnel.
Start a tunnel with mcp-use
Usemcp-use dev --tunnel while you are developing:
mcp-use start --tunnel when you want to test the built server:
mcp-use public MCP URL: into your remote MCP client. Do not copy only the tunnel origin; the client URL must end with /mcp.
Verify the tunnel
Verify the public URL with themcp-use client CLI:
connect command performs the MCP handshake and saves the tunnel under the name tunnel-test. The tools list command should print the tools exposed by your local server. If the server uses OAuth or bearer authentication, complete the client authentication flow or pass the required auth option before testing tools.
Stop the tunnel
PressCtrl+C in the terminal running the tunnel.
When you started the tunnel with mcp-use dev --tunnel or mcp-use start --tunnel, stopping the command stops both the local server process and the tunnel.
Lifetime and limits
Tunnels are for local testing before deployment:- The tunnel is active only while the command is running.
- With
mcp-use dev --tunnelormcp-use start --tunnel, a dropped tunnel registration is re-established automatically while the command runs. - Reservations that never connect expire after 5 minutes.
- Connected tunnels expire after 24 hours.
- Inactive tunnels are cleaned up after 1 hour without activity.
- Each source IP can create up to 10 tunnels per hour.
- Each source IP can have up to 5 active tunnels at a time.
Next steps
- Use the TypeScript quickstart to create a local MCP server.
- Use Build your first MCP App to test widgets in a remote client.
- Use Deploy to Manufact Cloud when you are ready for a hosted MCP endpoint.