| Package | Description |
|---|---|
| io.modelcontextprotocol.server |
| Modifier and Type | Class and Description |
|---|---|
class |
DefaultMcpTransportContext
Default implementation for
McpTransportContext which uses a Thread-safe map. |
| Modifier and Type | Field and Description |
|---|---|
static McpTransportContext |
McpTransportContext.EMPTY
An empty, unmodifiable context.
|
| Modifier and Type | Method and Description |
|---|---|
McpTransportContext |
DefaultMcpTransportContext.copy()
Allows copying the contents.
|
McpTransportContext |
McpTransportContext.copy()
Copies the contents of the context to allow further modifications without affecting
the initial object.
|
McpTransportContext |
McpTransportContextExtractor.extract(T request,
McpTransportContext transportContext)
Given an empty context, provides the means to fill it with transport-specific
metadata extracted from the request.
|
McpTransportContext |
McpAsyncServerExchange.transportContext()
Provides the
McpTransportContext associated with the transport layer. |
McpTransportContext |
McpSyncServerExchange.transportContext()
Provides the
McpTransportContext associated with the transport layer. |
| Modifier and Type | Method and Description |
|---|---|
McpTransportContext |
McpTransportContextExtractor.extract(T request,
McpTransportContext transportContext)
Given an empty context, provides the means to fill it with transport-specific
metadata extracted from the request.
|
reactor.core.publisher.Mono<Void> |
McpStatelessNotificationHandler.handle(McpTransportContext transportContext,
Object params)
Handle to notification and complete once done.
|
reactor.core.publisher.Mono<R> |
McpStatelessRequestHandler.handle(McpTransportContext transportContext,
Object params)
Handle the request and complete with a result.
|
reactor.core.publisher.Mono<Void> |
McpStatelessServerHandler.handleNotification(McpTransportContext transportContext,
McpSchema.JSONRPCNotification notification)
Handle the notification.
|
reactor.core.publisher.Mono<McpSchema.JSONRPCResponse> |
McpStatelessServerHandler.handleRequest(McpTransportContext transportContext,
McpSchema.JSONRPCRequest request)
Handle the request using user-provided feature implementations.
|
| Modifier and Type | Method and Description |
|---|---|
McpStatelessServerFeatures.SyncToolSpecification.Builder |
McpStatelessServerFeatures.SyncToolSpecification.Builder.callHandler(BiFunction<McpTransportContext,McpSchema.CallToolRequest,McpSchema.CallToolResult> callHandler)
Sets the call tool handler function.
|
McpStatelessServerFeatures.AsyncToolSpecification.Builder |
McpStatelessServerFeatures.AsyncToolSpecification.Builder.callHandler(BiFunction<McpTransportContext,McpSchema.CallToolRequest,reactor.core.publisher.Mono<McpSchema.CallToolResult>> callHandler)
Sets the call tool handler function.
|
McpServer.StatelessSyncSpecification |
McpServer.StatelessSyncSpecification.toolCall(McpSchema.Tool tool,
BiFunction<McpTransportContext,McpSchema.CallToolRequest,McpSchema.CallToolResult> callHandler)
Adds a single tool with its implementation handler to the server.
|
McpServer.StatelessAsyncSpecification |
McpServer.StatelessAsyncSpecification.toolCall(McpSchema.Tool tool,
BiFunction<McpTransportContext,McpSchema.CallToolRequest,reactor.core.publisher.Mono<McpSchema.CallToolResult>> callHandler)
Adds a single tool with its implementation handler to the server.
|
| Constructor and Description |
|---|
McpAsyncServerExchange(String sessionId,
McpLoggableSession session,
McpSchema.ClientCapabilities clientCapabilities,
McpSchema.Implementation clientInfo,
McpTransportContext transportContext)
Create a new asynchronous exchange with the client.
|
Copyright © 2025. All rights reserved.