Skip to content

Commit 37dec5a

Browse files
committed
feat: support sse transport / proxy option
1 parent 37ac814 commit 37dec5a

File tree

2 files changed

+7
-1
lines changed

2 files changed

+7
-1
lines changed

client/transport/sse.go

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,12 @@ func WithHeaders(headers map[string]string) ClientOption {
4545
}
4646
}
4747

48+
func WithHttpClient(httpClient *http.Client) ClientOption {
49+
return func(sc *SSE) {
50+
sc.httpClient = httpClient
51+
}
52+
}
53+
4854
// NewSSE creates a new SSE-based MCP client with the given base URL.
4955
// Returns an error if the URL is invalid.
5056
func NewSSE(baseURL string, options ...ClientOption) (*SSE, error) {

go.mod

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
module github.com/mark3labs/mcp-go
22

3-
go 1.23
3+
go 1.23.0
44

55
require (
66
github.com/google/uuid v1.6.0

0 commit comments

Comments
 (0)