Spring AI MCP Java SDK - Annotations 2.0.0 API
This document is the API specification for Spring AI
For further API reference and developer documentation, see the Spring AI reference documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, and working code examples.
Packages
Package
Description
Annotations for declaring MCP capabilities (tools, prompts, resources, completion,
logging, progress, sampling, elicitation) and list-changed handlers.
Adapters that bridge MCP annotation-based providers to the MCP SDK transport layer.
Common utilities for working with MCP annotation metadata.
Request context types, specifications (logging, progress, sampling, elicitation), and
default implementations for MCP request handling.
Method callbacks and specifications for MCP prompt list changed notifications.
Method callbacks and specifications for MCP resource list changed notifications.
Method callbacks and specifications for MCP tool list changed notifications.
Method callbacks for MCP completion (chat) requests, sync and async.
Method callbacks and specifications for MCP elicitation (user input) requests.
Method callbacks and specifications for MCP logging.
Method callbacks and specifications for MCP progress reporting.
Method callbacks for MCP prompt template requests, sync and async.
Method callbacks and result converters for MCP resource read requests.
Method callbacks for MCP sampling (create message) requests.
Method callbacks and utilities for MCP tool invocation (call_tool).
Utilities for MCP tool support, such as JSON schema generation.
MCP providers that expose prompt list changed handlers to the transport layer.
MCP providers that expose resource list changed handlers to the transport layer.
MCP providers that expose tool list changed handlers to the transport layer.
MCP providers that expose completion (chat) handlers to the transport layer.
MCP providers that expose elicitation handlers to the transport layer.
MCP providers that expose logging handlers to the transport layer.
MCP providers that expose progress handlers to the transport layer.
MCP providers that expose prompt template handlers to the transport layer.
MCP providers that expose resource read handlers to the transport layer.
MCP providers that expose sampling (create message) handlers to the transport layer.
MCP providers that expose tool (call_tool) handlers to the transport layer.