Package org.springframework.ai.mcp.modern


@NullMarked package org.springframework.ai.mcp.modern
Support for MCP servers implementing the 2026-07-28 ("modern") specification revision, built on the io.modelcontextprotocol.modern server API of the MCP Java SDK.

The modern SDK serves each primitive from a repository that lists definitions and finds a definition with its handler (McpSyncTool, McpSyncPrompt, McpSyncResource). The InMemorySync*Repository classes are map-backed repositories with runtime add and remove, change broadcasts and key-cursor paging. SyncResourceRegistration and SyncResourceTemplateRegistration pair a resource or template definition with its handler, which the SDK's McpSyncResource does not carry; SyncCompletionRegistration does the same for a completion reference. McpSchemaConverter converts between the legacy and modern schema types, which lets handlers written against the legacy types be exposed on a modern server, and McpTransportContexts reads the request headers that the Spring transports put into the transport context.