Does Claude.ai support MCP OAuth authorization (2025-06-18)? Getting 'Tool execution failed' instead of OAuth flow #587
Replies: 2 comments
-
|
Yes Claude supports OAuth-based MCP servers, but your failure suggests a compatibility or implementation detail mismatch particularly because you’re implementing the latest 2025-06-18 version, and Claude may not yet fully support every nuance of that version in all cases. |
Beta Was this translation helpful? Give feedback.
-
|
I can see the problem in your curl output. It is not an OAuth version mismatch — it is a CloudFront configuration issue. The smoking gunThis header means CloudFront itself returned the 401 error before the request reached your MCP server. Your server is not even seeing the request. CloudFront is intercepting it. Why this breaks Claude's OAuth flowThe MCP OAuth flow works like this: In your setup, CloudFront is returning the 401 at step 1, but it is also stripping or mangling the (Note: your curl output shows the header present, but CloudFront behaviors can differ between curl and the Claude client — different TLS negotiation, different header handling, different origin routing.) The root causeYour architecture: The issue is likely one of:
How to debugTest whether the issue is CloudFront or your server by bypassing CloudFront: # Hit the ALB directly (bypass CloudFront)
curl -i -sS "http://<alb-dns-name>/mcp" \
-X POST \
-H 'Content-Type: application/json' \
--data-binary '{"jsonrpc":"2.0","id":"1","method":"tools/call","params":{"name":"get_website","arguments":{"websiteId":"65b7addb-a549-4953-b4df-b4d165cbe802"},"stream":false}}'If this returns the proper 401 + Claude.ai OAuth support statusTo answer your direct question: yes, Claude.ai supports MCP OAuth, but with caveats:
But fix the CloudFront issue first. The |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Pre-submission Checklist
Question Category
Your Question
Does Claude.ai support the latest version 2025-06-18 MCP authorization protocol? My remote MCP server returns a 401 with WWW-Authenticate: Bearer resource_metadata="PRM URL", yet Claude.ai responds with "Tool execution failed" instead of initiating the OAuth flow.
Context for my MCP Server:
To reproduce, you can call curl with:
curl -i -sS "https://mcp.sitesparq-dev.io/mcp" -X POST -H 'Content-Type: application/json' --data-binary @- <<'JSON'
{"jsonrpc":"2.0","id":"1","method":"tools/call","params":{"name":"get_website","arguments":{"websiteId":"65b7addb-a549-4953-b4df-b4d165cbe802"},"stream":false}}
JSON
Here's the response:
HTTP/1.1 401 Unauthorized
Content-Length: 0
Connection: keep-alive
Date: Wed, 01 Oct 2025 21:35:17 GMT
Set-Cookie: AWSALBAPP-0=remove; Expires=Wed, 08 Oct 2025 21:35:17 GMT; Path=/
Set-Cookie: AWSALBAPP-1=remove; Expires=Wed, 08 Oct 2025 21:35:17 GMT; Path=/
Set-Cookie: AWSALBAPP-2=remove; Expires=Wed, 08 Oct 2025 21:35:17 GMT; Path=/
Set-Cookie: AWSALBAPP-3=remove; Expires=Wed, 08 Oct 2025 21:35:17 GMT; Path=/
X-Powered-By: Express
Access-Control-Allow-Origin: *
Vary: Origin
Access-Control-Allow-Headers: Content-Type, Authorization, MCP-Session-Id
Access-Control-Expose-Headers: WWW-Authenticate
Access-Control-Allow-Methods: GET, POST, DELETE, OPTIONS
WWW-Authenticate: Bearer resource_metadata="https://mcp.sitesparq-dev.io/.well-known/oauth-protected-resource"
X-Cache: Error from cloudfront
Via: 1.1 027f3e9868eb8f82bc6ad5eae363a2fa.cloudfront.net (CloudFront)
X-Amz-Cf-Pop: SFO53-P6
X-Amz-Cf-Id: QDzQtmTGB4zX9nvlxsCgy_aDt8m3pGSSU2hGIDE8kR2IOgkbzdvRQA==
Beta Was this translation helpful? Give feedback.
All reactions