diff --git a/mcp-core/src/main/java/io/modelcontextprotocol/client/McpAsyncClient.java b/mcp-core/src/main/java/io/modelcontextprotocol/client/McpAsyncClient.java index 945221bd0..164e94314 100644 --- a/mcp-core/src/main/java/io/modelcontextprotocol/client/McpAsyncClient.java +++ b/mcp-core/src/main/java/io/modelcontextprotocol/client/McpAsyncClient.java @@ -492,7 +492,9 @@ public Mono ping() { * Adds a new root to the client's root list. * @param root The root to add. * @return A Mono that completes when the root is added and notifications are sent. + * @deprecated Roots are deprecated in the 2026-07-28 MCP specification. */ + @Deprecated public Mono addRoot(Root root) { if (root == null) { @@ -524,7 +526,9 @@ public Mono addRoot(Root root) { * Removes a root from the client's root list. * @param rootUri The URI of the root to remove. * @return A Mono that completes when the root is removed and notifications are sent. + * @deprecated Roots are deprecated in the 2026-07-28 MCP specification. */ + @Deprecated public Mono removeRoot(String rootUri) { if (rootUri == null) { @@ -555,7 +559,9 @@ public Mono removeRoot(String rootUri) { * methods automatically send the roots/list_changed notification if the client is in * an initialized state. * @return A Mono that completes when the notification is sent. + * @deprecated Roots are deprecated in the 2026-07-28 MCP specification. */ + @Deprecated public Mono rootsListChangedNotification() { return this.initializer.withInitialization("sending roots list changed notification", init -> init.mcpSession().sendNotification(McpSchema.METHOD_NOTIFICATION_ROOTS_LIST_CHANGED)); @@ -1110,7 +1116,9 @@ private NotificationHandler asyncLoggingNotificationHandler( * @param loggingLevel The minimum logging level to receive. * @return A Mono that completes when the logging level is set. * @see McpSchema.LoggingLevel + * @deprecated Logging is deprecated in the 2026-07-28 MCP specification. */ + @Deprecated public Mono setLoggingLevel(LoggingLevel loggingLevel) { if (loggingLevel == null) { return Mono.error(new IllegalArgumentException("Logging level must not be null")); diff --git a/mcp-core/src/main/java/io/modelcontextprotocol/client/McpClient.java b/mcp-core/src/main/java/io/modelcontextprotocol/client/McpClient.java index 1af4eea1b..1cc30fda2 100644 --- a/mcp-core/src/main/java/io/modelcontextprotocol/client/McpClient.java +++ b/mcp-core/src/main/java/io/modelcontextprotocol/client/McpClient.java @@ -270,7 +270,9 @@ public SyncSpec clientInfo(Implementation clientInfo) { * @param roots A list of root definitions. Must not be null. * @return This builder instance for method chaining * @throws IllegalArgumentException if roots is null + * @deprecated Roots are deprecated in the 2026-07-28 MCP specification. */ + @Deprecated public SyncSpec roots(List roots) { Assert.notNull(roots, "Roots must not be null"); for (Root root : roots) { @@ -286,7 +288,9 @@ public SyncSpec roots(List roots) { * @return This builder instance for method chaining * @throws IllegalArgumentException if roots is null * @see #roots(List) + * @deprecated Roots are deprecated in the 2026-07-28 MCP specification. */ + @Deprecated public SyncSpec roots(Root... roots) { Assert.notNull(roots, "Roots must not be null"); for (Root root : roots) { @@ -303,7 +307,9 @@ public SyncSpec roots(Root... roots) { * results. Must not be null. * @return This builder instance for method chaining * @throws IllegalArgumentException if samplingHandler is null + * @deprecated Sampling is deprecated in the 2026-07-28 MCP specification. */ + @Deprecated public SyncSpec sampling(Function samplingHandler) { Assert.notNull(samplingHandler, "Sampling handler must not be null"); this.samplingHandler = samplingHandler; @@ -408,7 +414,9 @@ public SyncSpec promptsChangeConsumer(Consumer> promptsCh * @param loggingConsumer A consumer that receives logging messages. Must not be * null. * @return This builder instance for method chaining + * @deprecated Logging is deprecated in the 2026-07-28 MCP specification. */ + @Deprecated public SyncSpec loggingConsumer(Consumer loggingConsumer) { Assert.notNull(loggingConsumer, "Logging consumer must not be null"); this.loggingConsumers.add(loggingConsumer); @@ -422,7 +430,9 @@ public SyncSpec loggingConsumer(Consumer l * @param loggingConsumers A list of consumers that receive logging messages. Must * not be null. * @return This builder instance for method chaining + * @deprecated Logging is deprecated in the 2026-07-28 MCP specification. */ + @Deprecated public SyncSpec loggingConsumers(List> loggingConsumers) { Assert.notNull(loggingConsumers, "Logging consumers must not be null"); this.loggingConsumers.addAll(loggingConsumers); @@ -689,7 +699,9 @@ public AsyncSpec clientInfo(Implementation clientInfo) { * @param roots A list of root definitions. Must not be null. * @return This builder instance for method chaining * @throws IllegalArgumentException if roots is null + * @deprecated Roots are deprecated in the 2026-07-28 MCP specification. */ + @Deprecated public AsyncSpec roots(List roots) { Assert.notNull(roots, "Roots must not be null"); for (Root root : roots) { @@ -705,7 +717,9 @@ public AsyncSpec roots(List roots) { * @return This builder instance for method chaining * @throws IllegalArgumentException if roots is null * @see #roots(List) + * @deprecated Roots are deprecated in the 2026-07-28 MCP specification. */ + @Deprecated public AsyncSpec roots(Root... roots) { Assert.notNull(roots, "Roots must not be null"); for (Root root : roots) { @@ -722,7 +736,9 @@ public AsyncSpec roots(Root... roots) { * results. Must not be null. * @return This builder instance for method chaining * @throws IllegalArgumentException if samplingHandler is null + * @deprecated Sampling is deprecated in the 2026-07-28 MCP specification. */ + @Deprecated public AsyncSpec sampling(Function> samplingHandler) { Assert.notNull(samplingHandler, "Sampling handler must not be null"); this.samplingHandler = samplingHandler; @@ -829,7 +845,9 @@ public AsyncSpec promptsChangeConsumer(Function, Mono> loggingConsumer) { Assert.notNull(loggingConsumer, "Logging consumer must not be null"); this.loggingConsumers.add(loggingConsumer); @@ -843,7 +861,9 @@ public AsyncSpec loggingConsumer(Function>> loggingConsumers) { Assert.notNull(loggingConsumers, "Logging consumers must not be null"); diff --git a/mcp-core/src/main/java/io/modelcontextprotocol/client/McpClientFeatures.java b/mcp-core/src/main/java/io/modelcontextprotocol/client/McpClientFeatures.java index f61123da0..62f53c389 100644 --- a/mcp-core/src/main/java/io/modelcontextprotocol/client/McpClientFeatures.java +++ b/mcp-core/src/main/java/io/modelcontextprotocol/client/McpClientFeatures.java @@ -68,14 +68,15 @@ class McpClientFeatures { * in the {@code requestedSchema}. */ record Async(McpSchema.Implementation clientInfo, McpSchema.ClientCapabilities clientCapabilities, - Map roots, List, Mono>> toolsChangeConsumers, + @Deprecated Map roots, + List, Mono>> toolsChangeConsumers, List, Mono>> resourcesChangeConsumers, List, Mono>> resourcesUpdateConsumers, List, Mono>> promptsChangeConsumers, - List>> loggingConsumers, + @Deprecated List>> loggingConsumers, List>> progressConsumers, List>> elicitationCompleteConsumers, - Function> samplingHandler, + @Deprecated Function> samplingHandler, Function> formElicitationHandler, Function> urlElicitationHandler, boolean enableCallToolSchemaCaching, boolean applyElicitationDefaults) { @@ -95,7 +96,10 @@ record Async(McpSchema.Implementation clientInfo, McpSchema.ClientCapabilities c * @param applyElicitationDefaults whether the client should fill in missing * fields of an accepted {@code ElicitResult.content} with the {@code default} * values declared in the {@code requestedSchema}. + * @deprecated Roots, sampling, and logging are deprecated in the 2026-07-28 MCP + * specification. */ + @Deprecated public Async(McpSchema.Implementation clientInfo, McpSchema.ClientCapabilities clientCapabilities, Map roots, List, Mono>> toolsChangeConsumers, @@ -137,6 +141,7 @@ public Async(McpSchema.Implementation clientInfo, McpSchema.ClientCapabilities c /** * @deprecated Only exists for backwards-compatibility purposes. */ + @Deprecated public Async(McpSchema.Implementation clientInfo, McpSchema.ClientCapabilities clientCapabilities, Map roots, List, Mono>> toolsChangeConsumers, @@ -248,14 +253,14 @@ public static Async fromSync(Sync syncSpec) { * in the {@code requestedSchema}. */ public record Sync(McpSchema.Implementation clientInfo, McpSchema.ClientCapabilities clientCapabilities, - Map roots, List>> toolsChangeConsumers, + @Deprecated Map roots, List>> toolsChangeConsumers, List>> resourcesChangeConsumers, List>> resourcesUpdateConsumers, List>> promptsChangeConsumers, - List> loggingConsumers, + @Deprecated List> loggingConsumers, List> progressConsumers, List> elicitationCompleteConsumers, - Function samplingHandler, + @Deprecated Function samplingHandler, Function formElicitationHandler, Function urlElicitationHandler, boolean enableCallToolSchemaCaching, boolean applyElicitationDefaults) { @@ -277,7 +282,10 @@ public record Sync(McpSchema.Implementation clientInfo, McpSchema.ClientCapabili * @param applyElicitationDefaults whether the client should fill in missing * fields of an accepted {@code ElicitResult.content} with the {@code default} * values declared in the {@code requestedSchema}. + * @deprecated Roots, sampling, and logging are deprecated in the 2026-07-28 MCP + * specification. */ + @Deprecated public Sync(McpSchema.Implementation clientInfo, McpSchema.ClientCapabilities clientCapabilities, Map roots, List>> toolsChangeConsumers, List>> resourcesChangeConsumers, @@ -318,6 +326,7 @@ public Sync(McpSchema.Implementation clientInfo, McpSchema.ClientCapabilities cl /** * @deprecated Only exists for backwards-compatibility purposes. */ + @Deprecated public Sync(McpSchema.Implementation clientInfo, McpSchema.ClientCapabilities clientCapabilities, Map roots, List>> toolsChangeConsumers, List>> resourcesChangeConsumers, diff --git a/mcp-core/src/main/java/io/modelcontextprotocol/client/McpSyncClient.java b/mcp-core/src/main/java/io/modelcontextprotocol/client/McpSyncClient.java index 7e08f83a0..bc6ca7354 100644 --- a/mcp-core/src/main/java/io/modelcontextprotocol/client/McpSyncClient.java +++ b/mcp-core/src/main/java/io/modelcontextprotocol/client/McpSyncClient.java @@ -192,21 +192,27 @@ public McpSchema.InitializeResult initialize() { /** * Send a roots/list_changed notification. + * @deprecated Roots are deprecated in the 2026-07-28 MCP specification. */ + @Deprecated public void rootsListChangedNotification() { withProvidedContext(this.delegate.rootsListChangedNotification()).block(); } /** * Add a roots dynamically. + * @deprecated Roots are deprecated in the 2026-07-28 MCP specification. */ + @Deprecated public void addRoot(McpSchema.Root root) { this.delegate.addRoot(root).block(); } /** * Remove a root dynamically. + * @deprecated Roots are deprecated in the 2026-07-28 MCP specification. */ + @Deprecated public void removeRoot(String rootUri) { this.delegate.removeRoot(rootUri).block(); } @@ -426,7 +432,9 @@ public GetPromptResult getPrompt(GetPromptRequest getPromptRequest) { /** * Client can set the minimum logging level it wants to receive from the server. * @param loggingLevel the min logging level + * @deprecated Logging is deprecated in the 2026-07-28 MCP specification. */ + @Deprecated public void setLoggingLevel(McpSchema.LoggingLevel loggingLevel) { withProvidedContext(this.delegate.setLoggingLevel(loggingLevel)).block(); diff --git a/mcp-core/src/main/java/io/modelcontextprotocol/server/McpAsyncServerExchange.java b/mcp-core/src/main/java/io/modelcontextprotocol/server/McpAsyncServerExchange.java index e27d6128f..68df992a2 100644 --- a/mcp-core/src/main/java/io/modelcontextprotocol/server/McpAsyncServerExchange.java +++ b/mcp-core/src/main/java/io/modelcontextprotocol/server/McpAsyncServerExchange.java @@ -234,7 +234,9 @@ public Mono listRoots(String cursor) { * minimum logging level will be filtered out. * @param loggingMessageNotification The logging message to send * @return A Mono that completes when the notification has been sent + * @deprecated Logging is deprecated in the 2026-07-28 MCP specification. */ + @Deprecated public Mono loggingNotification(LoggingMessageNotification loggingMessageNotification) { if (loggingMessageNotification == null) { diff --git a/mcp-core/src/main/java/io/modelcontextprotocol/server/McpServer.java b/mcp-core/src/main/java/io/modelcontextprotocol/server/McpServer.java index a2333aedb..4227989ce 100644 --- a/mcp-core/src/main/java/io/modelcontextprotocol/server/McpServer.java +++ b/mcp-core/src/main/java/io/modelcontextprotocol/server/McpServer.java @@ -745,7 +745,9 @@ public AsyncSpecification completions(McpServerFeatures.AsyncCompletionSpecif * interact with the connected client. The second argument is the list of roots. * @return This builder instance for method chaining * @throws IllegalArgumentException if consumer is null + * @deprecated Roots are deprecated in the 2026-07-28 MCP specification. */ + @Deprecated public AsyncSpecification rootsChangeHandler( BiFunction, Mono> handler) { Assert.notNull(handler, "Consumer must not be null"); @@ -761,7 +763,9 @@ public AsyncSpecification rootsChangeHandler( * @return This builder instance for method chaining * @throws IllegalArgumentException if consumers is null * @see #rootsChangeHandler(BiFunction) + * @deprecated Roots are deprecated in the 2026-07-28 MCP specification. */ + @Deprecated public AsyncSpecification rootsChangeHandlers( List, Mono>> handlers) { Assert.notNull(handlers, "Handlers list must not be null"); @@ -777,7 +781,9 @@ public AsyncSpecification rootsChangeHandlers( * @return This builder instance for method chaining * @throws IllegalArgumentException if consumers is null * @see #rootsChangeHandlers(List) + * @deprecated Roots are deprecated in the 2026-07-28 MCP specification. */ + @Deprecated public AsyncSpecification rootsChangeHandlers( @SuppressWarnings("unchecked") BiFunction, Mono>... handlers) { Assert.notNull(handlers, "Handlers list must not be null"); @@ -1347,7 +1353,9 @@ public SyncSpecification completions(McpServerFeatures.SyncCompletionSpecific * with the connected client. The second argument is the list of roots. * @return This builder instance for method chaining * @throws IllegalArgumentException if consumer is null + * @deprecated Roots are deprecated in the 2026-07-28 MCP specification. */ + @Deprecated public SyncSpecification rootsChangeHandler( BiConsumer> handler) { Assert.notNull(handler, "Consumer must not be null"); @@ -1363,7 +1371,9 @@ public SyncSpecification rootsChangeHandler( * @return This builder instance for method chaining * @throws IllegalArgumentException if consumers is null * @see #rootsChangeHandler(BiConsumer) + * @deprecated Roots are deprecated in the 2026-07-28 MCP specification. */ + @Deprecated public SyncSpecification rootsChangeHandlers( List>> handlers) { Assert.notNull(handlers, "Handlers list must not be null"); @@ -1379,7 +1389,9 @@ public SyncSpecification rootsChangeHandlers( * @return This builder instance for method chaining * @throws IllegalArgumentException if consumers is null * @see #rootsChangeHandlers(List) + * @deprecated Roots are deprecated in the 2026-07-28 MCP specification. */ + @Deprecated public SyncSpecification rootsChangeHandlers( BiConsumer>... handlers) { Assert.notNull(handlers, "Handlers list must not be null"); diff --git a/mcp-core/src/main/java/io/modelcontextprotocol/server/McpServerFeatures.java b/mcp-core/src/main/java/io/modelcontextprotocol/server/McpServerFeatures.java index cfa28e6b6..4ba650798 100644 --- a/mcp-core/src/main/java/io/modelcontextprotocol/server/McpServerFeatures.java +++ b/mcp-core/src/main/java/io/modelcontextprotocol/server/McpServerFeatures.java @@ -44,7 +44,7 @@ record Async(McpSchema.Implementation serverInfo, McpSchema.ServerCapabilities s Map resourceTemplates, Map prompts, Map completions, - List, Mono>> rootsChangeConsumers, + @Deprecated List, Mono>> rootsChangeConsumers, String instructions) { /** @@ -58,7 +58,10 @@ record Async(McpSchema.Implementation serverInfo, McpSchema.ServerCapabilities s * @param rootsChangeConsumers The list of consumers that will be notified when * the roots list changes * @param instructions The server instructions text + * @deprecated Roots and logging are deprecated in the 2026-07-28 MCP + * specification. */ + @Deprecated Async(McpSchema.Implementation serverInfo, McpSchema.ServerCapabilities serverCapabilities, List tools, Map resources, Map resourceTemplates, @@ -161,7 +164,8 @@ record Sync(McpSchema.Implementation serverInfo, McpSchema.ServerCapabilities se Map resourceTemplates, Map prompts, Map completions, - List>> rootsChangeConsumers, String instructions) { + @Deprecated List>> rootsChangeConsumers, + String instructions) { /** * Create an instance and validate the arguments. @@ -174,7 +178,10 @@ record Sync(McpSchema.Implementation serverInfo, McpSchema.ServerCapabilities se * @param rootsChangeConsumers The list of consumers that will be notified when * the roots list changes * @param instructions The server instructions text + * @deprecated Roots and logging are deprecated in the 2026-07-28 MCP + * specification. */ + @Deprecated Sync(McpSchema.Implementation serverInfo, McpSchema.ServerCapabilities serverCapabilities, List tools, Map resources, diff --git a/mcp-core/src/main/java/io/modelcontextprotocol/server/McpSyncServerExchange.java b/mcp-core/src/main/java/io/modelcontextprotocol/server/McpSyncServerExchange.java index 0b9115b79..4a74a96eb 100644 --- a/mcp-core/src/main/java/io/modelcontextprotocol/server/McpSyncServerExchange.java +++ b/mcp-core/src/main/java/io/modelcontextprotocol/server/McpSyncServerExchange.java @@ -121,7 +121,9 @@ public McpSchema.ListRootsResult listRoots(String cursor) { * Send a logging message notification to the client. Messages below the current * minimum logging level will be filtered out. * @param loggingMessageNotification The logging message to send + * @deprecated Logging is deprecated in the 2026-07-28 MCP specification. */ + @Deprecated public void loggingNotification(LoggingMessageNotification loggingMessageNotification) { this.exchange.loggingNotification(loggingMessageNotification).block(); } diff --git a/mcp-core/src/main/java/io/modelcontextprotocol/spec/McpSchema.java b/mcp-core/src/main/java/io/modelcontextprotocol/spec/McpSchema.java index 648be8b4b..55399cc95 100644 --- a/mcp-core/src/main/java/io/modelcontextprotocol/spec/McpSchema.java +++ b/mcp-core/src/main/java/io/modelcontextprotocol/spec/McpSchema.java @@ -98,16 +98,32 @@ private McpSchema() { public static final String METHOD_COMPLETION_COMPLETE = "completion/complete"; // Logging Methods + /** + * @deprecated Logging is deprecated in the 2026-07-28 MCP specification. + */ + @Deprecated public static final String METHOD_LOGGING_SET_LEVEL = "logging/setLevel"; public static final String METHOD_NOTIFICATION_MESSAGE = "notifications/message"; // Roots Methods + /** + * @deprecated Roots are deprecated in the 2026-07-28 MCP specification. + */ + @Deprecated public static final String METHOD_ROOTS_LIST = "roots/list"; + /** + * @deprecated Roots are deprecated in the 2026-07-28 MCP specification. + */ + @Deprecated public static final String METHOD_NOTIFICATION_ROOTS_LIST_CHANGED = "notifications/roots/list_changed"; // Sampling Methods + /** + * @deprecated Sampling is deprecated in the 2026-07-28 MCP specification. + */ + @Deprecated public static final String METHOD_SAMPLING_CREATE_MESSAGE = "sampling/createMessage"; // Elicitation Methods @@ -582,7 +598,9 @@ public InitializeResult build() { @JsonIgnoreProperties(ignoreUnknown = true) public record ClientCapabilities( // @formatter:off @JsonProperty("experimental") Map experimental, + @Deprecated @JsonProperty("roots") RootCapabilities roots, + @Deprecated @JsonProperty("sampling") Sampling sampling, @JsonProperty("elicitation") Elicitation elicitation) { // @formatter:on @@ -591,7 +609,9 @@ public record ClientCapabilities( // @formatter:off * * @param listChanged Whether the client supports notifications for changes to the * roots list + * @deprecated Roots are deprecated in the 2026-07-28 MCP specification. */ + @Deprecated @JsonInclude(JsonInclude.Include.NON_ABSENT) @JsonIgnoreProperties(ignoreUnknown = true) public record RootCapabilities(@JsonProperty("listChanged") Boolean listChanged) { @@ -623,7 +643,10 @@ public RootCapabilities build() { * servers to leverage AI capabilities—with no server API keys necessary. Servers * can request text or image-based interactions and optionally include context * from MCP servers in their prompts. + * + * @deprecated Sampling is deprecated in the 2026-07-28 MCP specification. */ + @Deprecated @JsonInclude(JsonInclude.Include.NON_ABSENT) @JsonIgnoreProperties(ignoreUnknown = true) public record Sampling() { @@ -728,11 +751,19 @@ public Builder experimental(Map experimental) { return this; } + /** + * @deprecated Roots are deprecated in the 2026-07-28 MCP specification. + */ + @Deprecated public Builder roots(Boolean listChanged) { this.roots = new RootCapabilities(listChanged); return this; } + /** + * @deprecated Sampling is deprecated in the 2026-07-28 MCP specification. + */ + @Deprecated public Builder sampling() { this.sampling = new Sampling(); return this; @@ -791,6 +822,7 @@ public ClientCapabilities build() { public record ServerCapabilities( // @formatter:off @JsonProperty("completions") CompletionCapabilities completions, @JsonProperty("experimental") Map experimental, + @Deprecated @JsonProperty("logging") LoggingCapabilities logging, @JsonProperty("prompts") PromptCapabilities prompts, @JsonProperty("resources") ResourceCapabilities resources, @@ -806,7 +838,10 @@ public record CompletionCapabilities() { /** * Present if the server supports sending log messages to the client. + * + * @deprecated Logging is deprecated in the 2026-07-28 MCP specification. */ + @Deprecated @JsonInclude(JsonInclude.Include.NON_ABSENT) @JsonIgnoreProperties(ignoreUnknown = true) public record LoggingCapabilities() { @@ -954,6 +989,10 @@ public Builder experimental(Map experimental) { return this; } + /** + * @deprecated Logging is deprecated in the 2026-07-28 MCP specification. + */ + @Deprecated public Builder logging() { this.logging = new LoggingCapabilities(); return this; @@ -3468,7 +3507,9 @@ public static ModelHint of(String name) { * Note: {@code role} and {@code content} are required by the MCP specification. * Deserialization accepts missing values and substitutes defaults to avoid breaking * existing integrations that may omit these fields. + * @deprecated Sampling is deprecated in the 2026-07-28 MCP specification. */ + @Deprecated @JsonInclude(JsonInclude.Include.NON_ABSENT) @JsonIgnoreProperties(ignoreUnknown = true) public record SamplingMessage( // @formatter:off @@ -3547,7 +3588,9 @@ public SamplingMessage build() { * Note: {@code messages} and {@code maxTokens} are required by the MCP specification. * Deserialization accepts missing values and substitutes defaults to avoid breaking * existing integrations that may omit these fields. + * @deprecated Sampling is deprecated in the 2026-07-28 MCP specification. */ + @Deprecated @JsonInclude(JsonInclude.Include.NON_ABSENT) @JsonIgnoreProperties(ignoreUnknown = true) public record CreateMessageRequest( // @formatter:off @@ -3730,7 +3773,9 @@ public CreateMessageRequest build() { * @param model The name of the model that generated the message * @param stopReason The reason why sampling stopped, if known * @param meta See specification for notes on _meta usage + * @deprecated Sampling is deprecated in the 2026-07-28 MCP specification. */ + @Deprecated @JsonInclude(JsonInclude.Include.NON_ABSENT) @JsonIgnoreProperties(ignoreUnknown = true) public record CreateMessageResult( // @formatter:off @@ -5326,7 +5371,9 @@ static ResourcesUpdatedNotification fromJson(@JsonProperty("uri") String uri, * Note: {@code level} and {@code data} are required by the MCP specification. * Deserialization accepts missing values and substitutes defaults to avoid breaking * existing integrations that may omit these fields. + * @deprecated Logging is deprecated in the 2026-07-28 MCP specification. */ + @Deprecated @JsonInclude(JsonInclude.Include.NON_ABSENT) @JsonIgnoreProperties(ignoreUnknown = true) public record LoggingMessageNotification( // @formatter:off @@ -5440,7 +5487,10 @@ public LoggingMessageNotification build() { * Severity levels for MCP log messages, ordered from least to most severe. The * numeric {@link #level()} can be used to compare severities. Deserialization is * case-insensitive and returns {@code null} for unrecognized values. + * + * @deprecated Logging is deprecated in the 2026-07-28 MCP specification. */ + @Deprecated public enum LoggingLevel { // @formatter:off @@ -5488,7 +5538,9 @@ public static LoggingLevel fromValue(String value) { * @param level The level of logging that the client wants to receive from the server. * The server should send all logs at this level and higher (i.e., more severe) to the * client as notifications/message + * @deprecated Logging is deprecated in the 2026-07-28 MCP specification. */ + @Deprecated @JsonInclude(JsonInclude.Include.NON_ABSENT) @JsonIgnoreProperties(ignoreUnknown = true) public record SetLevelRequest(@JsonProperty("level") LoggingLevel level) { @@ -6323,7 +6375,9 @@ public ResourceLink build() { * human-readable identifier for the root, which may be useful for display purposes or * for referencing the root in other parts of the application. * @param meta See specification for notes on _meta usage + * @deprecated Roots are deprecated in the 2026-07-28 MCP specification. */ + @Deprecated @JsonInclude(JsonInclude.Include.NON_ABSENT) @JsonIgnoreProperties(ignoreUnknown = true) public record Root( // @formatter:off @@ -6394,7 +6448,9 @@ public Root build() { * are more roots available. The client can use this cursor to request the next page * of results by sending a roots/list request with the cursor parameter set to this * @param meta See specification for notes on _meta usage + * @deprecated Roots are deprecated in the 2026-07-28 MCP specification. */ + @Deprecated @JsonInclude(JsonInclude.Include.NON_ABSENT) @JsonIgnoreProperties(ignoreUnknown = true) public record ListRootsResult( // @formatter:off