Symptom
A client abort of an in-flight POST on a stateless Streamable HTTP server logs ERROR:mcp.server.streamable_http:Error handling POST request twice per disconnect. The traceback ends in starlette.requests.ClientDisconnect.
Evidence what you'll see
- The report says this is 10 out of 10 for both FIN and RST closes on v1.28.1.
- The same shape is described for issue #1648: a broad
except ExceptionlogsError handling POST requestand returns HTTP 500 forClientDisconnect.
Why it happens
A disconnect is a normal end of the client connection. The POST handler catches it as an exception, logs it at ERROR, and the stateless path also calls send_log_message on a session that is already gone.
Affected versions
MCP Python SDK v1.28.1, stateless Streamable HTTP. The linked issue does not name an operating system.
Fix steps
0 of 2 done
Your check marks stay in this browser only.
How to check it worked
- Aborting the POST no longer writes
ERROR:mcp.server.streamable_http:Error handling POST requestforClientDisconnect.
If it still fails
- The issue says no stable release had the change when it was filed, and the v1 line was not given a patch. The two ERROR lines on v1.28.1 are the behavior in the report.
Sources and credit
Summarized in our own words from these public reports. Credit goes to their authors.
Provided as is, without warranty. Try changes in a non-production environment and back up first. Security-related steps: verify against the official docs. Terms · Request removal or attribution change
Hit an error we don't cover? Submit it