Package org.springframework.ai.mcp.modern.client


@NullMarked package org.springframework.ai.mcp.modern.client
Client-side support for the MCP 2026-07-28 ("modern") protocol revision, built on the MCP Java SDK's io.modelcontextprotocol.modern.client package.

SyncModernMcpToolCallbackProvider exposes the tools of modern MCP servers as Spring AI ToolCallbacks. Each server is described by a SyncModernMcpConnection, which decides which client serves a request: one client shared by all requests, a new client for each request, or the client that a scope of the application selects.

AsyncModernMcpToolCallbackProvider and AsyncModernMcpConnection are their counterparts on the asynchronous client of the SDK. The tool filter, the tool name generator and the connection info are shared by both.