MCP OAuth client quirks, side by side.
How Claude, Claude Code, ChatGPT, Cursor and VS Code run sign-in against your MCP server, from each vendor's own docs. Every cell links its source, and gaps are marked unverified.
What the spec requires.
Protected Resource Metadata
Servers MUST implement RFC 9728 so clients can find the authorization server. MCP spec
Resource indicators
Clients MUST send the RFC 8707
resourceparameter in both the authorization and token requests, using the server's canonical URI. MCP specExact resource match
The
resourcevalue in the metadata must be identical to the URL the client used. RFC 9728 3.3Registration
Clients and authorization servers SHOULD support Client ID Metadata Documents (CIMD) and MAY support Dynamic Client Registration (DCR). MCP spec
Client by client.
Cells marked unverified are missing from the vendor docs we checked.
| Client | Registration | Redirect URI | Discovery and resource | Refresh |
|---|---|---|---|---|
| Claude web, Desktop, mobile | Prefers CIMD when the server advertises it with none auth, otherwise DCR. No client_credentials. Source | https://claude.ai/api/mcp/auth_callback Source | Needs a 401 to start sign-in and ignores WWW-Authenticate on a 200. Uses only the first authorization_servers entry. 10s timeout on discovery, registration and token calls. Source Resource parameter: Unverified. | Refreshes on a 401 and up to 5 minutes before expiry, with a 30s timeout. Expects invalid_grant for a bad refresh token and rotation for public clients. Source |
| Claude Code | Its own CIMD. Source | http://localhost/callback and http://127.0.0.1/callback on any port, so match redirects without the port. Source Claude Code docs | Resource parameter: Unverified. | Unverified |
| ChatGPT | Prefers CIMD; the builder can choose DCR. CIMD token auth is none or private_key_jwt. No client_credentials. Source | Send the RFC 9207 iss parameter to keep the redirect URI stable. Source | code_challenge_methods_supported must include S256. Echo the resource parameter through the whole flow. mTLS client certificates and fixed egress IPs are available. Source | Tokens expire and rotate normally. Exact refresh timing: Unverified. Source |
| Cursor | DCR by default. Static OAuth through an auth block with CLIENT_ID and CLIENT_SECRET in mcp.json. CIMD: Unverified. Source | With DCR, the desktop app registers both a web and a desktop redirect URL. Source | Cloud token refresh reads only the standard .well-known location, so serve your metadata there (Cursor staff, forum). Forum PKCE and resource parameter: Unverified. | Users report refresh problems on the forum. Forum thread |
| VS Code | CIMD since 1.106 (Nov 12, 2025), used over DCR when available. Client document at https://vscode.dev/oauth/client-metadata.json. Falls back to manual client credentials. 1.106 notes API guide | http://127.0.0.1:33418 and https://vscode.dev/redirect Source | The resource must exactly match the endpoint, for example the /mcp path. GitHub issue PKCE and resource behavior per a third-party write-up. den.dev | Unverified |
Eight checks before you ship.
Answer unauthenticated calls with a 401
Claude starts sign-in only on a 401. Source
Serve metadata at the standard path
Use the RFC 9728 well-known path, including the path-insertion form when your issuer has a path. Cursor cloud refresh reads only this location. MCP spec Cursor forum
Make the resource value identical
Match the exact URL clients use, path included. RFC 9728 VS Code issue
Advertise S256
ChatGPT treats a server without
S256incode_challenge_methods_supportedas unsupported. SourceSupport both CIMD and DCR
Claude, ChatGPT and VS Code prefer CIMD; Cursor uses DCR by default. Claude ChatGPT VS Code Cursor
Put the right auth server first
Claude reads only the first
authorization_serversentry. SourceMatch loopback redirects on any port
Claude Code and VS Code sign in through a local redirect. Claude Code VS Code
Return invalid_grant and rotate refresh tokens
Claude expects both, plus a form-urlencoded
/tokenendpoint. Source
Run all eight checks in one pass.
oauthpad runs the full sign-in in every client and names the exact step that differs.
Sources.
- MCP specification 2025-11-25: Authorization
- RFC 9728 section 3.3
- Claude: Connector authentication
- Claude: Building connectors
- Claude Code: MCP
- OpenAI Apps SDK: Authentication
- Cursor: MCP
- Cursor forum: OAuth token refresh for MCP servers
- Cursor forum thread 155151
- Cursor forum thread 141276
- Cursor forum thread 130765
- Cursor forum thread 176343 (staff reply)
- VS Code: MCP servers
- VS Code: MCP extension guide
- VS Code 1.106 release notes
- microsoft/vscode issue 282472
- den.dev: CIMD in VS Code (third party)