Package-level declarations

Types

Link copied to clipboard
abstract class AbstractMcpClient(clientInfo: VersionedMcpEntity, capabilities: ClientCapabilities, protocolVersion: ProtocolVersion = LATEST_VERSION, defaultTimeout: Duration) : McpClient
Link copied to clipboard

Client for the MCP protocol. Provides access to the various resources and tools on ths MCP Server

Functions

Link copied to clipboard
fun ClientFilters.DiscoveredMcpOAuth(clientCredentials: Credentials, scopes: List<String> = emptyList(), clock: Clock = Clock.systemUTC()): Filter

MCP OAuth Client filter using the standard client_credentials grant. Suitable for machine-to-machine scenarios where the client has a client ID and secret. Discovers the authorization server automatically from the MCP resource server's WWW-Authenticate header or .well-known endpoint (SEP-985 fallback).

fun ClientFilters.DiscoveredMcpOAuth(clientCredentials: Credentials, oAuthFlowFilter: Filter, clock: Clock = Clock.systemUTC()): Filter

MCP OAuth Client filter with a custom initial grant flow but standard client_credentials-based refresh. Use when the initial token acquisition uses a non-standard grant (e.g. JWT assertion for ID-JAG) but the client still has credentials for refreshing tokens.

fun ClientFilters.DiscoveredMcpOAuth(oAuthFlowFilter: Filter, oAuthRefreshFilter: (RefreshToken) -> Filter, clock: Clock = Clock.systemUTC()): Filter

MCP OAuth Client filter with fully pluggable grant and refresh flows. Use for enterprise auth scenarios where neither the initial grant nor the refresh use client credentials. Both the initial token acquisition and token refresh are controlled by the provided filters.