Testing CIMD client registration for MCP with Claude Code and Codex CLI
The MCP authorization spec made Client ID Metadata Documents (CIMD[1]) the recommended way to register clients from the 2025-11-25 version. The 2026-07-28 version marked Dynamic Client Registration (DCR[2]) as deprecated, and the spec's deprecation list says DCR may be removed in versions released as early as 28 July 2027. The author built a minimal MCP server that supports both methods and connected Claude Code 2.1.322 and Codex CLI 0.167.0 to see which method each client uses.
In three test setups, both clients chose CIMD when the server offered it and DCR when it offered only DCR. Claude Code got as far as the tools/list call, and Codex CLI got as far as obtaining a token. The published metadata lists redirect URI[3] values without a port, but real requests carry a port that changes on each start, so an exact string match failed. The author added a match that ignores the port for loopback addresses, which RFC 8252 allows only for 127.0.0.1 and [::1], and extended it to localhost for compatibility. The check is valid only when PKCE[4] is required with the S256 method.
CIMD shows only which domain published the metadata, so a public client identified by a URL alone could be impersonated by another program; client identification and client authentication must be considered separately. The mock does not guard against DNS rebinding, so production use needs extra measures such as pinning the resolved IP address.
Sources
-
JPZenn JA
MCP の CIMD 対応サーバーを作って、Claude Code と Codex CLI で試してみた


