claude-code - 💡(How to fix) Fix Hosted GitHub MCP OAuth flow broken in claude.ai/code web sessions

Official PRs (…)
ON THIS PAGE

Recommended Tools

×6

Utilities matched from this issue’s tags and category — try them while you read without losing context.

GitHub issue graph ai analysis

Paste a GitHub issue URL. We fetch that issue, discover linked issues from bodies/comments/timeline, collect linked pull requests, and produce a structured English report.

The report is written in English Markdown for sharing and archival.

Helpful · Quick feedback

Loading…

Error Message

Error Messages/Logs

Fix Action

Fix / Workaround

Workaround: drive GitHub-related work from the local Claude Code CLI (which uses its own gh auth).

Workaround: Run the same task from Claude Code on the local Mac CLI (v2.1.145), which uses the local gh auth instead of the hosted MCP and works correctly.

RAW_BUFFERClick to expand / collapse

Preflight Checklist

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

What's Wrong?

In Claude Code on the web (claude.ai/code), the GitHub MCP server is installed but unauthenticated, and the OAuth flow does not work.

Calling mcp__github__authenticate returns a URL like:

https://api.anthropic.com/authorize?response_type=code&client_id=<id>&...&redirect_uri=http%3A%2F%2Flocalhost%3A<port>%2Fcallback&... Opening that URL in the browser lands on:

https://api.anthropic.com/mcp/gdrive/google/install?metadata=... which shows "Server Turned Down — This MCP server has been turned down. Please use https://drivemcp.googleapis.com/mcp/v1 instead" — i.e. the retired gdrive install page, not a GitHub consent screen.

The MCP server URL configured in the session is api.anthropic.com/v2/ccr-sessions/<session>/github/mcp.

Effect: web sessions have no GitHub API access at all (no gh CLI is available in the sandbox by design, so the MCP is the only path), making it impossible to view/create/comment on PRs and issues from the web environment.

Workaround: drive GitHub-related work from the local Claude Code CLI (which uses its own gh auth).

This has been broken for several days. Same behaviour across fresh windows and freshly issued auth URLs.

Environment:

Claude Code on the web (claude.ai/code) Repository: wakiki/regencyone (any repo, not repo-specific)

What Should Happen?

Expected: GitHub OAuth consent screen, then a redirect to http://localhost:<port>/callback?code=... (which fails to load locally for remote sessions — expected — but the URL in the address bar is valid and can be pasted back to Claude to complete auth).

<img width="1005" height="278" alt="Image" src="https://github.com/user-attachments/assets/c7c3c846-c71d-4fcd-8a9b-0d8b518fbb97" />

Error Messages/Logs

Steps to Reproduce

Steps to reproduce:

Start a new Claude Code session on the web at https://claude.ai/code on any repository. Ask Claude to do anything that requires the GitHub MCP (e.g. "show me the open PRs", "view PR #123", "check CI status"). Claude calls mcp__github__authenticate and replies with an authorization URL of the form: https://api.anthropic.com/authorize?response_type=code&client_id=<uuid>&code_challenge=...&redirect_uri=http%3A%2F%2Flocalhost%3A<port>%2Fcallback&state=... Open that URL in a new browser window (signed in to your Anthropic account). Expected: GitHub OAuth consent screen, then a redirect to http://localhost:<port>/callback?code=... (which fails to load locally for remote sessions — expected — but the URL in the address bar is valid and can be pasted back to Claude to complete auth).

Actual: Browser lands on https://api.anthropic.com/mcp/gdrive/google/install?metadata=... showing "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." No GitHub consent screen is ever shown, so the OAuth flow cannot be completed.

Frequency: 100% reproducible. Tested with multiple freshly issued auth URLs (different client_id and state each time) in fresh browser windows. Has been broken for ~2 days.

Workaround: Run the same task from Claude Code on the local Mac CLI (v2.1.145), which uses the local gh auth instead of the hosted MCP and works correctly.

Attaching the "Server Turned Down" screenshot you already have will help — it shows the wrong endpoint being hit directly in the URL bar.

Claude Model

Opus

Is this a regression?

Yes, this worked in a previous version

Last Working Version

No response

Claude Code Version

2.1.145 (Claude Code)

Platform

Anthropic API

Operating System

macOS

Terminal/Shell

Terminal.app (macOS)

Additional Information

No response

Vote matrix · Quick signals

Works
Did the solution work? Tap to confirm.
Easy Fix
Was it a quick fix?
Time Saver
Did it save you time?
Blocking
Was it severely blocking?
Common Issue
Are others likely hitting this too?
Flaky / Intermittent
Is it intermittent?
Verified / Reproducible
Can you reproduce it reliably?
Loading…

Still need to ship something?

×6

Another batch ranked right after the header list — different links, same matching logic.

Back to top recommendations

TRENDING