Skip to content

OAuth callback hardcoded to localhost breaks authentication in VMs #1139

Description

@kylemumma

The MCP test client's OAuth callback is hardcoded to http://localhost:8765/callback. When running inside a VM or container, the browser (often on the host) cannot reach this localhost address, so the authentication flow cannot complete.

Findings

  • packages/mcp-test-client/src/auth/oauth.ts hardcodes OAUTH_REDIRECT_URI = http://localhost:8765/callback and starts the callback server on 127.0.0.1:8765.
  • There is no environment variable or CLI flag to override the redirect URI or callback port.
  • Remote mode supports SENTRY_ACCESS_TOKEN as a workaround, but the OAuth flow itself is unusable in non-local environments without manual port forwarding.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions