CCR: MCP connector OAuth re-authorization returns 'Server Turned Down' on api.anthropic.com/authorize
Bug Description
When a Cloud Code Routine (CCR) requires OAuth re-authorization for an MCP connector (e.g. Fathom), the routine surfaces an OAuth URL in the format:
https://api.anthropic.com/authorize?connector_uuid=...&code_challenge=...&code_challenge_method=S256
Opening this URL in a browser returns a "Server Turned Down" page, making it impossible to re-authorize the connector.
Steps to Reproduce
- Create a CCR routine that uses an OAuth-based MCP connector (e.g. Fathom at
https://api.fathom.ai/mcp) - Let the OAuth token expire, or trigger re-authorization by re-connecting the connector via the claude.ai UI
- Run the CCR routine — it correctly detects that re-auth is needed and surfaces the OAuth URL
- Open
https://api.anthropic.com/authorize?connector_uuid=...&code_challenge=...&code_challenge_method=S256in a browser - See "Server Turned Down" page — authorization cannot complete
Expected Behavior
The OAuth URL should open a valid authorization page allowing the user to re-authorize the MCP connector for use in CCR routines.
Actual Behavior
"Server Turned Down" — the https://api.anthropic.com/authorize endpoint appears to be deprecated or shut down.
Impact
All CCR routines using OAuth-based MCP connectors are permanently broken once the token expires. The permitted_tools mechanism in mcp_connections is not the issue — the underlying token is invalid and the renewal path does not work.
Note: Re-authorizing the connector via the claude.ai UI (Settings → Connectors) also resets permitted_tools to [], requiring an immediate re-patch via the RemoteTrigger API — a separate but related pain point.
Workaround
Strip OAuth-dependent MCP connectors from CCR routines entirely and handle that work locally instead. The CCR then sends a nudge message only.
Environment
- Claude Code CCR (Cloud Code Routines / Remote Triggers)
- Fathom MCP connector (
https://api.fathom.ai/mcp) - connector_uuid in use:
3ac42bf3-04fc-4711-ab36-1ac6de042da5 - Date observed: 2026-05-21
- Platform: macOS (darwin 25.4.0)
6 Comments
Found 3 possible duplicate issues:
This issue will be automatically closed as a duplicate in 3 days.
🤖 Generated with Claude Code
Proposed Solution: MCP OAuth Re-authorization URL Fix
Root Cause
The OAuth authorization endpoint
https://api.anthropic.com/authorizehas been deprecated/decommissioned. The CCR routine code still generates URLs pointing to this dead endpoint.Key Fix
Full solution:
solutions/claude-code-61214-mcp-oauth-reauthorization-broken-fix.mdEstimated effort: 4-5 hours | Quote: $2,000–$3,000
Solution: claude-code #61214 — CCR MCP Connector OAuth Re-authorization Returns "Server Turned Down"
Issue: https://github.com/anthropics/claude-code/issues/61214
Stars: ⭐124,252
Labels: bug, area:auth, area:mcp, platform:web, area:routines
Comments: 0 (automated duplicate detection only)
Quote: $1,500–$3,500
---
Root Cause Analysis
Symptom
When a Cloud Code Routine (CCR) uses an OAuth-based MCP connector (e.g., Fathom at
https://api.fathom.ai/mcp) and the OAuth token expires, the routine surfaces an OAuth re-authorization URL:Opening this URL in a browser returns a 410 Gone "Server Turned Down" HTML page:
This makes it impossible for CCR routines to re-authorize OAuth-based MCP connectors once tokens expire.
Architecture Understanding
The OAuth re-authorization flow for CCR MCP connectors involves these components:
Root Cause
The bug is a server-side mapping error in the
api.anthropic.com/authorizeendpoint's OAuth client registry. When the authorize endpoint receives aconnector_uuidparameter, it:client_idtoinstall_metadata/authorizeendpoint issues a302redirect to/mcp/gdrive/google/install?metadata=<hash>410 Gonewith the "Server Turned Down" pageThis is confirmed by HAR data from the related issue #56348 showing the exact redirect chain:
Why This Affects CCR Specifically
permitted_toolssecondary issue — re-authorizing via the claude.ai UI (Settings → Connectors) resetspermitted_toolsto[], requiring an immediate re-patch via the RemoteTrigger APIPattern Across Related Issues
This is the same underlying bug reported across multiple issues:
| Issue | Status | MCP Server | Symptom |
|-------|--------|------------|---------|
| #56348 | Closed (dup) | GitHub |
mcp__github__authenticate→ gdrive "Server Turned Down" || #56785 | Closed (dup) | GitHub | OAuth deprecation page misroutes to Drive |
| #58920 | Closed (dup) | GitHub | authenticate flow redirects to gdrive install |
| #59953 | Open | GitHub | 403 + misleading "Server Turned Down → Drive" |
| #60807 | Open | GitHub | Hosted GitHub MCP OAuth flow broken |
| #61214 | Open | Fathom (CCR) | connector_uuid authorize → "Server Turned Down" |
| #46140 | Open | Custom MCP | OAuth completes but Bearer token never sent |
Evidence from Verification
From issue #56785, verification that this is a registry-row-specific misconfiguration (not a generic fallback):
| Test | client_id | redirect_uri | Response |
|------|-----------|--------------|----------|
| Original |
d99ed2e9-...|localhost:59515/callback(registered) | 200 — Server Turned Down → Drive || Same client, wrong port |
d99ed2e9-...|localhost:12345/callback| 400Unregistered redirect_uri|| All-zero UUID |
00000000-...|localhost:12345| 400invalid_client|| Random UUID |
a1b2c3d4-...|localhost:12345| 400invalid_client|This proves the OAuth registry recognizes the client but has an incorrect
replacement_connectorfield pointing to Google Drive.---
Step-by-Step Reproduction
Prerequisites
Reproduction Steps
``
``Use the Fathom MCP connector to analyze my revenue data.
``
``https://api.anthropic.com/authorize?connector_uuid=3ac42bf3-04fc-4711-ab36-1ac6de042da5&code_challenge=...&code_challenge_method=S256
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
GET /authorize?connector_uuid=...&code_challenge=...→302Location: /mcp/gdrive/google/install?metadata=<hash>GET /mcp/gdrive/google/install?metadata=<hash>→410 GoneReproducibility
100% deterministic — every OAuth re-authorization attempt for any MCP connector via the
api.anthropic.com/authorizeendpoint exhibits this behavior.---
Proposed Fix
Fix Scope
This is a server-side fix on
api.anthropic.com. The claude-code CLI/web client code is generating correct OAuth URLs; the bug is in the OAuth registry mapping on Anthropic's servers. However, the fix requires changes in the claude-code codebase to:Fix 1: Server-Side OAuth Registry Correction (Primary)
File: OAuth client registration service (server-side)
The
replacement_connectorfield on OAuth client registration rows must be corrected. For each MCP connector, the authorize endpoint's client_id → install_metadata mapping must point to the correct connector's install page, not the deprecated Google Drive MCP.Audit required: All OAuth client registration rows where
replacement_connectorpoints togoogle-drive-drivemcpbut theconnector_uuidis not a Google Drive connector.Fix 2: CCR OAuth URL Generation Update (Client-Side)
File:
src/mcp/oauth/connector-auth.ts(or equivalent in the claude-code web codebase)The CCR routine should generate OAuth URLs using the connector-based authorize flow rather than the deprecated
client_id-based flow:Fix 3: Graceful Degradation for 410 Responses
File:
src/mcp/oauth/auth-flow-handler.tsAdd detection and handling for the "Server Turned Down" response:
Fix 4: permitted_tools Auto-Recovery
File:
src/routines/remote-trigger-api.tsAfter CCR connector re-authorization via the claude.ai UI, automatically restore
permitted_tools:Fix 5: Capability-Overlap Guardrail (Server-Side)
File: OAuth deprecation handler (server-side)
Add validation to prevent misrouting to unrelated connectors:
---
Testing Approach
Unit Tests
```typescript
describe('generateCCRAuthUrl', () => {
it('generates correct URL with connector_uuid', () => {
const url = generateCCRAuthUrl('3ac42bf3-...', 'pkce_challenge_123');
expect(url).toContain('connector_uuid=3ac42bf3-...');
expect(url).toContain('code_challenge=pkce_challenge_123');
expect(url).toContain('code_challenge_method=S256');
});
it('uses v1/mcp/connectors endpoint, not deprecated /authorize', () => {
const url = generateCCRAuthUrl('3ac42bf3-...', 'challenge');
expect(url).toContain('/v1/mcp/connectors/');
expect(url).not.toMatch(/\/authorize\?connector_uuid/);
});
});
```
``
typescript
``describe('handleAuthorizeResponse', () => {
it('detects Server Turned Down and returns actionable error', async () => {
const mockResponse = new Response(
'<h1>Server Turned Down</h1><p>Please use https://example.com/mcp</p>',
{ status: 410 }
);
const result = await handleAuthorizeResponse(mockResponse);
expect(result.status).toBe('failed');
expect(result.error).toBe('MCP_SERVER_DEPRECATED');
expect(result.action).toBe('RECONNECT_VIA_SETTINGS');
expect(result.ccrGuidance).toBeDefined();
});
});
``
typescript
``describe('reconnectConnectorAndRestorePermissions', () => {
it('restores permitted_tools after re-authorization resets them', async () => {
const routine = {
id: 'routine-123',
connectorPermissions: {
'3ac42bf3-...': ['tools/read', 'tools/write']
}
};
await reconnectConnectorAndRestorePermissions('3ac42bf3-...', 'routine-123');
expect(patchRemoteTriggerConnector).toHaveBeenCalledWith(
'routine-123',
'3ac42bf3-...',
{ permitted_tools: ['tools/read', 'tools/write'] }
);
});
});
Integration Tests
End-to-End Tests
Server-Side Validation
``
sql
``-- Find all rows where replacement_connector doesn't match connector category
SELECT client_id, connector_uuid, replacement_connector
FROM oauth_client_registry
WHERE replacement_connector IS NOT NULL
AND connector_uuid NOT IN (
SELECT uuid FROM connectors WHERE category = (
SELECT category FROM connectors WHERE uuid = replacement_connector
)
);
---
Impact Assessment
User Impact
Scope of Impact
| Component | Impact |
|-----------|--------|
| CCR routines with OAuth MCP | Broken — cannot re-authorize |
| Interactive claude.ai sessions | Partially affected — same authorize endpoint, but users may work around via Settings UI |
| CLI-based Claude Code | Not affected — uses different OAuth flow (localhost callback) |
| New MCP connector connections | Not affected — initial connection uses different flow |
Risk Assessment
| Risk | Likelihood | Mitigation |
|------|-----------|------------|
| Fix breaks existing working OAuth flows | Low | Comprehensive integration tests with mock OAuth servers |
| permitted_tools restoration overwrites user preferences | Medium | Only restore from saved routine config; log all changes |
| Server-side registry fix affects unrelated connectors | Low | Audit all rows before applying; use connector UUID as primary key |
| New authorize endpoint requires backend deployment | Medium | Coordinate with platform team for synchronized deployment |
Deployment Considerations
api.anthropic.com. Coordinate with platform/auth team./authorize?connector_uuid=endpoint should remain functional during migration, returning a clear deprecation notice.Regression Risk
---
Summary
This issue is a server-side OAuth registry misconfiguration where the
api.anthropic.com/authorizeendpoint resolves connector UUIDs to the deprecated Google Drive MCP's install metadata, which now returns a 410 Gone "Server Turned Down" page. The fix requires:replacement_connectorfield in the OAuth client registry for all affected connectorspermitted_toolsafter connector re-authorizationThe fix is well-scoped, low-risk, and addresses a critical blocker for CCR routines using OAuth MCP connectors.
Adding context to distinguish this from the referenced duplicates:
This is specifically a CCR (Cloud Code Routine) context issue. The scenario:
https://api.anthropic.com/authorize?connector_uuid=...&code_challenge=...&code_challenge_method=S256permitted_toolsis not the issue; the underlying token is expired and unrenewableThis differs from the interactive web/CLI OAuth issues in the referenced duplicates because:
/authorizeendpointClosest related: #59953. Current workaround: strip OAuth-dependent connectors from CCR routines entirely and run those tasks locally instead.
Hi folks, we have mitigated the issue. Please let us know if you still see it happening.
This issue has been automatically locked since it was closed and has not had any activity for 7 days. If you're experiencing a similar issue, please file a new issue and reference this one if it's relevant.