This document covers the breaking changes between 0.18.1 and 1.0.0 of the MCP Java SDK. All items listed here were already deprecated (with @Deprecated or @Deprecated(forRemoval = true)) in 0.18.1 and are now removed.
If you are on a version earlier than 0.18.1, upgrade progressively to 0.18.1 first. That release already provides the replacement APIs described below alongside the deprecated ones, so you can resolve all deprecation warnings before moving to 1.0.0. Many types and APIs that existed in older 0.x versions (e.g.,
ClientMcpTransport,ServerMcpTransport,DefaultMcpSession,StdioServerTransport,HttpServletSseServerTransport,FlowSseClient) were already removed well before 0.18.1 and are not covered here.
The module structure (mcp-core, mcp-json-jackson2, mcp-json-jackson3, mcp) is unchanged. What changes is the default JSON binding in the mcp convenience artifact:
| Version | mcp artifact includes |
|---|---|
| 0.18.1 | mcp-core + mcp-json-jackson2 |
| 1.0.0 | mcp-core + mcp-json-jackson3 |
If your project uses Jackson 2 (the com.fasterxml.jackson 2.x line), stop depending on the mcp aggregator and depend on the individual modules instead:
<dependency>
<groupId>io.modelcontextprotocol.sdk</groupId>
<artifactId>mcp-core</artifactId>
<version>1.0.0-RC3</version>
</dependency>
<dependency>
<groupId>io.modelcontextprotocol.sdk</groupId>
<artifactId>mcp-json-jackson2</artifactId>
<version>1.0.0-RC3</version>
</dependency>If you are ready to adopt Jackson 3, you can simply continue using the mcp aggregator:
<dependency>
<groupId>io.modelcontextprotocol.sdk</groupId>
<artifactId>mcp</artifactId>
<version>1.0.0-RC3</version>
</dependency>In mcp-json-jackson2, the classes under the old io.modelcontextprotocol.json.jackson package (deprecated in 0.18.1) have been removed. Use the equivalent classes under io.modelcontextprotocol.json.jackson2:
| Removed (old package) | Replacement (already available in 0.18.1) |
|---|---|
io.modelcontextprotocol.json.jackson.JacksonMcpJsonMapper |
io.modelcontextprotocol.json.jackson2.JacksonMcpJsonMapper |
io.modelcontextprotocol.json.jackson.JacksonMcpJsonMapperSupplier |
io.modelcontextprotocol.json.jackson2.JacksonMcpJsonMapperSupplier |
io.modelcontextprotocol.json.schema.jackson.DefaultJsonSchemaValidator |
io.modelcontextprotocol.json.schema.jackson2.DefaultJsonSchemaValidator |
io.modelcontextprotocol.json.schema.jackson.JacksonJsonSchemaValidatorSupplier |
io.modelcontextprotocol.json.schema.jackson2.JacksonJsonSchemaValidatorSupplier |
These modules have been moved to the Spring AI project starting with Spring AI 2.0. The artifact names remain the same but the Maven group has changed:
| 0.18.1 (MCP Java SDK) | 1.0.0+ (Spring AI 2.0) |
|---|---|
io.modelcontextprotocol.sdk:mcp-spring-webflux |
org.springframework.ai:mcp-spring-webflux |
io.modelcontextprotocol.sdk:mcp-spring-webmvc |
org.springframework.ai:mcp-spring-webmvc |
Update your dependency coordinates:
<!-- Before (0.18.1) -->
<dependency>
<groupId>io.modelcontextprotocol.sdk</groupId>
<artifactId>mcp-spring-webflux</artifactId>
<version>0.18.1</version>
</dependency>
<!-- After (Spring AI 2.0) -->
<dependency>
<groupId>org.springframework.ai</groupId>
<artifactId>mcp-spring-webflux</artifactId>
<version>${spring-ai.version}</version>
</dependency>The Java package names and class names within these artifacts are unchanged — no source code modifications are needed beyond updating the dependency coordinates.
The tool() method on the McpServer builder (both sync and async variants) has been removed. It was deprecated in 0.18.1 in favor of toolCall(), which accepts a handler that receives the full CallToolRequest instead of a raw Map<String, Object>.
McpServer.sync(transportProvider)
.tool(
myTool,
(exchange, args) -> new CallToolResult(List.of(new TextContent("Result: " + calculate(args))), false)
)
.build();McpServer.sync(transportProvider)
.toolCall(
myTool,
(exchange, request) -> CallToolResult.builder()
.content(List.of(new TextContent("Result: " + calculate(request.arguments()))))
.isError(false)
.build()
)
.build();The deprecated call record component (which accepted Map<String, Object>) has been removed from both AsyncToolSpecification and SyncToolSpecification. Only callHandler (which accepts CallToolRequest) remains.
The deprecated constructors that accepted a call function have also been removed. Use the builder:
McpServerFeatures.AsyncToolSpecification.builder()
.tool(tool)
.callHandler((exchange, request) -> Mono.just(
CallToolResult.builder()
.content(List.of(new TextContent("Done")))
.build()))
.build();TextContent, ImageContent, and EmbeddedResource previously had constructors and accessors that took inline List<Role> audience and Double priority parameters. These were deprecated in favor of the Annotations record. The deprecated forms are now removed.
new TextContent(List.of(Role.USER), 0.8, "Hello world")
textContent.audience() // deprecated accessor
textContent.priority() // deprecated accessornew TextContent(new Annotations(List.of(Role.USER), 0.8), "Hello world")
textContent.annotations().audience()
textContent.annotations().priority()The simple new TextContent("text") constructor continues to work.
The constructors on CallToolResult and Resource that were deprecated in 0.18.1 have been removed. Use the builders instead.
// Removed:
new CallToolResult(List.of(new TextContent("result")), false);
new CallToolResult("result text", false);
new CallToolResult(content, isError, structuredContent);
// Use instead:
CallToolResult.builder()
.content(List.of(new TextContent("result")))
.isError(false)
.build();// Removed:
new Resource(uri, name, description, mimeType, annotations);
new Resource(uri, name, title, description, mimeType, size, annotations);
// Use instead:
Resource.builder()
.uri(uri)
.name(name)
.title(title)
.description(description)
.mimeType(mimeType)
.size(size)
.annotations(annotations)
.build();The deprecated McpError(Object error) constructor, which was commonly used as new McpError("message string"), has been removed. Construct McpError instances using the builder with a JSON-RPC error code:
// Removed:
throw new McpError("Something went wrong");
// Use instead:
throw McpError.builder(McpSchema.ErrorCodes.INTERNAL_ERROR)
.message("Something went wrong")
.build();Additionally, several places in the SDK that previously threw McpError for validation or state-checking purposes now throw standard Java exceptions (IllegalStateException, IllegalArgumentException). If you were catching McpError in those scenarios, update your catch blocks accordingly.
The deprecated McpSchema.LATEST_PROTOCOL_VERSION constant has been removed. Use the ProtocolVersions interface directly:
// Removed:
McpSchema.LATEST_PROTOCOL_VERSION
// Use instead:
ProtocolVersions.MCP_2025_11_25The following deprecated constructors and inner interfaces, all of which already had replacements available in 0.18.1, have been removed:
| Removed | Replacement (available since 0.18.1) |
|---|---|
Constructor with InitNotificationHandler parameter |
Constructor without InitNotificationHandler — use McpInitRequestHandler in the map |
McpServerSession.InitRequestHandler (inner interface) |
McpInitRequestHandler (top-level interface) |
McpServerSession.RequestHandler<T> (inner interface) |
McpRequestHandler<T> (top-level interface) |
McpServerSession.NotificationHandler (inner interface) |
McpNotificationHandler (top-level interface) |
| Removed | Replacement (available since 0.18.1) |
|---|---|
Constructor without connectHook parameter |
Constructor that accepts a Function<? super Mono<Void>, ? extends Publisher<Void>> connectHook |
| Removed | Replacement (available since 0.18.1) |
|---|---|
Constructor McpAsyncServerExchange(McpSession, ClientCapabilities, Implementation) |
Constructor McpAsyncServerExchange(String, McpLoggableSession, ClientCapabilities, Implementation, McpTransportContext) |
The loggingNotification(LoggingMessageNotification) methods on McpAsyncServer and McpSyncServer were deprecated because they incorrectly broadcast to all connected clients. They have been removed. Use the per-session exchange method instead:
// Removed:
server.loggingNotification(notification);
// Use instead (inside a handler with access to the exchange):
exchange.loggingNotification(notification);The deprecated new HttpClientSseClientTransport.Builder(String baseUri) constructor has been removed. Use the static factory method:
// Removed:
new HttpClientSseClientTransport.Builder("http://localhost:8080")
// Use instead:
HttpClientSseClientTransport.builder("http://localhost:8080")Before upgrading to 1.0.0, verify that your 0.18.1 build has zero deprecation warnings related to the MCP SDK. Every removal in 1.0.0 was preceded by a deprecation in 0.18.1 with a pointer to the replacement. Once you are clean on 0.18.1:
- Update your dependency versions — either bump the
mcp-bomversion, or bump the specific module dependencies you use (e.g.,mcp-core,mcp-json-jackson2). If you were relying on themcpaggregator, note it now pulls in Jackson 3 — switch tomcp-core+mcp-json-jackson2if you need to stay on Jackson 2. - Replace
io.modelcontextprotocol.sdk:mcp-spring-webflux/mcp-spring-webmvcwithorg.springframework.ai:mcp-spring-webflux/mcp-spring-webmvc. - If you use the
mcp-json-jackson2module, update imports fromio.modelcontextprotocol.json.jacksontoio.modelcontextprotocol.json.jackson2(and similarly for the schema validator package). - Compile and verify — no further source changes should be needed.
If you run into issues during migration or have questions, please open an issue or start a discussion in the MCP Java SDK GitHub repository.