| Package | Description |
|---|---|
| io.modelcontextprotocol.client |
| Modifier and Type | Method and Description |
|---|---|
static McpClient.AsyncSpec |
McpClient.async(McpClientTransport transport)
Start building an asynchronous MCP client with the specified transport layer.
|
McpClient.AsyncSpec |
McpClient.AsyncSpec.capabilities(McpSchema.ClientCapabilities capabilities)
Sets the client capabilities that will be advertised to the server during
connection initialization.
|
McpClient.AsyncSpec |
McpClient.AsyncSpec.clientInfo(McpSchema.Implementation clientInfo)
Sets the client implementation information that will be shared with the server
during connection initialization.
|
McpClient.AsyncSpec |
McpClient.AsyncSpec.initializationTimeout(Duration initializationTimeout) |
McpClient.AsyncSpec |
McpClient.AsyncSpec.loggingConsumer(Function<McpSchema.LoggingMessageNotification,reactor.core.publisher.Mono<Void>> loggingConsumer)
Adds a consumer to be notified when logging messages are received from the
server.
|
McpClient.AsyncSpec |
McpClient.AsyncSpec.loggingConsumers(List<Function<McpSchema.LoggingMessageNotification,reactor.core.publisher.Mono<Void>>> loggingConsumers)
Adds multiple consumers to be notified when logging messages are received from
the server.
|
McpClient.AsyncSpec |
McpClient.AsyncSpec.promptsChangeConsumer(Function<List<McpSchema.Prompt>,reactor.core.publisher.Mono<Void>> promptsChangeConsumer)
Adds a consumer to be notified when the available prompts change.
|
McpClient.AsyncSpec |
McpClient.AsyncSpec.requestTimeout(Duration requestTimeout)
Sets the duration to wait for server responses before timing out requests.
|
McpClient.AsyncSpec |
McpClient.AsyncSpec.resourcesChangeConsumer(Function<List<McpSchema.Resource>,reactor.core.publisher.Mono<Void>> resourcesChangeConsumer)
Adds a consumer to be notified when the available resources change.
|
McpClient.AsyncSpec |
McpClient.AsyncSpec.roots(List<McpSchema.Root> roots)
Sets the root URIs that this client can access.
|
McpClient.AsyncSpec |
McpClient.AsyncSpec.roots(McpSchema.Root... roots)
Sets the root URIs that this client can access, using a varargs parameter for
convenience.
|
McpClient.AsyncSpec |
McpClient.AsyncSpec.sampling(Function<McpSchema.CreateMessageRequest,reactor.core.publisher.Mono<McpSchema.CreateMessageResult>> samplingHandler)
Sets a custom sampling handler for processing message creation requests.
|
McpClient.AsyncSpec |
McpClient.AsyncSpec.toolsChangeConsumer(Function<List<McpSchema.Tool>,reactor.core.publisher.Mono<Void>> toolsChangeConsumer)
Adds a consumer to be notified when the available tools change.
|
McpClient.AsyncSpec |
McpClient.AsyncSpec.withConnectOnInit(boolean connectOnInit)
Sets whether to connect to the server during the initialization phase (open an
SSE stream).
|
Copyright © 2025. All rights reserved.