Skip to content

Commit aa302bf

Browse files
committed
Decouple mcp-test and mcp-spring modules from Jackson implementation
This is a follow-up to #742. The `mcp-test`, `mcp-spring-webflux`, and `mcp-spring-webmvc` depended on `mcp` module which transitively brought in Jackson 3 dependencies. These modules are now decoupled and only depend on `mcp-core`. The test dependencies bring in Jackson 2 for the time being. This is a breaking change but it is required to allow easily exchanging Jackson2 and Jackson3 modules. Signed-off-by: Dariusz Jędrzejczyk <[email protected]>
1 parent 2456a0e commit aa302bf

File tree

4 files changed

+19
-15
lines changed

4 files changed

+19
-15
lines changed

mcp-spring/mcp-spring-webflux/pom.xml

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -22,15 +22,10 @@
2222
</scm>
2323

2424
<dependencies>
25-
<dependency>
26-
<groupId>io.modelcontextprotocol.sdk</groupId>
27-
<artifactId>mcp-json-jackson2</artifactId>
28-
<version>0.18.0-SNAPSHOT</version>
29-
</dependency>
3025

3126
<dependency>
3227
<groupId>io.modelcontextprotocol.sdk</groupId>
33-
<artifactId>mcp</artifactId>
28+
<artifactId>mcp-core</artifactId>
3429
<version>0.18.0-SNAPSHOT</version>
3530
</dependency>
3631

@@ -47,6 +42,13 @@
4742
<version>${springframework.version}</version>
4843
</dependency>
4944

45+
<dependency>
46+
<groupId>io.modelcontextprotocol.sdk</groupId>
47+
<artifactId>mcp-json-jackson2</artifactId>
48+
<version>0.18.0-SNAPSHOT</version>
49+
<scope>test</scope>
50+
</dependency>
51+
5052
<dependency>
5153
<groupId>io.projectreactor.netty</groupId>
5254
<artifactId>reactor-netty-http</artifactId>

mcp-spring/mcp-spring-webflux/src/test/java/io/modelcontextprotocol/client/transport/WebFluxSseClientTransportTests.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,9 @@
1010
import java.util.concurrent.atomic.AtomicInteger;
1111
import java.util.function.Function;
1212

13+
import com.fasterxml.jackson.databind.json.JsonMapper;
1314
import io.modelcontextprotocol.json.McpJsonMapper;
14-
import io.modelcontextprotocol.json.jackson3.JacksonMcpJsonMapper;
15+
import io.modelcontextprotocol.json.jackson2.JacksonMcpJsonMapper;
1516
import io.modelcontextprotocol.spec.McpSchema;
1617
import io.modelcontextprotocol.spec.McpSchema.JSONRPCRequest;
1718
import org.junit.jupiter.api.AfterAll;
@@ -26,7 +27,6 @@
2627
import reactor.core.publisher.Mono;
2728
import reactor.core.publisher.Sinks;
2829
import reactor.test.StepVerifier;
29-
import tools.jackson.databind.json.JsonMapper;
3030

3131
import org.springframework.http.codec.ServerSentEvent;
3232
import org.springframework.web.reactive.function.client.WebClient;

mcp-spring/mcp-spring-webmvc/pom.xml

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -22,15 +22,10 @@
2222
</scm>
2323

2424
<dependencies>
25-
<dependency>
26-
<groupId>io.modelcontextprotocol.sdk</groupId>
27-
<artifactId>mcp-json-jackson2</artifactId>
28-
<version>0.18.0-SNAPSHOT</version>
29-
</dependency>
3025

3126
<dependency>
3227
<groupId>io.modelcontextprotocol.sdk</groupId>
33-
<artifactId>mcp</artifactId>
28+
<artifactId>mcp-core</artifactId>
3429
<version>0.18.0-SNAPSHOT</version>
3530
</dependency>
3631

@@ -54,6 +49,13 @@
5449
<scope>test</scope>
5550
</dependency>
5651

52+
<dependency>
53+
<groupId>io.modelcontextprotocol.sdk</groupId>
54+
<artifactId>mcp-json-jackson2</artifactId>
55+
<version>0.18.0-SNAPSHOT</version>
56+
<scope>test</scope>
57+
</dependency>
58+
5759

5860
<!-- The Spring Context is required due to the reactor-netty connector being dependant on
5961
the Spring Lifecycle, as discussed here:

mcp-test/pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@
2323
<dependencies>
2424
<dependency>
2525
<groupId>io.modelcontextprotocol.sdk</groupId>
26-
<artifactId>mcp</artifactId>
26+
<artifactId>mcp-core</artifactId>
2727
<version>0.18.0-SNAPSHOT</version>
2828
</dependency>
2929

0 commit comments

Comments
 (0)