Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Conversation

IAmSurajBobade
Copy link
Contributor

@IAmSurajBobade IAmSurajBobade commented Sep 19, 2025

mcp/sse: add support to provide for options for SSE transport

  • Add SSEOptions struct to define SSE handler options.
  • Update Signature of NewSSEHandler to accept SSEOptions [braking change]
  • Update unit test
  • Update example test

Fixes #507, #503

@IAmSurajBobade
Copy link
Contributor Author

@jba please review. This fixes #507. Will close #504 as duplicate.

return nil
}
})
}, &mcp.SSEOptions{})
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nil?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

updated to use nil

mcp/sse_test.go Outdated
sseHandler := NewSSEHandler(func(*http.Request) *Server { return server })
sseOptions := &SSEOptions{}

sseHandler := NewSSEHandler(func(*http.Request) *Server { return server }, sseOptions)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nil

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

updated to use nil

@jba jba self-requested a review September 19, 2025 17:00
@jba jba merged commit 8c42b69 into modelcontextprotocol:main Sep 19, 2025
5 checks passed
@IAmSurajBobade IAmSurajBobade deleted the issue/507 branch September 19, 2025 17:02
@IAmSurajBobade IAmSurajBobade restored the issue/507 branch September 25, 2025 04:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

add SSE options

2 participants