Skip to content

Conversation

@findleyr
Copy link
Contributor

@findleyr findleyr commented Aug 12, 2025

As described in #272, there is really no reason for transports to be closed structs with constructors, since their state must be established by a call to Connect. Making them open structs simplifies their APIs, and means that all transports can be extended in the future: we don't have to create empty Options structs just for the purpose of future compatibility.

For now, the related constructors and options structs are simply deprecated (with go:fix directives where possible). A future CL will remove them prior to the v1.0.0 release.

For #272

As described in modelcontextprotocol#272, there is really no reason for transports to be
closed structs with constructors, since their state must be established
by a call to Connect. Making them open structs simplifies their APIs,
and means that all transports can be extended in the future: we don't
have to create empty Options structs just for the purpose of future
compatibility.

For now, the related constructors and options structs are simply
deprecated (with go:fix directives where possible). A future CL will
remove them prior to the v1.0.0 release.

For modelcontextprotocol#272
@findleyr
Copy link
Contributor Author

PTAL and let me know what you think about this change.

@jba
Copy link
Contributor

jba commented Aug 12, 2025

LGTM.

Copy link
Contributor

@samthanawalla samthanawalla left a comment

Choose a reason for hiding this comment

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

LGTM

jba
jba previously approved these changes Aug 12, 2025
@findleyr findleyr marked this pull request as ready for review August 12, 2025 18:42
jba
jba previously approved these changes Aug 12, 2025
@findleyr
Copy link
Contributor Author

PTAL: I renamed LoggingTransport.Delegate to Transport, and updated all callsites.

@findleyr findleyr merged commit e097918 into modelcontextprotocol:main Aug 12, 2025
6 checks passed
@findleyr findleyr deleted the opentransports branch August 15, 2025 17:53
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.

3 participants