mcpproxy-go icon indicating copy to clipboard operation
mcpproxy-go copied to clipboard

Web UI OAuth login cannot complete from a remote headless host

Open tomgrin10 opened this issue 1 month ago • 0 comments

MCPProxy v0.70.0 cannot complete upstream OAuth sign-in from a browser on another machine, even when its Web UI is reachable through Tailscale Serve.

Reproduction:

  1. Run the personal-edition daemon on a Linux VM with HEADLESS=true.
  2. Expose the HTTP listener over HTTPS through Tailscale Serve and open /ui/ from a laptop.
  3. Click Log in on an OAuth upstream, such as Linear.
  4. The UI reports “OAuth Login Triggered — Check your browser for linear login,” but no sign-in page opens.

The login REST response includes browser_opened: false and a valid auth_url. serversStore.triggerOAuthLogin() discards those fields and returns true; both ServerCard and ServerDetail always display the same success toast.

Opening the authorization URL manually reveals a second obstacle: the provider redirects to http://127.0.0.1:<callback-port>/oauth/callback on the laptop, while the listener is on the VM. oauth.redirect_uri rejects HTTPS/non-loopback URLs. Disabling headless mode only attempts to open a browser on the VM.

Expected behavior: the dashboard opens the returned authorization URL in the user's browser and supports an explicitly configured HTTPS callback through the existing reverse proxy, without requiring SSH callback tunnels. Local loopback callbacks should remain the default; remote callbacks must retain PKCE, single-use state validation, server isolation and credential redaction.

I searched open and closed issues/PRs and all repository Discussions before filing this. Related work:

  • #243 added the structured login response that the Web UI currently discards.
  • #1229 fixed the analogous CLI URL-discarding problem, but not the Web UI or remote callback.
  • #1068 fixed state dispatch and false callback success; remote callbacks should reuse that validation.
  • #1070 covers pinned loopback callbacks, rather than a callback reachable from a remote browser.
  • #924 specifies exposing MCP access through a tunnel, a different flow from upstream OAuth sign-in.

No duplicate covering this complete remote Web UI sign-in flow was found. I am preparing a tested fix from tomgrin10/mcpproxy-go.

tomgrin10 avatar Oct 12 '26 08:10 tomgrin10