You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
streamable_http client hangs indefinitely when connecting to POST-only MCP servers (ex: GitHub MCP) #1941
The streamable_http_client transport hangs indefinitely when connecting to MCP servers that only support POST requests (not GET), such as GitHub's MCP server at https://api.githubcopilot.com/mcp/. The issue manifests when calling operations like list_tools() or other methods that return SSE responses. This is also likely what some of the other issues are experiencing as there are many hanging related issues: https://github.com/modelcontextprotocol/python-sdk/issues?q=is%3Aissue%20state%3Aopen%20hang however, I believe this could explain this issue in more detail potentially: #262
I tried with and without a debugger, and noticed that with a debugger attached, the timing overhead masks the race condition and operations complete successfully. So this has been difficult to unmask.
The MCP SDK's streamable_http_client has a race condition in its GET stream handling:
After initialization, streamable_http_client launches a background task (handle_get_stream) to receive server-initiated SSE messages via GET requests
GitHub's MCP server doesn't support GET requests and returns 405 Method Not Allowed
The GET stream retries twice according to MAX_RECONNECTION_ATTEMPTS (with 1-second delays each), then the background task silently exits
When subsequent POST requests return text/event-stream content (like tools/list), the transport's SSE response handling may wait for coordination with the GET stream task
Since the GET stream task is dead, the POST SSE response waits indefinitely
Thanks for the report! Could you provide a single self-contained script that reproduces this locally? A minimal server + client in one file would help us validate and investigate much faster than an external repo.
Activity
maxisbey commentedon Feb 10, 2026
Thanks for the report! Could you provide a single self-contained script that reproduces this locally? A minimal server + client in one file would help us validate and investigate much faster than an external repo.
AI Disclaimer
fix: use non-deprecated streamable_http_client to prevent connection …
fix: use non-deprecated streamable_http_client to prevent connection …
Stop a non-MCP response from looking like a silent server