mcp-use TypeScript API
    Preparing search index...

    Interface TunnelManager

    Minimal tunnel manager surface used by the dev and production CLI paths.

    interface TunnelManager {
        start(port: number): Promise<{ subdomain: string; url: string }>;
        status(): { url: string | null };
        stop(): Promise<void>;
    }
    Index
    • Start or attach a tunnel targeting port.

      Parameters

      • port: number

        Bound local HTTP port to expose.

      Returns Promise<{ subdomain: string; url: string }>

      The public origin and assigned tunnel identifier.

    • Current tunnel public origin URL, or null when inactive.

      Returns { url: string | null }

      • url: string | null

        Public origin while the tunnel is active, null otherwise.

    • Stop the WebSocket relay and release its reservation.

      Returns Promise<void>