Skip to content

WebFluxSseClientTransport/HttpClientSseClientTransport is unable to connect sse endpoint with custom prefix #40

@feichao93

Description

@feichao93

Bug description

/**
* Default SSE endpoint path as specified by the MCP transport specification. This
* endpoint is used to establish the SSE connection with the server.
*/
private static final String SSE_ENDPOINT = "/sse";

In mcp-spring-webflux 0.7.0, SSE_ENDPOINT is "/sse" and cannot be changed. When my MCP Server use an SSE url with custom prefix. For example, {host}/sessions/f3a390a/sse for sseEndpoint and {host}/sessions/f3a390a/message for messageEndpoint. I have to set baseUri to /sessions/f3a390a and messageEndpoint to /message according to WebFluxSseClientTransport#sendMessage:

String jsonText = this.objectMapper.writeValueAsString(message);
return webClient.post()
.uri(messageEndpointUri)

However, it is incompatible with WebFluxSseServerTransport (which allows custom prefixes)

Expected behavior

Support scenarios like sseEndpoint=/sessions/f3a390a/sse and messageEndpoint=/sessions/f3a390a/sse messageEndpoint=/sessions/f3a390a/message

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions