Skip to content

Recent changes break some SSE serves due to URL parsing #252

@howardjohn

Description

@howardjohn

Describe the bug

My MCP server returns:

event: endpoint
data: ?sessionId=25a6b490-aec4-40ba-b825-8a83f70f849f

This used to be fine. However, we now do sse_endpoint.parse::<http::Uri>(). This is not a URI so it fails.

Previously, we joined this with the base URL; the python SDK does the same https://github.com/modelcontextprotocol/python-sdk/blob/29c69e6a47d0104d0afcea6ac35e7ab02fde809a/src/mcp/client/sse.py#L76

The specification doesn't really have a clear definition of the format of the endpoint so its maybe vague

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