Skip to content

StreamableHttpClientTransport fails to list tools #468

@min-mwei

Description

@min-mwei

Describe the bug
I have a case using RMCP based client connects successfully to the MCP server but it fails to list tools.

The streamable HTTP transport can deliver server-sent notifications (e.g., logging or connection-established events) before the JSON‑RPC initialize response. The previous implementation read only the first SSE frame and treated it as the response, which could stall initialization and cause later requests (like tools/list) to time out. This change makes the handshake resilient by waiting for the actual response.

To Reproduce
Steps to reproduce the behavior:

  1. Currently I tested using an internal MCP server

Expected behavior
RMCP based client can connect and list tools.

Additional context
I add a patch to show what the fix could be: #467

Metadata

Metadata

Assignees

No one assigned

    Labels

    T-bugBug fixes and error corrections

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions