Skip to content

Dynamic client registration ​

An OAuth extension (RFC 7591) that lets an application register itself with an authorization server at runtime, by posting its metadata to a registration endpoint and getting a client id back.

OAuth assumes the client is known before it asks for a token: someone registered it, typed in a redirect URI and got a client id. That breaks down for an MCP clientMCP client: The part of an AI application that holds one connection to one MCP server: it negotiates the protocol version and capabilities, then sends that server's requests and receives its replies., which may be pointed at a server, and so at an authorization server, nobody has seen before. Dynamic client registration (DCR) removes the manual step. The authorization server lists a registration_endpoint in its metadata, and the client posts its name, redirect URIs and grant types there.

RFC 7591 allows two modes. With open registration, anyone may register, no credentials needed. With an initial access token, only parties given that token can register, which RFC 7591 says is required "when the authorization server limits the parties that can register a client".

Example ​

http
POST /register HTTP/1.1
Content-Type: application/json

{"client_name":"Example agent","redirect_uris":["https://agent.example.com/callback"],
 "grant_types":["authorization_code","refresh_token"],"token_endpoint_auth_method":"none"}

The answer carries a client_id, and a client_secret with client_secret_expires_at for a confidential client.

Risks ​

  • Everything is self-asserted. Unless it comes in a signed software statement, the authorization server "MUST treat all client metadata as self-asserted". A rogue client can register with another app's name and logo, so a consent screen that shows client_name proves little.
  • URLs in the metadata (a policy or logo link) can point anywhere, and open registration lets anyone supply them.
  • Clutter. Clients that register again on every start leave unused client ids behind at the authorization server.
  • Proxies. An MCP proxy that registers clients dynamically and then uses one static client id upstream is the setting for the confused deputyConfused deputy: A program that holds more authority than its caller and is tricked into using that authority on the caller's behalf, doing something the caller could not do directly. attack.

Common confusion ​

DCR is not the only way to get a client id. MCP lists three: pre-registration, Client ID Metadata Documents (CIMD) and DCR. With CIMD the client id is an https URL pointing at a JSON document the client hosts; the authorization server fetches it and checks that its client_id matches the URL. The 2026-07-28 revision deprecates DCR in favour of CIMD and keeps it only for authorization servers that do not support those documents yet.

In L2M ​

When you leave the client id empty on an OAuth server, L2M asks to register as a public client (no secret, PKCE), with application_type native for a loopback redirect URL and web otherwise, and reuses that registration only with the authorization server that issued it. With MCP_OAUTH_CLIENT_METADATA_ENABLED=true (off by default) and a public https base URL, it offers a client metadata document first to authorization servers that support it. A client id you enter always wins. If the authorization server rejects the registration or a stored client id, see MCP OAuth invalid_client.

Further reading ​

This website (not the L2M product) uses Google Analytics, only after you accept cookies. Cookie settings