Implement Client ID Metadata Documents (CIMD) for MCP Authorization (SEP-991)
Everyone can contribute. Help move this issue forward while earning points, leveling up and collecting rewards.
The MCP 2025-11-25 specification introduces URL-based client registration using OAuth Client ID Metadata Documents (CIMD) as a replacement for the problematic Dynamic Client Registration (DCR) approach.
What is CIMD?
- Clients can provide their own client ID that is a URL pointing to a JSON document the client manages, describing properties of the client.
- Authorization servers fetch and cache this document and use it as the source of truth for the client’s metadata (for example, name, redirect URIs, logo, documentation links).
This eliminates the need for:
- Public DCR APIs that require rate limiting and security measures.
- Unbounded database growth from client registrations.
- Complex OAuth proxy implementations.
- Manual client registration by users or IT teams.
Benefits
- No more Dynamic Client Registration complexity in the common path.
- Clients control their own metadata in a self-service way.
- Authorization Servers do not need to implement DCR endpoints for primary flows.
- Simpler integration path for new MCP clients and servers.
- Better enterprise adoption story through more predictable and governable client identities.
Implementation requirements
- Support URL-based client IDs.
- Implement client metadata document fetching, parsing, and caching.
- Update authorization flows to support CIMD-based registration.
- Maintain backward compatibility with pre-registered clients.
- Maintain backward compatibility with existing DCR-based clients as a fallback.
- Implement security measures for:
- SSRF risks when fetching client metadata documents.
- Localhost and loopback redirect URI handling.
- Make the client selection logic pluggable enough that different MCP client types (for example, editors, CLIs, agents) can be supported without reintroducing client sprawl.
Product requirements for MCP usage
To address operational and governance concerns for MCP, CIMD support should be paired with specific behavioral requirements:
-
One logical client per tool
- For a given MCP tool (for example, a specific editor extension or agent implementation), GitLab should treat the CIMD URL as the stable identity for that tool.
- The authorization server should avoid creating a new OAuth client for every connection or user session.
- DCR should remain available only as a backward-compatibility mechanism, not as the primary path for MCP tooling.
-
Reuse instead of proliferation
- When an MCP client connects and presents a known CIMD URL, GitLab should reuse the existing OAuth client associated with that CIMD URL.
- Subsequent users of the same MCP tool should authorize against the same logical client, rather than triggering the creation of additional instance-level OAuth applications.
- Where appropriate, pre-registered clients can be mapped to known CIMD URLs so that existing enterprise governance patterns continue to work.
-
Clear admin control and visibility
- Instance administrators should have a way to see which MCP tools are known to the instance, including:
- The CIMD URL for each tool.
- The corresponding OAuth application entry or entries.
- Whether the client was introduced through pre-registration, CIMD, or DCR.
- Administrators should be able to:
- Enable or disable specific MCP tools at the instance level.
- Revoke or rotate a client used by an MCP tool without needing to inspect a large number of nearly identical applications.
- The design should make it easy to distinguish:
- A small, governed set of MCP-related clients that many users can connect to.
- Any legacy or fallback dynamic clients created via DCR.
- Instance administrators should have a way to see which MCP tools are known to the instance, including:
Priority order (as per spec)
- Use pre-registration, if available.
- Use the CIMD-based approach.
- Use the DCR-based approach (backward compatibility).
- Ask the user to provide client details.
References
Related to
Epic: &20387
Edited by 🤖 GitLab Bot 🤖