Register OAuth client (anonymous DCR)
Changed onRegister a public OAuth client anonymously (RFC 7591 subset).
Returns 201 with the new client_id, or 200 with the existing row's client_id on an exact dedupe match (D8, extended per G13/#1251): (software_id + redirect-URI set), falling back to (client_name + redirect-URI set) for registrations without a software_id — so a pending client's awaiting-approval retry loop re-attaches instead of minting duplicate rows. Re-registering a client an administrator has deactivated re-enters the approval queue: the registration re-attaches (200) and the client awaits a fresh admin decision (#1312). No client_secret is ever issued here and no registration_access_token is returned (D12). New rows await admin approval unless the deployment auto-approves registrations (D9). The server.mcp.oauth.enabled gate lives on the route class — a disabled door 404s before this handler, its body validation, or the rate limiter ever run.
Request
- Base URL: / (relative, and the document was published on a file host, not at the API’s origin)
- URL: /oauth-clients
- Auth: none required
Request body
Example request
{
"application_type": "native",
"client_name": "Cursor",
"grant_types": [
"authorization_code",
"refresh_token"
],
"redirect_uris": [
"https://client.example.com/oauth/callback"
],
"response_types": [
"code"
],
"scope": "apis:read capabilities:execute",
"software_id": "com.example.mcp-client",
"software_version": "1.4.2",
"token_endpoint_auth_method": "none"
}Response
Successful Response
Example response
{
"application_type": "native",
"client_id": "oc_Xk3vQ9mT2pLw8RzN5bYc1HdF7gJs4AeU",
"client_id_issued_at": 1767225600,
"client_name": "Cursor",
"grant_types": [
"authorization_code",
"refresh_token"
],
"redirect_uris": [
"https://client.example.com/oauth/callback"
],
"response_types": [
"code"
],
"scope": "apis:read capabilities:execute",
"software_id": "com.example.mcp-client",
"software_version": "1.4.2",
"token_endpoint_auth_method": "none"
}Changes
- info
added the media type
application/jsonfor the response with the status
- info
- info
endpoint added
- info