Skip to content

SSE transport doesn't handle absolute URI endpoints #83

Open
@hiranya911

Description

@hiranya911

Describe the bug
Some MCP servers respond with absolute URIs in the endpoint event:

event: endpoint
data: https://www.mcp.run/api/mcp/sse?sid=123456

The SseClientTransport assumes that the endpoint is always going to be relative URI, which doesn't work for cases like the above.

// check url correctness
val maybeEndpoint = Url(baseUrl + eventData)

Ideally the client should check if the endpoint is an absolute URI, and if so use that without adding any prefixes.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions