MCP EU OAuth flow redirects to US instance, fails with "Invalid client_id"
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 39.9k
- Forks
- 3.4k
- Avg merge
- 6h 51m
- Merged PRs (30d)
- 232
Description
Bug Description
When authenticating the PostHog MCP server configured for EU (mcp-eu.posthog.com/mcp), the OAuth flow initially opens a US authentication URL. A modal then appears to
switch to the EU instance, but after redirecting, the authentication fails with:
{
"error": "invalid_request",
"error_description": "Invalid client_id parameter value."
}
Steps to reproduce:
- Configure the PostHog MCP server with the EU endpoint:
{
"posthog": {
"type": "http",
"url": "https://mcp-eu.posthog.com/mcp"
}
} - Initiate OAuth authentication (e.g. via Claude Code /mcp → auth)
- The OAuth flow opens a US PostHog URL instead of EU
- A modal suggests switching to the EU instance
- After switching, the auth fails with Invalid client_id
Expected behavior:
The OAuth flow from mcp-eu.posthog.com should directly open the EU authentication page and complete successfully without needing to switch regions.
Environment:
- PostHog account region: EU (eu.posthog.com)
- MCP endpoint: https://mcp-eu.posthog.com/mcp
- Client: Claude Code CLI (macOS)
Debug info
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reproducing OAuth from the https://mcp-eu.posthog.com/mcp entry point using the provided configuration and Claude Code flow. Trace why authentication opens the US URL and why the EU redirect rejects the client_id; done means the EU endpoint opens EU authentication directly and completes successfully without a region switch.
Written by the indexing model from the issue text.
Assessment
- Domain
- api, authentication
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 25/100