| Package | Description |
|---|---|
| io.modelcontextprotocol.server | |
| io.modelcontextprotocol.spec |
| Modifier and Type | Method and Description |
|---|---|
McpServer.AsyncSpecification |
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.AsyncSpecification |
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.
|
McpServer.AsyncSpecification |
McpServer.AsyncSpecification.tool(McpSchema.Tool tool,
BiFunction<McpAsyncServerExchange,Map<String,Object>,reactor.core.publisher.Mono<McpSchema.CallToolResult>> handler)
Adds a single tool with its implementation handler to the server.
|
| Constructor and Description |
|---|
McpSyncServerExchange(McpAsyncServerExchange exchange)
Create a new synchronous exchange with the client using the provided asynchronous
implementation as a delegate.
|
| Modifier and Type | Method and Description |
|---|---|
reactor.core.publisher.Mono<Void> |
McpServerSession.NotificationHandler.handle(McpAsyncServerExchange exchange,
Object params)
Handles a notification from the client.
|
reactor.core.publisher.Mono<T> |
McpServerSession.RequestHandler.handle(McpAsyncServerExchange exchange,
Object params)
Handles a request from the client.
|
Copyright © 2025. All rights reserved.