Skip to content

Conversation

shenwujie
Copy link
Contributor

Describe what this PR does / why we need it

升级MCP协议到0.11.0.该版本支持了Streamable HTTP。
Jmanus Streamable HTTP切换到WebClientStreamableHttpTransport
maxInMemorySize传输内容上限到10M。

Does this pull request fix one issue?

Describe how you did it

Describe how to verify it

Special notes for reviews

- 修复了StreamableHttpClientTransport中Integer到String的类型转换错误
- 添加了preprocessJsonForDeserialization方法来预处理JSON内容
- 自动将Integer类型的id字段转换为String类型
- 确保method和jsonrpc字段也是String类型
- 添加了全面的单元测试来验证修复
- 包含错误处理和回退机制

解决了错误: java.lang.ClassCastException: class java.lang.Integer cannot be cast to class java.lang.String
- 添加 MCP SDK 0.11.0 依赖
- 删除自定义的 StreamableHttpClientTransport 实现
- 优化 buildStreamingTransport 方法,使用 WebFluxSseClientTransport
- 统一代码风格,与 buildSseTransport 保持一致
- 改进 URL 解析和日志记录
- 删除相关的测试文件
… 使用问题

- 移除未使用的导入
- 修正构造函数调用方式
- 使用正确的 Builder 模式创建 transport 实例
- 在 createWebClientBuilder 方法中配置 maxInMemorySize
- 将默认缓冲区大小从 256KB 增加到 1MB
- 解决大文件传输和流式数据处理时的缓冲区限制问题
@github-actions github-actions bot added the area/jmanus SAA Jmanus module label Aug 4, 2025
@github-actions github-actions bot added the area/infra SAA Infra module label Aug 4, 2025
@shenwujie shenwujie changed the title fix(jmanus) update Upgrading MCP protocol fix(jmanus): update Upgrading MCP protocol Aug 4, 2025
@shenwujie shenwujie changed the title fix(jmanus): update Upgrading MCP protocol fix(jmanus): update MCP protocol Aug 4, 2025
@rainerWJY rainerWJY merged commit a59d7df into alibaba:main Aug 4, 2025
13 checks passed
@shenwujie shenwujie deleted the fix_mcp_1 branch August 4, 2025 04:09
github-actions bot pushed a commit to Hipple/spring-ai-alibaba that referenced this pull request Aug 4, 2025
* fix: 修复MCP JSON-RPC消息处理中的ClassCastException错误

- 修复了StreamableHttpClientTransport中Integer到String的类型转换错误
- 添加了preprocessJsonForDeserialization方法来预处理JSON内容
- 自动将Integer类型的id字段转换为String类型
- 确保method和jsonrpc字段也是String类型
- 添加了全面的单元测试来验证修复
- 包含错误处理和回退机制

解决了错误: java.lang.ClassCastException: class java.lang.Integer cannot be cast to class java.lang.String

* feat: 升级 MCP SDK 依赖并优化 buildStreamingTransport 方法

- 添加 MCP SDK 0.11.0 依赖
- 删除自定义的 StreamableHttpClientTransport 实现
- 优化 buildStreamingTransport 方法,使用 WebFluxSseClientTransport
- 统一代码风格,与 buildSseTransport 保持一致
- 改进 URL 解析和日志记录
- 删除相关的测试文件

* fix: 修正 buildStreamingTransport 方法中的 WebClientStreamableHttpTransport 使用问题

- 移除未使用的导入
- 修正构造函数调用方式
- 使用正确的 Builder 模式创建 transport 实例

* feat: 添加 DataBuffer 大小配置以解决 DataBufferLimitException 异常

- 在 createWebClientBuilder 方法中配置 maxInMemorySize
- 将默认缓冲区大小从 256KB 增加到 1MB
- 解决大文件传输和流式数据处理时的缓冲区限制问题

* Update McpTransportBuilder and add .cursorindexingignore

* Update static assets and McpTransportBuilder

* Add .cursorindexingignore to .gitignore

* Remove .cursorindexingignore from repository

* Translate Chinese comments to English in McpTransportBuilder

* Update McpTransportBuilder
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/infra SAA Infra module area/jmanus SAA Jmanus module
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants