Skip to content

Commit 1b7e34c

Browse files
authored
mcp-client should also include configurable http headers in the /sse request (#100)
1 parent d1e5f33 commit 1b7e34c

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

client/sse.go

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -85,6 +85,9 @@ func (c *SSEMCPClient) Start(ctx context.Context) error {
8585
req.Header.Set("Accept", "text/event-stream")
8686
req.Header.Set("Cache-Control", "no-cache")
8787
req.Header.Set("Connection", "keep-alive")
88+
for k, v := range c.headers {
89+
req.Header.Set(k, v)
90+
}
8891

8992
resp, err := c.httpClient.Do(req)
9093
if err != nil {

0 commit comments

Comments
 (0)