@modelcontextprotocol/sdk
    Preparing search index...

    Function discoverOAuthProtectedResourceMetadata

    • Looks up RFC 9728 OAuth 2.0 Protected Resource Metadata.

      If the server returns a 404 for the well-known endpoint, this function will return undefined. Any other errors will be thrown as exceptions.

      Parameters

      • serverUrl: string | URL
      • Optionalopts: { protocolVersion?: string; resourceMetadataUrl?: string | URL }
      • fetchFn: FetchLike = fetch

      Returns Promise<
          objectOutputType<
              {
                  authorization_details_types_supported: ZodOptional<
                      ZodArray<ZodString, "many">,
                  >;
                  authorization_servers: ZodOptional<
                      ZodArray<
                          ZodEffects<ZodEffects<ZodString, string, string>, string, string>,
                          "many",
                      >,
                  >;
                  bearer_methods_supported: ZodOptional<ZodArray<ZodString, "many">>;
                  dpop_bound_access_tokens_required: ZodOptional<ZodBoolean>;
                  dpop_signing_alg_values_supported: ZodOptional<
                      ZodArray<ZodString, "many">,
                  >;
                  jwks_uri: ZodOptional<ZodString>;
                  resource: ZodString;
                  resource_documentation: ZodOptional<ZodString>;
                  resource_name: ZodOptional<ZodString>;
                  resource_policy_uri: ZodOptional<ZodString>;
                  resource_signing_alg_values_supported: ZodOptional<
                      ZodArray<ZodString, "many">,
                  >;
                  resource_tos_uri: ZodOptional<ZodString>;
                  scopes_supported: ZodOptional<ZodArray<ZodString, "many">>;
                  tls_client_certificate_bound_access_tokens: ZodOptional<ZodBoolean>;
              },
              ZodTypeAny,
              "passthrough",
          >,
      >