How MCP clients connect to MCP servers over OAuth: discovery and client identification
Pasting only an MCP[1] server URL into Claude is enough to complete the OAuth login flow, with no API keys to create and no application to register in advance. Two mechanisms make this possible: OAuth discovery, based on RFC 9728 and RFC 8414 metadata, tells the client where the authorization server is, while client identification through pre-registration, DCR[2] or CIMD[3] tells the authorization server which application is connecting. The MCP specification made RFC 9728 discovery mandatory in its June 2025 version, began recommending CIMD in November 2025, and marked DCR as deprecated in the current July 2026 version. Better Auth supports CIMD through a plugin and Neon Auth enables it by default, although Neon's official MCP server still uses DCR, while Supabase makes discovery easy to implement but still guides developers toward DCR. In the full flow, Claude reads both metadata documents, prepares a client_id by one of the three methods, and after the user clicks 'Allow' exchanges the authorization code for tokens using PKCE[4], with the resource parameter specifying which MCP server the token is for.
Sources
-
JPZenn JA
MCP クライアントが OAuth でMCP サーバにつながる仕組み


