Dynamic client registration

From RedHatProductSecurity/prodsec-skills · View interactive version

Dynamic client registration is an AI agent skill from the GitHub repository RedHatProductSecurity/prodsec-skills. Support OAuth 2.0 Dynamic Client Registration in authorization servers. Use when building or reviewing authorization server client management for MCP ecosystems.

How to use this skill

Skill file

Dynamic Client Registration for Authorization Servers

Security Recommendation

Authorization servers MAY support the OAuth 2.0 Dynamic Client Registration Protocol (RFC 7591). This allows MCP clients to register automatically without manual intervention.

Registration Endpoint

If supported, the authorization server MUST expose a registration_endpoint in its discovery metadata and handle registration requests per RFC 7591.

Example Registration Request

POST /register HTTP/1.1
Host: auth.example.com
Content-Type: application/json

{
  "client_name": "MCP Client App",
  "redirect_uris": ["https://client.example.com/callback"],
  "grant_types": ["authorization_code"],
  "response_types": ["code"],
  "token_endpoint_auth_method": "none",
  "scope": "tools:read tools:execute"
}

Example Registration Response

{
  "client_id": "generated-client-id",
  "client_id_issued_at": 1700000000,
  "redirect_uris": ["https://client.example.com/callback"],
  "grant_types": ["authorization_code"],
  "response_types": ["code"],
  "token_endpoint_auth_method": "none"
}

Security Considerations

| Concern | Mitigation |

|---|---|

| Abuse/spam registrations | Rate limit registration endpoint, require initial access tokens |

| Malicious redirect URIs | Validate redirect URIs strictly (HTTPS, no open redirectors) |

| Resource exhaustion | Limit number of registrations per IP/token, expire unused registrations |

| Privilege escalation | Only grant requested scopes that are within the server's allowed set |

Implementation Checklist

Use this skill with your AI agent: Open on Skill Issue to copy, download, or add to your library. Works with Claude, ChatGPT, Gemini, Cursor, Windsurf and more.