File tree Expand file tree Collapse file tree 2 files changed +9
-1
lines changed
core/src/main/java/com/google/adk/tools/mcp Expand file tree Collapse file tree 2 files changed +9
-1
lines changed Original file line number Diff line number Diff line change @@ -21,7 +21,8 @@ public McpClientTransport build(Object connectionParams) {
2121 return new StdioClientTransport (serverParameters );
2222 } else if (connectionParams instanceof SseServerParameters sseServerParams ) {
2323 return HttpClientSseClientTransport .builder (sseServerParams .url ())
24- .sseEndpoint ("sse" )
24+ .sseEndpoint (
25+ sseServerParams .sseEndpoint () == null ? "sse" : sseServerParams .sseEndpoint ())
2526 .customizeRequest (
2627 builder ->
2728 Optional .ofNullable (sseServerParams .headers ())
Original file line number Diff line number Diff line change @@ -29,6 +29,10 @@ public abstract class SseServerParameters {
2929 /** The URL of the SSE server. */
3030 public abstract String url ();
3131
32+ /** The endpoint to connect to on the SSE server. */
33+ @ Nullable
34+ public abstract String sseEndpoint ();
35+
3236 /** Optional headers to include in the SSE connection request. */
3337 @ Nullable
3438 public abstract ImmutableMap <String , Object > headers ();
@@ -52,6 +56,9 @@ public abstract static class Builder {
5256 /** Sets the URL of the SSE server. */
5357 public abstract Builder url (String url );
5458
59+ /** Sets the endpoint to connect to on the SSE server. */
60+ public abstract Builder sseEndpoint (String sseEndpoint );
61+
5562 /** Sets the headers for the SSE connection request. */
5663 public abstract Builder headers (@ Nullable Map <String , Object > headers );
5764
You can’t perform that action at this time.
0 commit comments