Skip to main content

Function: buildAuthorizationServerMetadata()

buildAuthorizationServerMetadata(args): Rfc8414Metadata

Defined in: auth-core/src/oauth.ts:214

Builds an RFC 8414 Authorization Server Metadata object.

Advertises only the code response type, authorization_code grant, S256 PKCE, and the none token endpoint auth method — matching the MCP auth spec requirements.

Parameters​

ParameterTypeDescription
args{ authorizationEndpoint: string; issuer: string; registrationEndpoint?: string; tokenEndpoint: string; }-
args.authorizationEndpointstringURL of the authorization endpoint.
args.issuerstringThe authorization server's issuer identifier URI.
args.registrationEndpoint?stringURL of the dynamic client registration endpoint (optional).
args.tokenEndpointstringURL of the token endpoint.

Returns​

Rfc8414Metadata