Amazon Cognito Now Accepts MCP Clients by URL: CIMD Without App Clients

Nov 20, 2026 · 6 min · Ajay Kumar

Amazon Cognito added support for OAuth Client ID Metadata Documents (CIMD) on 19 November 2026, per the AWS What's New post. An MCP client can now sign a user in to a Cognito user pool by presenting an HTTPS URL as its client_id, with no app client created for it in advance and no Dynamic Client Registration (DCR). For anyone who put a remote MCP server behind Cognito, this removes the most awkward part of the setup.

What happened

CIMD is the client registration method the MCP authorization spec has preferred since revision 2025-11-25, and the 2026-07-28 revision deprecated DCR in its favour. I covered why in MCP Authorization Explained: DCR endpoints are unauthenticated, the metadata is self-asserted, and registrations pile up with nobody sure which ones are safe to delete. With CIMD, defined in an IETF OAuth working group draft, the client hosts a JSON document at the URL it uses as its ID, and the authorization server fetches it at sign-in.

Cognito's version works through CIMD policies. From the developer guide:

  • A policy maps one or more metadata URL patterns to exactly one existing app client. You still create one app client; it becomes the template for every external client the policy admits.
  • Patterns must be https and may contain a single * wildcard, such as https://*.example.com/cimd/metadata.json. A pattern that is only a wildcard is rejected. Host matching is case-insensitive, path matching is case-sensitive, and the most specific match wins.
  • Any /oauth2/authorize request whose client_id URL matches no pattern is rejected.
  • Up to 10 policies per user pool. The console has a new MCP Auth page under each user pool; the CLI has create-cimd-policy and friends.
  • The pool's OpenID discovery document advertises client_id_metadata_document_supported only once at least one policy exists. MCP clients look for that flag before trying CIMD.
  • CIMD is on the Essentials and Plus feature plans, in every Region that has Cognito.

The rules that will trip you up

Rule What Cognito does
Client type Public clients only. token_endpoint_auth_method must allow none. No private_key_jwt, no shared secret
Grants Authorization code and implicit only. No client_credentials. A grant must be on the app client, in the document and in the request
Scopes Intersection of the app client's scopes and the request. If the request names no scope, every scope on the app client is granted
Redirect URIs Taken from the metadata document, not the app client. Loopback redirects may use any port
Document size 5 KiB maximum. 1 second per fetch, up to 3 retries
Caching cache-control from the document, clamped to 1 day minimum and 1 year maximum. UpdateClientMetadataURLState with REFRESH or INVALIDATE acts on one URL now
Fetch timing Exact URLs are fetched after you save the policy; wildcard URLs at sign-in, failing without a redirect if unreachable

Two of these matter more than they look. First, the scope rule: if a client omits scope, it gets everything the template app client has. Keep that app client's scopes to the read-only minimum and make clients ask for write scopes explicitly. Second, the implicit grant: OAuth 2.1, which MCP builds on, drops it, and MCP clients use the authorization code flow with PKCE. Leave implicit off the template app client so no CIMD client can use it.

What I ran

I cannot create a Cognito user pool from this machine, so I did not test Cognito itself. What I could check is whether the CIMD documents real MCP clients publish today would pass Cognito's documented rules. I fetched the two I know the URLs of on 20 November 2026, VS Code's and Claude's:

curl -s -D - https://vscode.dev/oauth/client-metadata.json
curl -s -D - https://claude.ai/oauth/mcp-oauth-client-metadata
Check VS Code Claude
Size 477 bytes 342 bytes
client_id equals the URL Yes Yes
token_endpoint_auth_method none none
Grant types authorization_code, refresh_token, device code authorization_code, refresh_token, jwt-bearer
Redirect URIs http://127.0.0.1:33418/, https://vscode.dev/redirect https://claude.ai/api/mcp/auth_callback
cache-control no-store,no-cache,max-age=0 public, max-age=300

Both are public clients well under 5 KiB, so both fit. Both send cache lifetimes below Cognito's one-day floor, so Cognito will use your policy's CacheDuration instead, at least 86,400 seconds. If a client vendor rotates its redirect URI, your pool keeps the old document for up to that long unless you call REFRESH. A policy for these two clients would list both exact URLs, no wildcard, which also means Cognito validates them as soon as you save.

The VS Code document shows the limit the MCP spec itself warns about. It lists a loopback redirect, and Cognito lets loopback redirects use any port. Any local process that starts a sign-in with VS Code's client_id can receive the code on a port it controls. That is not a Cognito bug, it is how CIMD works for native clients, but it means the consent screen and the redirect host are the user's only defence. CIMD tells you which domain vouches for a client; it does not prove the request came from that client.

What changes for engineers

  • You can delete the DCR workarounds. If you built a Lambda that pre-creates Cognito app clients for MCP clients, or opened a registration endpoint, CIMD replaces both for public clients.
  • Allow clients by domain, not by registration. A policy that lists https://vscode.dev/oauth/client-metadata.json and https://claude.ai/oauth/mcp-oauth-client-metadata admits exactly those two. Avoid broad wildcards: one on a domain where anyone can host files admits anyone.
  • Machine-to-machine agents still need app clients. No client_credentials through CIMD, so a CI job or headless agent keeps a pre-registered confidential client. Those are the clients the MCP Python SDK issuer bug put at risk, so pin them to their issuer.

What to do this week

  • If you run an MCP server on Cognito, check your feature plan (Essentials or Plus), create one narrowly scoped template app client with only the authorization code grant, and add a CIMD policy with exact URLs for the clients you support.
  • Fetch each client's document yourself, as above, and note its redirect URIs. That is what your users will see on the consent screen.
  • Turn on CloudTrail review for wildcard policies, because runtime fetch errors only show up there.

I have added Cognito to the authorization server rows of the MCP changelog tracker. For the server side of the same setup on Keycloak, see How to Deploy a Secure Remote MCP Server with OAuth.

FAQ

Does Amazon Cognito support Dynamic Client Registration for MCP?

Cognito's CIMD documentation positions CIMD as the way to avoid per-client registration and DCR. For MCP clients that publish a metadata document, use a CIMD policy. The MCP specification deprecated DCR in revision 2026-07-28 and keeps it only for authorization servers that lack CIMD.

Can a CIMD client use client credentials in Cognito?

No. Cognito treats every CIMD client as a public client with token_endpoint_auth_method of none, and CIMD does not support the client_credentials grant. Headless agents need a regular confidential app client.

How long does Cognito cache a client metadata document?

It follows the document's cache-control header, but never less than one day or more than one year. Below the minimum, as with VS Code and Claude today, it uses the policy's CacheDuration. You can force a re-fetch of one URL with update-client-metadata-url-state --action REFRESH.

Related: MCP Authorization Explained, MCP Changelog Tracker and Non-Human Identity in 2026.

Spot an error or something out of date? Email me and I will fix it and log it on the corrections page.

I'm Ajay Kumar — I build and operate PandaStack, an open-source Firecracker microVM cloud for AI agents, and write about the infrastructure and tooling around it.

Need this kind of infrastructure work? See what I do or email hello@ajayk.sh.


Related