agentscope-ai / agentscope-ai/agentscope-java
agentscope-dependencies-bom pins MCP SDK 0.17.0, hit by java-sdk#748's 202+text/plain empty-response bug
- 主要語言
- Java
- 星號
- 5.6k
- 分支
- 1.3k
- 平均合併
- 4 天 12 小時
- 30 天內合併 PR
- 77
描述
## Symptom
Agent tool registration against an MCP server that answers `initialize` / `notifications/initialized` with `202 Accepted` + `Content-Type: text/plain` + a chunked (no `Content-Length`) **empty body** fails with:
```
Unknown media type: text/plain; charset=utf-8
```
This throws from `io.modelcontextprotocol.sdk`'s `HttpClientStreamableHttpTransport.sendMessage` and surfaces in AgentScope through `McpServerRegistrar` / `McpClientBuilder` during toolkit registration, so the server's tools never mount.
## Root cause
`agentscope-dependencies-bom` pins `io.modelcontextprotocol.sdk:mcp` to **0.17.0** (property `0.17.0`). In 0.17.0 the transport rejects any non-JSON media type on a response body regardless of status, while the spec's `202 Accepted` + `text/plain` (or no body) gives identical empty-type regression. This is the **client-side mirror** of https://github.com/modelcontextprotocol/java-sdk/issues/748.
This is a recently-introduced regression upstream (0.17.0); it does **not** reproduce with `0.17.2`+.
## Request
Bump `` to **0.17.2** (or newer, plus a regression test). 0.17.2 fixes the regression by treating blank `Content-Type` / zero `Content-Length` / `202 Accepted` as a no-body fast path, and stays binary-compatible with 0.17.x.
Reference: a directly-affected consumer verified the fix by excluding the transitive pin and explicitly using `mcp:0.17.2`.
## Existing Bumps (not this bug)
Only example projects have moved off 0.17.0 (0.17.1 → 0.17.2 → 0.18.1); the BOM itself has never been bumped since the dependency was introduced.
貢獻指南
評估
這個 Issue 還沒有評估資料。