Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,8 @@ public McpClientTransport build(Object connectionParams) {
return new StdioClientTransport(serverParameters);
} else if (connectionParams instanceof SseServerParameters sseServerParams) {
return HttpClientSseClientTransport.builder(sseServerParams.url())
.sseEndpoint("sse")
.sseEndpoint(
sseServerParams.sseEndpoint() == null ? "sse" : sseServerParams.sseEndpoint())
.customizeRequest(
builder ->
Optional.ofNullable(sseServerParams.headers())
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,10 @@ public abstract class SseServerParameters {
/** The URL of the SSE server. */
public abstract String url();

/** The endpoint to connect to on the SSE server. */
@Nullable
public abstract String sseEndpoint();

/** Optional headers to include in the SSE connection request. */
@Nullable
public abstract ImmutableMap<String, Object> headers();
Expand All @@ -52,6 +56,9 @@ public abstract static class Builder {
/** Sets the URL of the SSE server. */
public abstract Builder url(String url);

/** Sets the endpoint to connect to on the SSE server. */
public abstract Builder sseEndpoint(String sseEndpoint);

/** Sets the headers for the SSE connection request. */
public abstract Builder headers(@Nullable Map<String, Object> headers);

Expand Down