[BUG] GitHub MCP authenticate tool redirects OAuth flow to Google Drive consent screen instead of GitHub

Status Open
Maintainer reply None cached
Activity 8 comments · opened Apr 8, 2026

Preflight Checklist

  • [x] I have searched existing issues and this hasn't been reported yet
  • [x] This is a single bug report (please file separate reports for different bugs)
  • [x] I am using the latest version of Claude Code

What's Wrong?

Bug: mcp__github__authenticate routes to Google Drive MCP installer instead of GitHub
Session ID: cse_01Xv66mTze4xxaFDaUc4KTDC
Tool: mcp__github__authenticate
Tool description says: "The github MCP server (http at https://api.anthropic.com/v2/ccr-sessions/cse_01Xv66mTze4xxaFDaUc4KTDC/github/mcp) is installed but requires authentication."
Actual behavior: When the generated https://api.anthropic.com/authorize?client_id=... URL is fetched, it redirects to:
https://api.anthropic.com/mcp/gdrive/google/install?metadata=...

which then redirects to Google's OAuth consent with scopes:
openid, userinfo.email, drive.readonly, drive.file

Impact: GitHub MCP cannot be re-authenticated in-session. All GitHub operations (pushing files, reading, PRs) fail for the duration of the session. The Google Drive MCP is also broken — authorizing it does not restore GitHub tools.

What Should Happen?

mpact: GitHub MCP cannot be re-authenticated in-session. All GitHub operations (pushing files, reading, PRs) fail for the duration of the session. The Google Drive MCP is also broken — authorizing it does not restore GitHub tools.

Error Messages/Logs

Steps to Reproduce

Reproduction: In any Claude Code session where the GitHub MCP server has disconnected, call mcp__github__authenticate. All generated URLs route to the Google Drive installer. Tested with 4 separate fresh client_ids — same result every time.

Claude Model

Opus

Is this a regression?

Yes, this worked in a previous version

Last Working Version

_No response_

Claude Code Version

Opus 4.61M Claude Code

Platform

Anthropic API

Operating System

macOS

Terminal/Shell

Other

Additional Information

_No response_

View original on GitHub ↗

8 Comments

ivan-klass · 4 months ago

Experienced the same.
Got this with Claude Code (cloud runner)
Note that the code branch was created successfully, the issue was with PR.

Maybe a related thing: the first PR for the session was already merged, I was following it up to create a fix PR.
So maybe that was causing some internal issue when creating a (non-implemented/unexpected) second PR per session

ivan-klass · 4 months ago

This is how Claude itself explains that behavior:

To be transparent about my part: I passed along the URL that the mcp__github__authenticate tool returned verbatim — I didn't construct it and I can't see what the consent page actually displays. You're the one source of truth on what the page showed.

What to include in the report

  • The tool name you saw (mcp__github__authenticate) and the literal consent screen title/app name you saw (Claude for Google Drive).
  • The client_id from the URL: abc97c3d-32a7-4b0a-b02d-94fc94ba0f90. That's the uniquely identifying part — Anthropic can look up what OAuth client that actually is.
  • A note that this happened while the GitHub MCP server was advertised as scoped to ivan-klass/<my private repo> in an automated session.
  • Timestamp - and session identifiers if you have them: session_01Ft5AbUAnAAeVj7Tqx[redacted]
alvexld · 4 months ago

I experienced the same today while it was working yesterday.

I asked to read a Notion database. Claude use select:mcp__Notion__authenticate. It returned to Claude

Ask the user to open this URL in their browser to authorize the Notion MCP server: https://api.anthropic.com/authorize?response_type=code&client_id=XXX Once they complete the flow, the server's tools will become available automatically. This session is remote, so after authorizing the browser will try to load http://localhost:54846/callback?code=... and show a connection error — that's expected. Ask the user to copy the full URL from the browser's address bar and paste it into chat, then call mcp__Notion__complete_authentication with that URL as callback_url.
alliefeast · 4 months ago

Been having the same issue for weeks. Checked again today and still having the same bug.

Title: Claude Code cloud sandbox: Notion MCP connector OAuth flow renders Google Drive consent screen

Summary: When authenticating the Notion connector (mcp.notion.com/mcp) from a cloud-sandbox Claude Code session via the authenticate tool, the OAuth consent page renders as "Claude for Google Drive" with a Google account picker. The session has no Google Drive connector configured. This blocks safe completion of the OAuth handshake because the consent screen doesn't match the connector being authorized.

Environment

  • Claude Code at claude.ai/code
  • Anthropic's native cloud environment

Reproduction

  1. Enable the Notion connector in Claude Code web UI → Directory → Connectors → Notion (shows "Disconnect"; connected at account level)
  2. In a Claude Code session, invoke mcp__16f93c1f-6702-49a4-bc2a-5ccdaabd2c1f__authenticate
  3. Returns a URL: https://api.anthropic.com/authorize?response_type=code&client_id=<rotating>&...&redirect_uri=http%3A%2F%2Flocalhost%3A<port>%2Fcallback&state=...
  4. Open URL in browser
  5. Observed: OAuth flow renders as "Claude for Google Drive" with request for Google Drive file scopes:
  • "See and download all your Google Drive files"
  • "See, edit, create, and delete only the specific Google Drive files you use with this app"
  • Note: User has previously granted some level of access to "Claude for Google Drive" for 2 unrelated services (per Google's existing-access notice on the consent screen). The Notion connector's authenticate tool is reusing this same OAuth client rather than routing to Notion's own OAuth.

<img width="1131" height="492" alt="Image" src="https://github.com/user-attachments/assets/efa8c5d0-0147-462c-b781-55ac988be913" />
<img width="1093" height="834" alt="Image" src="https://github.com/user-attachments/assets/dbbe7aa5-6364-4872-acce-2944596b22ed" />

  1. Expected: Notion-branded consent screen

Additional diagnostic

  • Each call to authenticate returns a DIFFERENT client_id (observed 85194b11-51e5-4cf4-b5b5-59e41106355e and c596fdb1-e990-4927-8a05-daec9e863922 on successive calls). Possibly related to the misbranding — different client_ids might point at differently-configured OAuth apps on Anthropic's side.
  • curl https://api.notion.com/v1/users/me from the sandbox returns HTTP 403 x-deny-reason: host_not_allowed Host not in allowlist. This confirms the expected network-isolation behavior; the connector OAuth flow is the only path users have.

Impact

  • Users can't complete Notion OAuth from cloud sandbox sessions (risk of granting wrong permissions if they click through)
  • Self-audit / research / workflow automations that write to Notion fail silently in most sessions
cgimber · 3 months ago

i'm here via #51853
any updates on this?

pmaxhogan · 3 months ago

Experiencing same on Windows 11, CC v2.1.147

aajn88 · 2 months ago

Hi Anthropic! Could we get at least a workaround? This is bug is very annoying and is affecting workflows severly.

FWIW - This is happening for me on Claude Code, not just notion

aajn88 · 2 months ago

@localden maybe you could help or give us an update, please?

Also, I'm providing my 2c of summary/logs to help with this (if any):

GitHub MCP OAuth /authorize redirects to turned-down (410) Google Drive endpoint — auth can never complete

Summary

In a Claude Code remote/web session, authenticating the GitHub MCP server is impossible: the OAuth /authorize endpoint 302-redirects straight to a decommissioned Google Drive MCP install handler, which returns 410 Gone. The flow never reaches GitHub's consent screen or the local …/callback, so the GitHub MCP server can never be authenticated. This blocks all GitHub operations (opening/merging PRs, issues, etc.).

This is reproducible from a fresh, unauthenticated curl, so it's server-side — not a browser/cookie/redirect issue on the client.

Steps to reproduce

  1. In a Claude Code remote session, trigger the GitHub MCP server OAuth flow (it had disconnected and asked to re-authenticate).
  2. Receive an authorize URL of the form:

https://api.anthropic.com/authorize?response_type=code&client_id=…&code_challenge=…&code_challenge_method=S256&redirect_uri=http%3A%2F%2Flocalhost%3A3118%2Fcallback&state=…
(MCP server: https://api.anthropic.com/v2/ccr-sessions/<session-id>/github/mcp)

  1. Open it in a browser (or curl it).

Expected

/authorize shows the GitHub OAuth login/consent, then 302-redirects back to http://localhost:3118/callback?code=…&state=… so the GitHub MCP auth completes.

Actual

/authorize immediately 302-redirects to https://api.anthropic.com/mcp/gdrive/google/install?metadata=… (a Google Drive install page — wrong connector entirely), which renders:

Server Turned Down — This MCP server has been turned down. Please use https://drivemcp.googleapis.com/mcp/v1 instead — connect via Google Drive in the Claude directory.

Evidence (HTTP-level, reproducible)

# 1) GitHub MCP OAuth authorize → misrouted redirect (fresh, unauthenticated curl)
$ curl -sSI "https://api.anthropic.com/authorize?response_type=code\
&client_id=c7dc76fc-8290-4984-b5a0-1c34fb40aa22\
&code_challenge=…&code_challenge_method=S256\
&redirect_uri=http%3A%2F%2Flocalhost%3A3118%2Fcallback&state=…"

HTTP/2 302
location: https://api.anthropic.com/mcp/gdrive/google/install?metadata=9941c875…
cf-ray:   a0d935d2cd662bff-ORD
# expected: GitHub consent, then 302 back to http://localhost:3118/callback?code=…&state=…
# actual:   302 to the Google Drive install page (NOT GitHub; the metadata token
#           regenerates per request → server-generated, not client-supplied)

# 2) That redirect target is a turned-down server
$ curl -sSI "https://api.anthropic.com/mcp/gdrive/google/install?metadata=…"
HTTP/2 410            # Gone
x-powered-by: Express
cf-ray: a0d935d38e972bff-ORD
# body: "Server Turned Down — This MCP server has been turned down.
#        Please use https://drivemcp.googleapis.com/mcp/v1 instead."

# 3) The GitHub MCP server endpoint itself (auth required, as expected)
$ curl -sSI "https://api.anthropic.com/v2/ccr-sessions/<session-id>/github/mcp"
HTTP/2 401
request-id: req_011CcAUZaha8nZP89xhU2Dxv
cf-ray:     a0d935772f7a2bff-ORD

Identifiers for log correlation

| Field | Value |
|---|---|
| Session id | cse_01Lc7b3rYZNqPqaB2WFMBuGN |
| OAuth client_id | c7dc76fc-8290-4984-b5a0-1c34fb40aa22 |
| redirect_uri (expected callback) | http://localhost:3118/callback |
| cf-ray (authorize 302) | a0d935d2cd662bff-ORD |
| cf-ray (gdrive 410) | a0d935d38e972bff-ORD |
| request-id (github mcp 401) | req_011CcAUZaha8nZP89xhU2Dxv |
| Timestamp (UTC) | 2026-06-18T09:19:04Z |
| Environment | Claude Code remote/web session, Linux x86_64, node v22.22.2 |

Root cause (suspected)

GET /authorize for the GitHub MCP connector returns 302 Location: /mcp/gdrive/google/install (a 410-Gone Google Drive endpoint) instead of routing to GitHub's OAuth consent + the localhost:3118/callback. Looks like a connector/route misconfiguration mapping the GitHub MCP authorize flow onto the retired Google Drive install handler.

Impact

GitHub MCP server cannot be (re)authenticated in remote/web sessions → all GitHub MCP operations are blocked (create/merge PRs, issues, reviews).