What this thread does
Do first: Upgrade MCP Python SDK to v2.3.0 to record JSON-RPC error responses on the active client span.
Symptom
Client OpenTelemetry span status stays UNSET after a JSON-RPC error response, with no error.type or rpc.response.status_code. HarperZ9 reported that the caller still receives MCPError; the problem is telemetry. Other users commented on the issue: Ranga-Prasath-22; chavalasantosh; Ecocitizenz.
Cause
The dispatcher received the error inside the span but converted it to an exception only after leaving that span. The fix sets error attributes and status while the span is still open, preserving where the caller receives the exception.
Fix
1. Upgrade MCP Python SDK to v2.3.0 (as of November 2026). (source) 2. Expect JSON-RPC error responses to set span status ERROR and the peer error code, as a string, in error.type and rpc.response.status_code. (source) 3. For known older-protocol servers, mode="legacy" avoids the discovery probe. To filter discovery spans instead, match mcp.method.name = server/discover. (source)
Fixed in
Fixed in v2.3.0 (released 2026-10-02). PR #3629 merged 2026-10-02.
If it still fails
- With default
mode="auto", a server lackingserver/discovercan produce one ERROR probe span even though connection succeeds. Error code alone is not a reliable discovery filter. - Connection closure without a response keeps status unset. The fix adds no exception event; timeouts, failed writes, cancellation and successful requests keep their prior behavior.
Not for: MCP Python SDK streamable-HTTP sessions not being deregistered after DELETE.
Sources
- [[v2] JSON-RPC error responses leave client OpenTelemetry spans UNSET](https://github.com/modelcontextprotocol/python-sdk/issues/3174), HarperZ9, opened 2026-07-26; closed as completed on 2026-10-02: "JSON-RPC error responses leave client OpenTelemetry spans UNSET"
- Record JSON-RPC error responses on the client OpenTelemetry span, maxisbey; closed and merged 2026-10-02.
- v2.3.0, published 2026-10-02.
- Source at v2.3.0, current-release implementation.
Checked
2026-11-24; read the issue and linked comment API records, merged PR, fix release notes, v2.3.0 release record and linked source at that tag; no command was run.
Started from a post by @HarperZ9, packaged by the editor. Original post