Skip to content

Commit 77824d5

Browse files
committed
2 parents 5ce7124 + b5c9ec1 commit 77824d5

1 file changed

Lines changed: 2 additions & 0 deletions

File tree

internal/mcp/connection.go

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -460,6 +460,7 @@ func (c *Connection) initializeHTTPSession() (string, error) {
460460

461461
// Set headers
462462
httpReq.Header.Set("Content-Type", "application/json")
463+
httpReq.Header.Set("Accept", "application/json, text/event-stream")
463464

464465
// Generate a temporary session ID for the initialize request
465466
// Some backends may require this header even during initialization
@@ -545,6 +546,7 @@ func (c *Connection) sendHTTPRequest(ctx context.Context, method string, params
545546

546547
// Set headers
547548
httpReq.Header.Set("Content-Type", "application/json")
549+
httpReq.Header.Set("Accept", "application/json, text/event-stream")
548550

549551
// Add Mcp-Session-Id header with priority:
550552
// 1) Context session ID (if explicitly provided for this request)

0 commit comments

Comments
 (0)