| Package | Description |
|---|---|
| io.modelcontextprotocol.server | |
| io.modelcontextprotocol.spec |
| Modifier and Type | Method and Description |
|---|---|
reactor.core.publisher.Mono<Void> |
McpNotificationHandler.handle(McpAsyncServerExchange exchange,
Object params)
Handles a notification from the client.
|
reactor.core.publisher.Mono<T> |
McpRequestHandler.handle(McpAsyncServerExchange exchange,
Object params)
Handles a request from the client.
|
| Modifier and Type | Method and Description |
|---|---|
McpServerFeatures.AsyncToolSpecification.Builder |
McpServerFeatures.AsyncToolSpecification.Builder.callHandler(BiFunction<McpAsyncServerExchange,McpSchema.CallToolRequest,reactor.core.publisher.Mono<McpSchema.CallToolResult>> callHandler)
Sets the call tool handler function.
|
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.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.
|
McpServer.AsyncSpecification<S> |
McpServer.AsyncSpecification.tool(McpSchema.Tool tool,
BiFunction<McpAsyncServerExchange,Map<String,Object>,reactor.core.publisher.Mono<McpSchema.CallToolResult>> handler)
Deprecated.
Use
McpServer.AsyncSpecification.toolCall(McpSchema.Tool, BiFunction) instead for tool
calls that require a request object. |
McpServer.AsyncSpecification<S> |
McpServer.AsyncSpecification.toolCall(McpSchema.Tool tool,
BiFunction<McpAsyncServerExchange,McpSchema.CallToolRequest,reactor.core.publisher.Mono<McpSchema.CallToolResult>> callHandler)
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.
|
| Constructor and Description |
|---|
Async(McpSchema.Implementation serverInfo,
McpSchema.ServerCapabilities serverCapabilities,
List<McpServerFeatures.AsyncToolSpecification> tools,
Map<String,McpServerFeatures.AsyncResourceSpecification> resources,
List<McpSchema.ResourceTemplate> resourceTemplates,
Map<String,McpServerFeatures.AsyncPromptSpecification> prompts,
Map<McpSchema.CompleteReference,McpServerFeatures.AsyncCompletionSpecification> completions,
List<BiFunction<McpAsyncServerExchange,List<McpSchema.Root>,reactor.core.publisher.Mono<Void>>> rootsChangeConsumers,
String instructions)
Create an instance and validate the arguments.
|
AsyncToolSpecification(McpSchema.Tool tool,
BiFunction<McpAsyncServerExchange,Map<String,Object>,reactor.core.publisher.Mono<McpSchema.CallToolResult>> call)
Deprecated.
Use
AsyncToolSpecification(McpSchema.Tool, null,
BiFunction) instead. |
| Modifier and Type | Method and Description |
|---|---|
reactor.core.publisher.Mono<Void> |
McpServerSession.NotificationHandler.handle(McpAsyncServerExchange exchange,
Object params)
Deprecated.
Handles a notification from the client.
|
reactor.core.publisher.Mono<T> |
McpServerSession.RequestHandler.handle(McpAsyncServerExchange exchange,
Object params)
Deprecated.
Handles a request from the client.
|
Copyright © 2025. All rights reserved.