Skip to content

Conversation

@ps06756
Copy link

@ps06756 ps06756 commented Dec 29, 2025

Summary

  • Updated the import in client.py to use the new streamable_http_client function name instead of the deprecated streamablehttp_client
  • Added backward-compatible import that first tries the new function name, then falls back to the old one for older MCP SDK versions
  • Updated unit tests to mock the new function name

Details

The MCP Python SDK v1.24.0 (released Dec 12, 2025) introduced a new streamable_http_client function and deprecated the old streamablehttp_client (see PR #1177).

Users running with MCP SDK >= 1.24.0 see the following warning:

DeprecationWarning: Use streamable_http_client instead

This fix uses a try/except import pattern to:

  1. Use the new streamable_http_client when available (MCP >= 1.24.0)
  2. Fall back to streamablehttp_client for older versions (MCP < 1.24.0)

Test plan

  • All existing unit tests pass (uv run pytest tests/unit/test_client.py -v)
  • Verified backward compatibility with MCP 1.20.0
  • Verified the new function exists in MCP 1.25.0 on PyPI

Fixes #128

Update the import in client.py to use the new `streamable_http_client`
function name instead of the deprecated `streamablehttp_client`.

Added backward-compatible import that:
- First tries to import the new `streamable_http_client` function
- Falls back to the old `streamablehttp_client` for older MCP SDK versions

This fixes the DeprecationWarning introduced in MCP SDK v1.24.0:
"Use streamable_http_client instead of streamablehttp_client"

Fixes aws#128
@ps06756 ps06756 requested a review from a team as a code owner December 29, 2025 00:50
@ps06756 ps06756 requested review from bidesh and harv-aws December 29, 2025 00:50
@ps06756
Copy link
Author

ps06756 commented Jan 8, 2026

@bidesh / @harv-aws Bumping this up, for review

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.

DeprecationWarning: Use streamable_http_client instead of streamablehttp_client

2 participants