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) {
21
21
return new StdioClientTransport (serverParameters );
22
22
} else if (connectionParams instanceof SseServerParameters sseServerParams ) {
23
23
return HttpClientSseClientTransport .builder (sseServerParams .url ())
24
- .sseEndpoint ("sse" )
24
+ .sseEndpoint (
25
+ sseServerParams .sseEndpoint () == null ? "sse" : sseServerParams .sseEndpoint ())
25
26
.customizeRequest (
26
27
builder ->
27
28
Optional .ofNullable (sseServerParams .headers ())
Original file line number Diff line number Diff line change @@ -29,6 +29,10 @@ public abstract class SseServerParameters {
29
29
/** The URL of the SSE server. */
30
30
public abstract String url ();
31
31
32
+ /** The endpoint to connect to on the SSE server. */
33
+ @ Nullable
34
+ public abstract String sseEndpoint ();
35
+
32
36
/** Optional headers to include in the SSE connection request. */
33
37
@ Nullable
34
38
public abstract ImmutableMap <String , Object > headers ();
@@ -52,6 +56,9 @@ public abstract static class Builder {
52
56
/** Sets the URL of the SSE server. */
53
57
public abstract Builder url (String url );
54
58
59
+ /** Sets the endpoint to connect to on the SSE server. */
60
+ public abstract Builder sseEndpoint (String sseEndpoint );
61
+
55
62
/** Sets the headers for the SSE connection request. */
56
63
public abstract Builder headers (@ Nullable Map <String , Object > headers );
57
64
You can’t perform that action at this time.
0 commit comments