Skip to content

Conversation

WilliamRabuel
Copy link
Contributor

Summary

This PR updates the default behavior of MCPClient to use the streamable-http transport instead of the deprecated sse protocol when no transport is explicitly provided in server_parameters.

Changes

  • Default transport is now "streamable-http" if not specified.
  • Updated warning message accordingly.
  • Reflects change introduced in version 1.20.0 of mcp.

Why?

As of v1.20.0, the "sse" transport is deprecated. This change aligns the default behavior with the new recommended standard and avoids future breakage.

### Summary

This PR updates the default behavior of `MCPClient` to use the `streamable-http` transport instead of the deprecated `sse` protocol when no `transport` is explicitly provided in `server_parameters`.

### Changes

- Default transport is now `"streamable-http"` if not specified.
- Updated warning message accordingly.
- Reflects change introduced in version 1.20.0 of `mcp`.

### Why?

As of v1.20.0, the `"sse"` transport is deprecated. This change aligns the default behavior with the new recommended standard and avoids future breakage.
Adds a unit test to validate that MCPClient uses 'streamable-http' as the default transport when no 'transport' key is explicitly provided in the server_parameters dict.

This ensures the new default (introduced in v1.20) is enforced and helps prevent future regressions.
Also checks that a FutureWarning is properly issued to guide users toward explicit usage.
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.

1 participant