fix(mcp): align SDK and wire streamable server manually
- align all io.modelcontextprotocol.sdk artifacts to 0.18.1 via dependencyManagement so Spring AI transitives no longer pull mcp 0.10.0 - exclude Spring AI's legacy MCP server/webmvc auto-config, which is binary- incompatible with the 0.18.1 streamable transport APIs - build McpSyncServer directly against WebMvcStreamableServerTransportProvider and adapt Spring AI ToolCallbacks to MCP SyncToolSpecifications manually - keep /mcp as the sole Streamable HTTP endpoint for both initialize/tool calls and optional SSE event streams - update MCP transport documentation to match the new runtime Validated locally with: - POST /mcp initialize -> HTTP 200 + Mcp-Session-Id - POST /mcp tools/list -> returns resolve-library-id + get-library-docs
This commit is contained in:
24
pom.xml
24
pom.xml
@@ -33,6 +33,7 @@
|
||||
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
|
||||
|
||||
<spring-ai.version>1.0.0</spring-ai.version>
|
||||
<mcp.sdk.version>0.18.1</mcp.sdk.version>
|
||||
<springdoc.version>2.8.6</springdoc.version>
|
||||
<jgit.version>7.3.0.202506031305-r</jgit.version>
|
||||
<lucene.version>10.4.0</lucene.version>
|
||||
@@ -83,6 +84,29 @@
|
||||
<scope>import</scope>
|
||||
</dependency>
|
||||
|
||||
<!-- MCP Java SDK: keep Spring AI's transitives and our direct transport/json
|
||||
dependencies on one compatible version line. -->
|
||||
<dependency>
|
||||
<groupId>io.modelcontextprotocol.sdk</groupId>
|
||||
<artifactId>mcp</artifactId>
|
||||
<version>${mcp.sdk.version}</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>io.modelcontextprotocol.sdk</groupId>
|
||||
<artifactId>mcp-core</artifactId>
|
||||
<version>${mcp.sdk.version}</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>io.modelcontextprotocol.sdk</groupId>
|
||||
<artifactId>mcp-spring-webmvc</artifactId>
|
||||
<version>${mcp.sdk.version}</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>io.modelcontextprotocol.sdk</groupId>
|
||||
<artifactId>mcp-json-jackson2</artifactId>
|
||||
<version>${mcp.sdk.version}</version>
|
||||
</dependency>
|
||||
|
||||
<!-- 3rd-party -->
|
||||
<dependency>
|
||||
<groupId>org.springdoc</groupId>
|
||||
|
||||
Reference in New Issue
Block a user