| Package | Description |
|---|---|
| io.modelcontextprotocol.server |
| Modifier and Type | Method and Description |
|---|---|
static McpServer.AsyncSpecification |
McpServer.async(McpServerTransportProvider transportProvider)
Starts building an asynchronous MCP server that provides non-blocking operations.
|
McpServer.AsyncSpecification |
McpServer.AsyncSpecification.capabilities(McpSchema.ServerCapabilities serverCapabilities)
Sets the server capabilities that will be advertised to clients during
connection initialization.
|
McpServer.AsyncSpecification |
McpServer.AsyncSpecification.objectMapper(com.fasterxml.jackson.databind.ObjectMapper objectMapper)
Sets the object mapper to use for serializing and deserializing JSON messages.
|
McpServer.AsyncSpecification |
McpServer.AsyncSpecification.prompts(List<McpServerFeatures.AsyncPromptSpecification> prompts)
Registers multiple prompts with their handlers using a List.
|
McpServer.AsyncSpecification |
McpServer.AsyncSpecification.prompts(Map<String,McpServerFeatures.AsyncPromptSpecification> prompts)
Registers multiple prompts with their handlers using a Map.
|
McpServer.AsyncSpecification |
McpServer.AsyncSpecification.prompts(McpServerFeatures.AsyncPromptSpecification... prompts)
Registers multiple prompts with their handlers using varargs.
|
McpServer.AsyncSpecification |
McpServer.AsyncSpecification.resources(List<McpServerFeatures.AsyncResourceSpecification> resourceSpecifications)
Registers multiple resources with their handlers using a List.
|
McpServer.AsyncSpecification |
McpServer.AsyncSpecification.resources(Map<String,McpServerFeatures.AsyncResourceSpecification> resourceSpecifications)
Registers multiple resources with their handlers using a Map.
|
McpServer.AsyncSpecification |
McpServer.AsyncSpecification.resources(McpServerFeatures.AsyncResourceSpecification... resourceSpecifications)
Registers multiple resources with their handlers using varargs.
|
McpServer.AsyncSpecification |
McpServer.AsyncSpecification.resourceTemplates(List<McpSchema.ResourceTemplate> resourceTemplates)
Sets the resource templates that define patterns for dynamic resource access.
|
McpServer.AsyncSpecification |
McpServer.AsyncSpecification.resourceTemplates(McpSchema.ResourceTemplate... resourceTemplates)
Sets the resource templates using varargs for convenience.
|
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(BiFunction<McpAsyncServerExchange,List<McpSchema.Root>,reactor.core.publisher.Mono<Void>>... handlers)
Registers multiple consumers that will be notified when the list of roots
changes using varargs.
|
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.serverInfo(McpSchema.Implementation serverInfo)
Sets the server implementation information that will be shared with clients
during connection initialization.
|
McpServer.AsyncSpecification |
McpServer.AsyncSpecification.serverInfo(String name,
String version)
Sets the server implementation information using name and version strings.
|
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.
|
McpServer.AsyncSpecification |
McpServer.AsyncSpecification.tools(List<McpServerFeatures.AsyncToolSpecification> toolSpecifications)
Adds multiple tools with their handlers to the server using a List.
|
McpServer.AsyncSpecification |
McpServer.AsyncSpecification.tools(McpServerFeatures.AsyncToolSpecification... toolSpecifications)
Adds multiple tools with their handlers to the server using varargs.
|
Copyright © 2025. All rights reserved.