MCP server URL
https://example.mcp.com
Where does the issue occur?
When auth finishes and redirects back to Claude.ai
Transport used
streamable-http
Client registration type
Static
SSE only: Does your server return the expected status code for POST requests?
Not applicable (my server does not use SSE)
When did you last reproduce this?
2026-06-29 15:27 EST
Browser and OS
Edge 149.0.4022.52 on macOS 26.5.1
Describe the issue
A custom remote MCP connector protected by Microsoft Entra ID fails to connect on claude.ai web despite a spec-compliant MCP server and a verified OAuth configuration.
After the user successfully signs into Microsoft, Claude discovers the OAuth metadata (/.well-known/oauth-protected-resource and /.well-known/oauth-authorization-server) but never completes the OAuth authorization code exchange by POSTing to Entra's /token endpoint. The connector then displays:
Authorization with the MCP server failed. You can check your credentials and permissions.
As a control, the identical MCP server, Entra application, OAuth client credentials, and user account work successfully in ChatGPT Developer Mode. ChatGPT completes the authorization code exchange, presents a bearer token to the MCP server, completes MCP initialization, and successfully invokes tools.
The evidence suggests the failure occurs between the OAuth callback and the authorization code exchange.
The production endpoint URL has been redacted because it is customer owned & publicly recognizable. I can provide the actual URL privately to an Anthropic engineer if needed.
Issue details
Environment
Claude Pro (web)
MCP server: Bun + @modelcontextprotocol/sdk@1.29.0
Transport: Streamable HTTP
Hosting: CloudFront → Nginx → Bun (EC2)
TLS: ACM certificate
Authorization Server: Microsoft Entra ID (single tenant)
OAuth client: Confidential client using static client_id and client_secret
PKCE: S256
OAuth discovery:
/.well-known/oauth-protected-resource
/.well-known/oauth-authorization-server
Server behavior
The MCP server:
returns RFC 9728 protected-resource metadata
returns RFC 8414 authorization-server metadata
correctly responds with
401 Unauthorized
WWW-Authenticate: Bearer resource_metadata="..."
for unauthenticated requests
validates Entra access tokens against Microsoft's JWKS
supports MCP sessions via Mcp-Session-Id
Observed request sequence from Claude
POST / -> 401
GET /.well-known/oauth-protected-resource -> 200
GET /.well-known/oauth-authorization-server -> 200
No authenticated MCP requests follow.
Microsoft Entra interactive sign-in logs show the user authentication succeeds.
Microsoft Entra non-interactive sign-in logs show no authorization code exchange reaching the /token endpoint for these attempts.
Expected behavior
After the user successfully authenticates with Microsoft Entra ID, Claude should:
Exchange the authorization code at the authorization server's /token endpoint.
Receive an access token.
Send authenticated requests to the MCP server using the bearer token.
Complete MCP initialization.
Allow MCP tools to execute normally.
This is the behavior observed when the identical server is used with ChatGPT Developer Mode.
Logs from your server
Claude backend (python-httpx/0.28.1)
POST / -> 401
GET /.well-known/oauth-protected-resource -> 200
GET /.well-known/oauth-authorization-server -> 200
(no authenticated requests received)
Control experiment using ChatGPT Developer Mode:
POST / NO_AUTH
GET /.well-known/oauth-protected-resource
POST / Authorization: Bearer ...
-> token validated
POST / Authorization: Bearer ...
-> token validated
GET / Authorization: Bearer ...
-> token validated
POST / Authorization: Bearer ...
-> token validated
The MCP server successfully validates the bearer token and completes initialization when used with ChatGPT.
Additional context
Troubleshooting already performed:
Same MCP server succeeds in ChatGPT Developer Mode.
Same Entra tenant.
Same Entra application.
Same OAuth client credentials.
Same user account.
Redirect URI verified.
Scope/resource verified.
PKCE verified.
Token validation verified.
Conditional Access ruled out.
Admin consent verified.
Multiple delete/recreate cycles of the Claude connector.
Tested on both a production domain and a temporary Cloudflare Tunnel with identical results.
Reference connector IDs:
ofid_5e20d750d1b12aed
ofid_512b144951a6a391
ofid_4c768afec4202a80
ofid_95f8b17b5942503a
ofid_7eccf73ab692f8dc
ofid_477cd15b1a5372ef
ofid_c9dbbf7257571eea
ofid_fef67c35cb18c4de
Similar reports
This may be related to, but appears distinct from:
In this case, OAuth discovery succeeds and the Connect flow is presented. The apparent failure occurs after successful user authentication, where the authorization code does not appear to be exchanged for an access token before MCP initialization.
I'm happy to provide additional diagnostics (sanitized server logs, Entra sign-in log JSON, HTTP traces, or a reproducible test environment) if they would help with investigation.
MCP server URL
https://example.mcp.com
Where does the issue occur?
When auth finishes and redirects back to Claude.ai
Transport used
streamable-http
Client registration type
Static
SSE only: Does your server return the expected status code for POST requests?
Not applicable (my server does not use SSE)
When did you last reproduce this?
2026-06-29 15:27 EST
Browser and OS
Edge 149.0.4022.52 on macOS 26.5.1
Describe the issue
A custom remote MCP connector protected by Microsoft Entra ID fails to connect on claude.ai web despite a spec-compliant MCP server and a verified OAuth configuration.
After the user successfully signs into Microsoft, Claude discovers the OAuth metadata (/.well-known/oauth-protected-resource and /.well-known/oauth-authorization-server) but never completes the OAuth authorization code exchange by POSTing to Entra's /token endpoint. The connector then displays:
Authorization with the MCP server failed. You can check your credentials and permissions.
As a control, the identical MCP server, Entra application, OAuth client credentials, and user account work successfully in ChatGPT Developer Mode. ChatGPT completes the authorization code exchange, presents a bearer token to the MCP server, completes MCP initialization, and successfully invokes tools.
The evidence suggests the failure occurs between the OAuth callback and the authorization code exchange.
The production endpoint URL has been redacted because it is customer owned & publicly recognizable. I can provide the actual URL privately to an Anthropic engineer if needed.
Issue details
Expected behavior
After the user successfully authenticates with Microsoft Entra ID, Claude should:
Exchange the authorization code at the authorization server's /token endpoint.
Receive an access token.
Send authenticated requests to the MCP server using the bearer token.
Complete MCP initialization.
Allow MCP tools to execute normally.
This is the behavior observed when the identical server is used with ChatGPT Developer Mode.
Logs from your server
Additional context
Troubleshooting already performed:
Same MCP server succeeds in ChatGPT Developer Mode.
Same Entra tenant.
Same Entra application.
Same OAuth client credentials.
Same user account.
Redirect URI verified.
Scope/resource verified.
PKCE verified.
Token validation verified.
Conditional Access ruled out.
Admin consent verified.
Multiple delete/recreate cycles of the Claude connector.
Tested on both a production domain and a temporary Cloudflare Tunnel with identical results.
Reference connector IDs:
ofid_5e20d750d1b12aed
ofid_512b144951a6a391
ofid_4c768afec4202a80
ofid_95f8b17b5942503a
ofid_7eccf73ab692f8dc
ofid_477cd15b1a5372ef
ofid_c9dbbf7257571eea
ofid_fef67c35cb18c4de
Similar reports
This may be related to, but appears distinct from:
In this case, OAuth discovery succeeds and the Connect flow is presented. The apparent failure occurs after successful user authentication, where the authorization code does not appear to be exchanged for an access token before MCP initialization.
I'm happy to provide additional diagnostics (sanitized server logs, Entra sign-in log JSON, HTTP traces, or a reproducible test environment) if they would help with investigation.