MCP TypeScript SDK (V2)
    Preparing search index...

    Stores information about registered OAuth clients for this server.

    interface OAuthRegisteredClientsStore {
        getClient(
            clientId: string,
        ):
            | {
                client_id: string;
                client_id_issued_at?: number;
                client_name?: string;
                client_secret?: string;
                client_secret_expires_at?: number;
                client_uri?: string;
                contacts?: string[];
                grant_types?: string[];
                jwks?: any;
                jwks_uri?: string;
                logo_uri?: string;
                policy_uri?: string;
                redirect_uris: string[];
                response_types?: string[];
                scope?: string;
                software_id?: string;
                software_statement?: string;
                software_version?: string;
                token_endpoint_auth_method?: string;
                tos_uri?: string;
            }
            | Promise<
                | {
                    client_id: string;
                    client_id_issued_at?: number;
                    client_name?: string;
                    client_secret?: string;
                    client_secret_expires_at?: number;
                    client_uri?: string;
                    contacts?: string[];
                    grant_types?: string[];
                    jwks?: any;
                    jwks_uri?: string;
                    logo_uri?: string;
                    policy_uri?: string;
                    redirect_uris: string[];
                    response_types?: string[];
                    scope?: string;
                    software_id?: string;
                    software_statement?: string;
                    software_version?: string;
                    token_endpoint_auth_method?: string;
                    tos_uri?: string;
                }
                | undefined,
            >
            | undefined;
        registerClient?(
            client: Omit<
                OAuthClientInformationFull,
                "client_id"
                | "client_id_issued_at",
            >,
        ):
            | {
                client_id: string;
                client_id_issued_at?: number;
                client_name?: string;
                client_secret?: string;
                client_secret_expires_at?: number;
                client_uri?: string;
                contacts?: string[];
                grant_types?: string[];
                jwks?: any;
                jwks_uri?: string;
                logo_uri?: string;
                policy_uri?: string;
                redirect_uris: string[];
                response_types?: string[];
                scope?: string;
                software_id?: string;
                software_statement?: string;
                software_version?: string;
                token_endpoint_auth_method?: string;
                tos_uri?: string;
            }
            | Promise<
                {
                    client_id: string;
                    client_id_issued_at?: number;
                    client_name?: string;
                    client_secret?: string;
                    client_secret_expires_at?: number;
                    client_uri?: string;
                    contacts?: string[];
                    grant_types?: string[];
                    jwks?: any;
                    jwks_uri?: string;
                    logo_uri?: string;
                    policy_uri?: string;
                    redirect_uris: string[];
                    response_types?: string[];
                    scope?: string;
                    software_id?: string;
                    software_statement?: string;
                    software_version?: string;
                    token_endpoint_auth_method?: string;
                    tos_uri?: string;
                },
            >;
    }
    Index

    Methods

    • Returns information about a registered client, based on its ID.

      Parameters

      • clientId: string

      Returns
          | {
              client_id: string;
              client_id_issued_at?: number;
              client_name?: string;
              client_secret?: string;
              client_secret_expires_at?: number;
              client_uri?: string;
              contacts?: string[];
              grant_types?: string[];
              jwks?: any;
              jwks_uri?: string;
              logo_uri?: string;
              policy_uri?: string;
              redirect_uris: string[];
              response_types?: string[];
              scope?: string;
              software_id?: string;
              software_statement?: string;
              software_version?: string;
              token_endpoint_auth_method?: string;
              tos_uri?: string;
          }
          | Promise<
              | {
                  client_id: string;
                  client_id_issued_at?: number;
                  client_name?: string;
                  client_secret?: string;
                  client_secret_expires_at?: number;
                  client_uri?: string;
                  contacts?: string[];
                  grant_types?: string[];
                  jwks?: any;
                  jwks_uri?: string;
                  logo_uri?: string;
                  policy_uri?: string;
                  redirect_uris: string[];
                  response_types?: string[];
                  scope?: string;
                  software_id?: string;
                  software_statement?: string;
                  software_version?: string;
                  token_endpoint_auth_method?: string;
                  tos_uri?: string;
              }
              | undefined,
          >
          | undefined

    • Registers a new client with the server. The client ID and secret will be automatically generated by the library. A modified version of the client information can be returned to reflect specific values enforced by the server.

      NOTE: Implementations should NOT delete expired client secrets in-place. Auth middleware provided by this library will automatically check the client_secret_expires_at field and reject requests with expired secrets. Any custom logic for authenticating clients should check the client_secret_expires_at field as well.

      If unimplemented, dynamic client registration is unsupported.

      Parameters

      Returns
          | {
              client_id: string;
              client_id_issued_at?: number;
              client_name?: string;
              client_secret?: string;
              client_secret_expires_at?: number;
              client_uri?: string;
              contacts?: string[];
              grant_types?: string[];
              jwks?: any;
              jwks_uri?: string;
              logo_uri?: string;
              policy_uri?: string;
              redirect_uris: string[];
              response_types?: string[];
              scope?: string;
              software_id?: string;
              software_statement?: string;
              software_version?: string;
              token_endpoint_auth_method?: string;
              tos_uri?: string;
          }
          | Promise<
              {
                  client_id: string;
                  client_id_issued_at?: number;
                  client_name?: string;
                  client_secret?: string;
                  client_secret_expires_at?: number;
                  client_uri?: string;
                  contacts?: string[];
                  grant_types?: string[];
                  jwks?: any;
                  jwks_uri?: string;
                  logo_uri?: string;
                  policy_uri?: string;
                  redirect_uris: string[];
                  response_types?: string[];
                  scope?: string;
                  software_id?: string;
                  software_statement?: string;
                  software_version?: string;
                  token_endpoint_auth_method?: string;
                  tos_uri?: string;
              },
          >