---
title: "OAuth client registration for AI agents | Agent Ready Checklist"
description: "Under the MCP authorization spec, a client should use pre-registered details first, then a Client ID Metadata Document, then Dynamic Client Registration."
canonical: https://agentreadychecklist.com/guides/let-agents-register-an-oauth-client
site: "Agent Ready Checklist"
last_updated: 2026-11-22
date: 2026-11-22
section: "Guides"
---

# OAuth client registration for AI agents | Agent Ready Checklist

> Under the MCP authorization spec, a client should use pre-registered details first, then a Client ID Metadata Document, then Dynamic Client Registration.

Source: https://agentreadychecklist.com/guides/let-agents-register-an-oauth-client
Site: Agent Ready Checklist
Last reviewed: 2026-11-22
Agent endpoints: https://agentreadychecklist.com/llms.txt (index), https://agentreadychecklist.com/openapi.json (API), https://agentreadychecklist.com/mcp (MCP server), https://agentreadychecklist.com/ask (search)
Access: https://agentreadychecklist.com/auth.md (no key). Pricing: https://agentreadychecklist.com/pricing.md (free).

# MCP clients try pre-registration, then CIMD, then DCR

An agent gets a client\_id from your authorization server in one of three ways. Under the MCP authorization spec, a client that supports all of them should use pre-registered details first, then a Client ID Metadata Document if your server sets client\_id\_metadata\_document\_supported, then Dynamic Client Registration if your metadata lists a registration\_endpoint.

The [MCP authorization spec](https://modelcontextprotocol.io/specification/2025-11-25/basic/authorization) says authorization servers and MCP clients should support Client ID Metadata Documents (CIMD) and may support Dynamic Client Registration (DCR, RFC 7591). It points to CIMD when client and server have no prior relationship, which it calls the most common case. It points to pre-registration when they have an existing relationship, and to DCR for backwards compatibility or specific requirements.

Related: [AR-ACT-01](https://agentreadychecklist.com/checklist/ar-act-01/)

Protected resource metadata lists the authorization servers that can be used with your API, but [RFC 9728](https://www.rfc-editor.org/rfc/rfc9728.html) puts the way the client identifier is established at that server out of scope. It names DCR as one existing method an unrecognized client can use to register before it starts the authorization flow.

Related: [How to add OAuth metadata](https://agentreadychecklist.com/guides/add-oauth-metadata/)

## Advertise each method in your metadata

DCR is advertised through registration\_endpoint, which [RFC 8414](https://www.rfc-editor.org/rfc/rfc8414.html) defines as an optional member holding the URL of the server's DCR endpoint. CIMD support is advertised with client\_id\_metadata\_document\_supported, a boolean the [CIMD draft](https://datatracker.ietf.org/doc/draft-ietf-oauth-client-id-metadata-document/) defines as specifying whether the server supports retrieving client metadata from a client\_id URL. With the flag, clients redirect the user only to servers that support the draft, instead of sending them to a dead end and an invalid-client error.

Under the [MCP spec](https://modelcontextprotocol.io/specification/2025-11-25/basic/authorization), a client supporting all options should use pre-registered client information if it has it for your server. Next comes CIMD, if your metadata indicates support through client\_id\_metadata\_document\_supported, and then DCR as a fallback if your metadata includes registration\_endpoint. MCP clients should support static client credentials: a client ID hardcoded for your server, or a UI where users enter details after registering an OAuth client themselves, for example through a configuration interface you host.

Related: [OAuth authorization server metadata defined](https://agentreadychecklist.com/glossary/oauth-authorization-server-metadata/)

## Accept Dynamic Client Registration

Under [RFC 7591](https://www.rfc-editor.org/rfc/rfc7591.html), your registration endpoint must accept HTTP POST with an application/json body and must be protected by a transport-layer security mechanism. The agent sends its requested metadata as top-level members of one JSON object; the RFC's example request carries redirect\_uris, client\_name and token\_endpoint\_auth\_method. Clients are recommended to always send client\_name, and when it is missing the server may display the raw client\_id to the end-user. If token\_endpoint\_auth\_method is omitted, the default is client\_secret\_basic. You register the client and return its registered metadata, a client identifier unique at your server and client credentials such as a client secret, if applicable. You may provision defaults for omitted items, and you may reject requested values by substituting suitable defaults or by returning an error.

To limit who may register, require an initial access token: the RFC says its use is required when the authorization server limits the parties that can register a client. How you issue that token and how the endpoint validates it are out of scope for the RFC. For open registration, the endpoint should allow requests that carry no initial access token, and those requests may be rate-limited or otherwise limited to prevent a denial-of-service attack on the endpoint.

## Let clients manage their registration

[RFC 7592](https://www.rfc-editor.org/rfc/rfc7592.html), an Experimental RFC, adds two required members to the registration response: registration\_client\_uri, the fully qualified URL of the client configuration endpoint for that client, and registration\_access\_token. The client must use that URL as given and must not construct it from component pieces. It reads its record with an HTTP GET request, makes update and delete requests through other HTTP methods, and must present its registration access token as a Bearer token in every call. An update must include all client metadata fields from the previous registration, read or update, and the server must treat omitted fields as null or empty.

When a read or update response contains a new client secret or registration access token, the client must immediately discard the previous one. The client\_id must not change from the initial registration response. Rotate the token only in response to a read or update request, as the RFC says you should; at that point the client must discard the old token and the server should discard it too, if possible.

## Accept Client ID Metadata Documents

The mechanism is defined in draft-ietf-oauth-client-id-metadata-document-03, which the [IETF Datatracker](https://datatracker.ietf.org/doc/draft-ietf-oauth-client-id-metadata-document/) lists as an Active Internet-Draft of the oauth working group, last updated 2026-11-02. Here the client\_id is itself an HTTPS URL, and your server should automatically fetch the JSON document at that URL to retrieve the client metadata.

Check the URL first. It must use the https scheme, must contain a path component other than /, and must not contain single-dot or double-dot path components, a fragment component or a userinfo component. It should not contain a query component and may contain a port. Compare these URLs by simple string comparison and never normalize them, since the draft forbids the server to do so: https://example.com/client and https://example.com:443/client are different identifiers. The fetched document must contain a client\_id that matches the URL the client presented and the URL you fetched, by the same comparison, and validating that match falls to the authorization server.

The fetch has its own rules. A response other than 200 OK must be treated as an error, and the server must not automatically follow HTTP redirects. Send an Accept header of application/json, which the draft says the server should do, and take care to avoid server-side request forgery during the fetch. Re-fetch periodically, because the contents may change over time. If the fetch fails, the server should abort the authorization request. The server must intersect the document's grant\_types and response\_types with what it supports, and reject the request with invalid\_client if either intersection is empty. If you also generate your own client\_id values, the draft says they should not start with https://.

The [MCP spec](https://modelcontextprotocol.io/specification/2025-11-25/basic/authorization) cites revision -00 of the draft and requires the document to include at least client\_id, client\_name and redirect\_uris. Its example document reads:

```json
{
  "client_id": "https://app.example.com/oauth/client-metadata.json",
  "client_name": "Example MCP Client",
  "client_uri": "https://app.example.com",
  "logo_uri": "https://app.example.com/logo.png",
  "redirect_uris": ["http://127.0.0.1:3000/callback", "http://localhost:3000/callback"],
  "grant_types": ["authorization_code"],
  "response_types": ["code"],
  "token_endpoint_auth_method": "none"
}
```

MCP also says authorization servers should cache these documents respecting HTTP cache headers and must validate redirect URIs in an authorization request against those in the document.

## Keep secrets out of the public document

Because metadata documents are publicly accessible, [section 4.1 of the draft](https://datatracker.ietf.org/doc/draft-ietf-oauth-client-id-metadata-document/) forbids client\_secret and client\_secret\_expires\_at in them. It also forbids listing client\_secret\_post, client\_secret\_basic, client\_secret\_jwt or any other shared-secret method in token\_endpoint\_auth\_method or token\_endpoint\_auth\_methods\_supported. Private key material must not appear; only public keys, such as those published through jwks or jwks\_uri, are permitted.

Clients able to keep private key material should authenticate with a key-pair method such as private\_key\_jwt. When a client declares it and your server supports it, the server must require client authentication according to Section 2.2 of RFC 7523, using a key discovered from the client's document, and that document must include jwks or jwks\_uri. If a document declares neither token\_endpoint\_auth\_method nor token\_endpoint\_auth\_methods\_supported, the server must assume none, and it must not apply the RFC 7591 default of client\_secret\_basic.

## Match redirect URIs exactly

As [RFC 7591](https://www.rfc-editor.org/rfc/rfc7591.html) states, citing Section 2 of RFC 6749, clients using flows with redirection must register their redirection URIs, and a server that supports dynamic registration for redirect-based flows must support the redirect\_uris field. Compare a client's redirection URI against the registered ones by exact string matching, which [RFC 9700](https://www.rfc-editor.org/rfc/rfc9700.html) requires except for port numbers in localhost redirection URIs of native apps. With CIMD, the registered redirect URLs are the ones the server reads when it fetches the document ([CIMD draft](https://datatracker.ietf.org/doc/draft-ietf-oauth-client-id-metadata-document/)).

The [MCP spec](https://modelcontextprotocol.io/specification/2025-11-25/basic/authorization) warns that metadata documents cannot prevent localhost URL impersonation by themselves, because an attacker can present a legitimate client's metadata URL and bind to any localhost port. Authorization servers should display additional warnings for localhost-only redirect URIs and may require additional attestation mechanisms.

## DCR as Auth0 and Keycloak ship it

[Auth0's documentation](https://auth0.com/docs/get-started/applications/dynamic-client-registration) states that DCR is disabled by default for all tenants and that its /oidc/register endpoint accepts POST registration requests without an access token, because Auth0 supports Open Dynamic Registration. Once DCR is enabled, anyone can create applications in the tenant without a token. Applications registered this way are third-party applications that receive a tpc\_ client ID prefix, require PKCE for authorization code flows and support only the authorization\_code and refresh\_token grant types. Third-party developers cannot modify application settings after registration and must contact the tenant owner for changes.

Related: [PKCE defined](https://agentreadychecklist.com/glossary/pkce/)

[Keycloak's guide](https://www.keycloak.org/securing-apps/client-registration) calls initial access tokens the recommended approach to registering new clients. Each one can only create clients, carries a configurable expiration and a configurable limit on how many clients it can create, and is created in the admin console. The guide gives Keycloak's OpenID Connect dynamic client registration endpoint as a path ending in `/clients-registrations/openid-connect`. Requests without any token are anonymous, and Client Registration Policies limit who can register and under which conditions. The Trusted Hosts Policy whitelists no host by default, so anonymous registration is de facto disabled until you configure it. The Max Clients Policy rejects registration once the current number of clients reaches the specified limit, 200 by default for anonymous registrations. Registration access token rotation is enabled by default, so each token is valid once and the response to its use includes a new one.

## Sources

-   [RFC 7591: OAuth 2.0 Dynamic Client Registration Protocol](https://www.rfc-editor.org/rfc/rfc7591.html)IETF / RFC Editor, read 2026-11-22
-   [RFC 7592: OAuth 2.0 Dynamic Client Registration Management Protocol](https://www.rfc-editor.org/rfc/rfc7592.html)IETF / RFC Editor, read 2026-11-22
-   [RFC 8414: OAuth 2.0 Authorization Server Metadata](https://www.rfc-editor.org/rfc/rfc8414.html)IETF / RFC Editor, read 2026-11-22
-   [OAuth Client ID Metadata Document (draft-ietf-oauth-client-id-metadata-document)](https://datatracker.ietf.org/doc/draft-ietf-oauth-client-id-metadata-document/)IETF Datatracker, read 2026-11-22
-   [RFC 9728: OAuth 2.0 Protected Resource Metadata](https://www.rfc-editor.org/rfc/rfc9728.html)IETF / RFC Editor, read 2026-11-22
-   [RFC 9700: Best Current Practice for OAuth 2.0 Security](https://www.rfc-editor.org/rfc/rfc9700.html)IETF / RFC Editor, read 2026-11-22
-   [MCP specification: Authorization (2025-11-25)](https://modelcontextprotocol.io/specification/2025-11-25/basic/authorization)Model Context Protocol, read 2026-11-22
-   [Dynamic Client Registration (Auth0 Docs)](https://auth0.com/docs/get-started/applications/dynamic-client-registration)Auth0, read 2026-11-22
-   [Client registration service (Keycloak)](https://www.keycloak.org/securing-apps/client-registration)Keycloak, read 2026-11-22

Edition

Data

2026-11-04

Reviewed

2026-11-22

Spec

AgentReady v2.0.1, db79f10

Crawl

13,071 rows, 2026-11-04

Ora

132 checks, contract 1.38.0, 2026-11-05

Verify with Ora

The scanner this site recommends for the whole checklist. 132 checks, a score out of 100, no account.

`npx ax@0.10 audit <url> --min-score <n>`

[Why Ora, and its limits](https://agentreadychecklist.com/verify-with-ora/)

Method

-   [How rows, commands and rates are made](https://agentreadychecklist.com/method/)
-   [How an Ora check is matched to a row](https://agentreadychecklist.com/checklist/ora-checks/)
-   [Pass rates by rank band](https://agentreadychecklist.com/data/by-rank/)

Sources and read dates sit at the foot of the page.

Last reviewed 2026-11-22. AgentReady v2.0.1, read 2026-11-24.
