Skip to content

Upgrade Spring AI to 2.1.0 and MCP SDK to 2.2.0 - #22

Merged
ruibaby merged 1 commit into
mainfrom
upgrade/spring-ai-2.1-mcp-sdk-2.2
Nov 21, 2026
Merged

ruibaby merged 1 commit into
mainfrom
upgrade/spring-ai-2.1-mcp-sdk-2.2

Conversation

@ruibaby

@ruibaby ruibaby commented Nov 21, 2026

Copy link
Copy Markdown
Member

Summary

Upgrade Spring AI mcp-spring-webflux from 2.0.2 to 2.1.0 and align the MCP Java SDK from 2.1.0 to 2.2.0, which Spring AI 2.1.0 requires (mcp-spring-webflux depends on mcp-core:2.2.0).

Changes

  • org.springframework.ai:mcp-spring-webflux 2.0.2 → 2.1.0
  • io.modelcontextprotocol.sdk:mcp 2.1.0 → 2.2.0
  • Remaining exclusions, the Halo plugin platform 2.26, and halo.version = 2.26 are unchanged.

Behavior and security notes

The plugin uses only the legacy stateless WebFlux transport. WebFluxStatelessServerTransport and HeaderUtils are byte-identical between 2.0.2 and 2.1.0 (same SHA-256), and MCP SDK 2.2.0 adds the new io.modelcontextprotocol.modern package without removing any legacy classes, so the existing /mcp path has no behavior change.

Spring AI 2.1.0 also ships the MCP 2026-07-28 "modern" transport (WebFluxMcpTransport). Its classes are bundled in the plugin JAR but are not wired into HaloMcpServer, so the endpoint still speaks the legacy protocol; a request with MCP-Protocol-Version: 2026-07-28 is rejected with HTTP 400 as before. No production Java code, API contract, permissions, or authentication boundary changed.

The plugin continues to exclude Spring Framework, Reactor, SLF4J, and Jackson from these dependencies, so Halo-provided versions remain in use. The JAR does not bundle Spring Framework or Jackson classes, only the Spring AI transport classes under org.springframework.ai.mcp.

Validation

  • ./gradlew check build — 173 backend tests and 44 UI tests pass; Spotless, lint, and type-check pass; the plugin JAR packages plugin.yaml, extensions/, and ui/.
  • ./gradlew dependencyInsight confirms mcp-core and mcp-json-jackson3 resolve to 2.2.0 and Spring WebFlux is not on the plugin runtime classpath.
  • Isolated Halo 2.26 instance (temporary port and /tmp workdir, Docker mount verified): plugin reaches STARTED; real JSON-RPC probes return initialize 200, tools/list 200 (39 tools), tools/call halo_list_categories 200, missing token 401, and MCP-Protocol-Version: 2026-07-28 400.
  • Regression comparison: reloading the previous 2.0.2 / 2.1.0 build and repeating the three core probes produced byte-identical responses and the same status codes.

@ruibaby
ruibaby merged commit 048f5dd into main Nov 21, 2026
1 check passed
@ruibaby
ruibaby deleted the upgrade/spring-ai-2.1-mcp-sdk-2.2 branch November 21, 2026 13:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant