Description
Custom MCP connector added via claude.ai org settings fails to complete OAuth authentication. The MCP server correctly implements RFC 9728 discovery and all OAuth endpoints, but Claude's auth orchestration fails internally before reaching the server's /authorize or /token endpoints.
Setup
- Remote MCP server with OAuth 2.1 via external OIDC provider (Auth0)
- mcp-gate (RFC 9728 compliance proxy) in front of MCP server
- Server correctly serves
/.well-known/oauth-protected-resource with valid authorization server reference
- Auth server correctly serves
/.well-known/oauth-authorization-server with all required endpoints
- DCR enabled and tested (
curl to /register returns valid client credentials)
- PKCE supported, RS256 JWT tokens configured
- Domain-level connection enabled for DCR-created apps
What Works
/.well-known/oauth-protected-resource returns 200 with correct metadata
/sse returns 401 without auth (correct — JWT validation at proxy layer)
/authorize returns 302 redirect to OIDC provider
/token proxies to OIDC token endpoint
/register returns 201 with client credentials
- Claude Code CLI connects to the same server successfully via
claude mcp add --transport http
What Fails
- Add custom connector in org settings with server URL only (no OAuth fields — expects DCR)
- Also tried with pre-registered Client ID + Client Secret in Advanced Settings
- Both cases: Claude discovers the resource metadata (200) and correctly gets 401 on
/sse
- Then Claude's auth orchestration fails with:
{"type":"error","error":{"type":"invalid_request_error","message":"code: Field required"}}
- Server logs show no
/authorize, /token, or /register requests from Claude-User
- The error originates from
claude.ai/api/organizations/.../mcp/start-auth/...
Reference IDs
ofid_c35011d59c070440
req_011CaKR4coGASHxaq5aBLSQ2
req_011CaKRJzHy8cynDZemSMPBq
req_011CaKRcm21jmdw8gtQJ4W
Expected Behavior
After discovering /.well-known/oauth-protected-resource and receiving 401, Claude should complete the standard OAuth flow (fetch AS metadata → DCR or use pre-registered creds → authorize → token → attach Bearer). All steps work manually. Claude stops between discovery and authorization.
Potentially Related Issues
Environment
- claude.ai web + Team plan
- Custom connector via org settings
- Claude Code CLI works with same server URL
Description
Custom MCP connector added via claude.ai org settings fails to complete OAuth authentication. The MCP server correctly implements RFC 9728 discovery and all OAuth endpoints, but Claude's auth orchestration fails internally before reaching the server's
/authorizeor/tokenendpoints.Setup
/.well-known/oauth-protected-resourcewith valid authorization server reference/.well-known/oauth-authorization-serverwith all required endpointscurlto/registerreturns valid client credentials)What Works
/.well-known/oauth-protected-resourcereturns 200 with correct metadata/ssereturns 401 without auth (correct — JWT validation at proxy layer)/authorizereturns 302 redirect to OIDC provider/tokenproxies to OIDC token endpoint/registerreturns 201 with client credentialsclaude mcp add --transport httpWhat Fails
/sse{"type":"error","error":{"type":"invalid_request_error","message":"code: Field required"}}/authorize,/token, or/registerrequests fromClaude-Userclaude.ai/api/organizations/.../mcp/start-auth/...Reference IDs
ofid_c35011d59c070440req_011CaKR4coGASHxaq5aBLSQ2req_011CaKRJzHy8cynDZemSMPBqreq_011CaKRcm21jmdw8gtQJ4WExpected Behavior
After discovering
/.well-known/oauth-protected-resourceand receiving 401, Claude should complete the standard OAuth flow (fetch AS metadata → DCR or use pre-registered creds → authorize → token → attach Bearer). All steps work manually. Claude stops between discovery and authorization.Potentially Related Issues
Environment