/** * Dynamic Client Registration (RFC 7591) for MCP OAuth. * * When connecting to an MCP server that supports DCR, the client can * register itself automatically without manual pre-registration. * * Flow: * 1. POST to registration endpoint with client metadata * 2. Receive client_id (and optionally client_secret) * 3. Use credentials for subsequent OAuth flows */ export interface DcrClientMetadata { /** Human-readable client name. */ clientName: string; /** Redirect URIs for OAuth callbacks. */ redirectUris: string[]; /** Grant types requested (default: ['authorization_code']). */ grantTypes?: string[]; /** Response types (default: ['code']). */ responseTypes?: string[]; /** Token endpoint auth method (default: 'none' for public clients). */ tokenEndpointAuthMethod?: 'none' | 'client_secret_basic' | 'client_secret_post'; /** Scopes the client may request. */ scope?: string; } export interface DcrRegistrationResponse { /** Assigned client ID. */ clientId: string; /** Assigned client secret (for confidential clients). */ clientSecret?: string; /** When the credentials expire (ISO date or undefined for non-expiring). */ clientIdIssuedAt?: number; clientSecretExpiresAt?: number; /** Echoed metadata. */ clientName?: string; redirectUris?: string[]; grantTypes?: string[]; } /** * Register a client with an MCP server's DCR endpoint (RFC 7591). * * @param registrationEndpoint - The DCR endpoint URL. * @param metadata - Client metadata to register. * @param initialAccessToken - Optional bearer token for protected registration endpoints. */ export declare function registerClient(registrationEndpoint: string, metadata: DcrClientMetadata, initialAccessToken?: string): Promise; //# sourceMappingURL=dcr.d.ts.map