| Package | Description |
|---|---|
| io.modelcontextprotocol.client | |
| io.modelcontextprotocol.server | |
| io.modelcontextprotocol.spec |
| Modifier and Type | Method and Description |
|---|---|
void |
McpSyncClient.addRoot(McpSchema.Root root)
Add a roots dynamically.
|
reactor.core.publisher.Mono<Void> |
McpAsyncClient.addRoot(McpSchema.Root root)
Adds a new root to the client's root list.
|
McpClient.SyncSpec |
McpClient.SyncSpec.roots(McpSchema.Root... roots)
Sets the root URIs that this client can access, using a varargs parameter for
convenience.
|
McpClient.AsyncSpec |
McpClient.AsyncSpec.roots(McpSchema.Root... roots)
Sets the root URIs that this client can access, using a varargs parameter for
convenience.
|
| Modifier and Type | Method and Description |
|---|---|
McpClient.SyncSpec |
McpClient.SyncSpec.roots(List<McpSchema.Root> roots)
Sets the root URIs that this client can access.
|
McpClient.AsyncSpec |
McpClient.AsyncSpec.roots(List<McpSchema.Root> roots)
Sets the root URIs that this client can access.
|
| Modifier and Type | Method and Description |
|---|---|
McpServer.SyncSpecification<S> |
McpServer.SyncSpecification.rootsChangeHandler(BiConsumer<McpSyncServerExchange,List<McpSchema.Root>> handler)
Registers a consumer that will be notified when the list of roots changes.
|
McpServer.AsyncSpecification<S> |
McpServer.AsyncSpecification.rootsChangeHandler(BiFunction<McpAsyncServerExchange,List<McpSchema.Root>,reactor.core.publisher.Mono<Void>> handler)
Registers a consumer that will be notified when the list of roots changes.
|
McpServer.SyncSpecification<S> |
McpServer.SyncSpecification.rootsChangeHandlers(List<BiConsumer<McpSyncServerExchange,List<McpSchema.Root>>> handlers)
Registers multiple consumers that will be notified when the list of roots
changes.
|
McpServer.AsyncSpecification<S> |
McpServer.AsyncSpecification.rootsChangeHandlers(List<BiFunction<McpAsyncServerExchange,List<McpSchema.Root>,reactor.core.publisher.Mono<Void>>> handlers)
Registers multiple consumers that will be notified when the list of roots
changes.
|
| Constructor and Description |
|---|
ListRootsResult(List<McpSchema.Root> roots) |
ListRootsResult(List<McpSchema.Root> roots,
String nextCursor) |
Copyright © 2025. All rights reserved.