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

Aberta
#2,959 0 comentários 0 reações 0 responsáveis Ver no GitHub
Linguagem predominante
Java
Estrelas
5.6k
Forks
1.3k
Merge médio
4d 12h
PRs com merge (30d)
77

Descrição

## 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.

Guia de contribuição

Abrir o guia de contribuição

Avaliação

Esta issue ainda não foi avaliada.

Receba novas issues na sua caixa de entrada

Um resumo curto de issues do GitHub para quem está começando.