Skip to content

Commit 807d5b7

Browse files
committed
feat: add WithHTTPClient option for SSEMCPClient configuration
1 parent a0e968a commit 807d5b7

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

client/sse.go

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,12 @@ func WithSSEReadTimeout(timeout time.Duration) ClientOption {
5353
}
5454
}
5555

56+
func WithHTTPClient(client *http.Client) ClientOption {
57+
return func(sc *SSEMCPClient) {
58+
sc.httpClient = client
59+
}
60+
}
61+
5662
// NewSSEMCPClient creates a new SSE-based MCP client with the given base URL.
5763
// Returns an error if the URL is invalid.
5864
func NewSSEMCPClient(baseURL string, options ...ClientOption) (*SSEMCPClient, error) {

0 commit comments

Comments
 (0)