Skip to content

Conversation

@samthanawalla
Copy link
Contributor

Moves MaxRetries into the parent struct and assume a negative integer signifies to not retry.

Fixes #308

Moves MaxRetries into the parent struct and assume a negative integer
signifies to not retry.

Fixes modelcontextprotocol#308
@samthanawalla samthanawalla requested a review from jba August 18, 2025 15:10
@samthanawalla samthanawalla marked this pull request as ready for review August 18, 2025 15:10
func NewStreamableClientTransport(url string, opts *StreamableClientTransportOptions) *StreamableClientTransport {
t := &StreamableClientTransport{Endpoint: url}
if opts != nil {
t.HTTPClient = opts.HTTPClient
Copy link
Contributor

Choose a reason for hiding this comment

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

I think we should do our usual trick of storing the opts in the struct, making a shallow copy.
E.g. https://github.com/modelcontextprotocol/go-sdk/blob/main/mcp/client.go#L48.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

It looks like we are deprecating StreamableClientTransportOptions in favor of using the StreamableClientTransport literal

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Additionally NewStreamableClientTransport will be deleted soon

Copy link
Contributor

Choose a reason for hiding this comment

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

Oh, right.

@samthanawalla samthanawalla merged commit 767dacb into modelcontextprotocol:main Aug 18, 2025
5 checks passed
@samthanawalla samthanawalla deleted the redoRetryOptions branch September 11, 2025 18:17
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.

Proposal: mcp: redo retry options

2 participants