Skip to content

Conversation

@MattBro
Copy link
Contributor

@MattBro MattBro commented Jan 21, 2026

Problem

EU users connecting to the PostHog MCP server via Claude Code are incorrectly redirected to the US OAuth login page. This is because Claude Code has a bug where it ignores the authorization_servers field from OAuth protected resource metadata and instead fetches /.well-known/oauth-authorization-server directly from the MCP server hostname.

See: anthropics/claude-code#2267

Changes

Use mcp-eu.posthog.com subdomain for EU users instead of ?region=eu query param.

  • US users: https://mcp.posthog.com/mcp
  • EU users: https://mcp-eu.posthog.com/mcp

How did you test this code?

  • All tests pass
  • Tested locally with MCP server

Related

🤖 Generated with Claude Code

Use mcp-eu.posthog.com subdomain for EU users instead of ?region=eu
query param. This is a workaround for Claude Code's OAuth bug where it
ignores the authorization_servers field and fetches the OAuth metadata
directly from the MCP server hostname.

See: anthropics/claude-code#2267

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
@github-actions
Copy link

🧙 Wizard CI

Run the Wizard CI and test your changes against wizard-workbench example apps by replying with a GitHub comment using one of the following commands:

Test all apps:

  • /wizard-ci all

Test all apps in a directory:

  • /wizard-ci flask
  • /wizard-ci next-js
  • /wizard-ci react-router

Test an individual app:

  • /wizard-ci flask/flask3-social-media
  • /wizard-ci next-js/15-app-router-saas
  • /wizard-ci next-js/15-app-router-todo
Show more apps
  • /wizard-ci next-js/15-pages-router-saas
  • /wizard-ci next-js/15-pages-router-todo
  • /wizard-ci react-router/react-router-v7-project
  • /wizard-ci react-router/rrv7-starter
  • /wizard-ci react-router/saas-template
  • /wizard-ci react-router/shopper

Results will be posted here when complete.

The agent runner was hardcoding the US MCP URL, ignoring the user's
region selection. Now uses mcp-eu.posthog.com for EU users.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
@MattBro
Copy link
Contributor Author

MattBro commented Jan 21, 2026

/wizard-ci next-js/15-app-router-saas

@wizard-ci-bot
Copy link

wizard-ci-bot bot commented Jan 21, 2026

🧙 Wizard CI Results

Trigger ID: 9688d07
Workflow: View run

App Confidence PR
next-js/15-app-router-saas 3/5 #244 (logs)

Configuration

Setting Value
Wizard ref matt/mcp-eu-subdomain
Examples ref main
PostHog ref master

Search for trigger ID 9688d07 in wizard-workbench PRs.

@MattBro MattBro enabled auto-merge (squash) January 21, 2026 23:09
@MattBro MattBro removed the request for review from rafaeelaudibert January 21, 2026 23:09
@MattBro MattBro merged commit 3120d79 into main Jan 21, 2026
14 checks passed
@MattBro MattBro deleted the matt/mcp-eu-subdomain branch January 21, 2026 23:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants