πŸ” OAuth 2.1 Debugger

Validate the complete OAuth 2.1 setup of any remote MCP endpoint β€” the same checks real MCP clients perform.

Reference β€” the OAuth 2.1 handshake MCP clients expect

  1. 401 challenge. POST /mcp initialize without a token β†’ HTTP 401 with WWW-Authenticate: Bearer resource_metadata="…".
  2. RFC 9728 protected-resource metadata at /.well-known/oauth-protected-resource (path-aware variants allowed):
    {
      "resource": "https://mcp.example.com/mcp",
      "authorization_servers": ["https://auth.example.com"],
      "scopes_supported": ["read"],
      "bearer_methods_supported": ["header"]
    }
  3. RFC 8414 authorization-server metadata at /.well-known/oauth-authorization-server (or OIDC discovery), with authorization_endpoint, token_endpoint, registration_endpoint (DCR, RFC 7591) and code_challenge_methods_supported: ["S256"].
  4. PKCE S256 + DCR β€” the client registers itself dynamically and completes the code flow with an S256 challenge.
  5. CORS β€” browsers need Access-Control-Allow-Origin, allow headers Content-Type, Authorization, Mcp-Session-Id, and expose Mcp-Session-Id + WWW-Authenticate.

MCP client OAuth callback URLs & registration modes

Where each mainstream client sends the user back after consent β€” and how it obtains aclient_id. Use this to configure your authorization server's redirect-URI whitelist or to decide whether you must enable Dynamic Client Registration (DCR).

ClientRedirect / callbackClient registration
Claude.ai Web / MobileFixed Anthropic-hosted callback (claude.ai domain) β€” no local portPre-registered or DCR depending on server
Claude DesktopAnthropic-hosted callback via the desktop appDCR / pre-registered
Claude Code (CLI)Local loopback on a random port: http://localhost:<port>/callbackDCR (RFC 7591) or CIMD β€” must allow localhost redirect URIs
CursorLocal loopback listener + cursor:// URI handlerDCR; wildcard/loopback redirect URIs needed
VS CodeLocal loopback + vscode:// URI handlerDCR
ChatGPT ConnectorsOpenAI cloud-side callback β€” no localhostPre-registered by OpenAI
Kiro (AWS IDE)Local loopback callbackDCR

Practical guidance: allow http://localhost/http://127.0.0.1 redirect URIs with any port for CLI/IDE clients, support DCR (registration_endpoint) so unknown clients can self-register, and keep HTTPS redirect URIs for cloud clients like ChatGPT.

RFC 9728 PRM & CIMD overview

Protected Resource Metadata (PRM) is the JSON document your MCP server publishes at/.well-known/oauth-protected-resource (optionally path-suffixed). It tells clients whichauthorization_servers to talk to and which scopes_supported exist, and it is advertised through the WWW-Authenticate: Bearer resource_metadata="…" parameter on the initial 401. Every OAuth-protected remote MCP endpoint should serve it β€” the debugger above checks it for you.

CIMD (Client ID Metadata Document) is the MCP ecosystem's newer alternative to Dynamic Client Registration: instead of calling a registration_endpoint to mint aclient_id, the client's client_id is itself an HTTPS URL pointing to a JSON metadata document describing the client (name, redirect URIs, logo). Servers fetch and cache that document β€” no per-client database writes and no DCR endpoint to defend against registration spam. Adopt CIMD if you control the authorization server and want registration-free onboarding; keep DCR enabled as well for the many clients that still rely on it.

Need Managed OAuth 2.1 or Edge Hosting for Your MCP Server?

Debugging a home-grown OAuth setup is exactly what these managed providers eliminate β€” their official remote MCP endpoints are listed in our directory:

Or compare which clients already handle OAuth 2.1 correctly in our MCP Clients Compatibility Matrix. Building your own server? Scaffold an OAuth 2.1-ready Cloudflare Workers MCP in 60 seconds β€” its generated endpoint passes this debugger out of the box.