Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
This PR fixes MCP (Model Context Protocol) streamable functionality by upgrading the MCP SDK from version 0.10.0 to 0.17.0 and adapting the codebase to API changes introduced in the new version. The changes replace direct usage of Jackson's ObjectMapper with the MCP SDK's McpJsonMapper abstraction and update CORS headers to support the Mcp-Protocol-Version header.
Changes:
- Upgraded MCP SDK from 0.10.0 to 0.17.0 and Spring AI from 1.0.0 to 1.1.2
- Replaced Jackson
TypeReferencewith MCP SDK'sTypeRefthroughout transport implementations - Added support for multiple MCP protocol versions (2025-03-26 and 2025-11-25)
- Enhanced CORS headers to include
Mcp-Protocol-Versionfor proper protocol negotiation - Improved streamable HTTP transport initialization with lazy creation fallback
Reviewed changes
Copilot reviewed 7 out of 7 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
| pom.xml | Updated MCP SDK version to 0.17.0 and Spring AI to 1.1.2 |
| shenyu-plugin/shenyu-plugin-mcp-server/pom.xml | Added mcp-json-jackson2 dependency for JSON serialization support |
| shenyu-spring-boot-starter/.../pom.xml | Added mcp-json-jackson2 dependency to starter module |
| ShenyuStreamableHttpServerTransportProvider.java | Migrated to McpJsonMapper, added multi-version protocol support, updated CORS headers |
| ShenyuSseServerTransportProvider.java | Migrated to McpJsonMapper for consistent JSON handling |
| McpServerPluginDataHandler.java | Added streamable HTTP transport initialization in selector handler |
| McpServerPlugin.java | Added lazy transport creation fallback and updated CORS headers |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
...g/apache/shenyu/plugin/mcp/server/transport/ShenyuStreamableHttpServerTransportProvider.java
Show resolved
Hide resolved
yuluo-yx
approved these changes
Feb 7, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Make sure that:
./mvnw clean install -Dmaven.javadoc.skip=true.