Add streamable_http_client which accepts httpx.AsyncClient instead of httpx_client_factory (#1177)

Co-authored-by: Felix Weinberger <fweinberger@anthropic.com>
This commit is contained in:
Marcelo Trylesinski 2025-12-10 17:39:00 +01:00 • committed by GitHub
commit a3a4b8d11a
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -18,7 +18,7 @@ from starlette.responses import JSONResponse, Response
from starlette.routing import Route
from mcp import ClientSession, types
from mcp.client.streamable_http import streamablehttp_client
from mcp.client.streamable_http import streamable_http_client
from mcp.shared.session import RequestResponder
from mcp.types import ClientNotification, RootsListChangedNotification
from tests.test_helpers import wait_for_server
@ -127,7 +127,7 @@ async def test_non_compliant_notification_response(non_sdk_server: None, non_sdk
if isinstance(message, Exception):
returned_exception = message
async with streamablehttp_client(server_url) as (read_stream, write_stream, _):
async with streamable_http_client(server_url) as (read_stream, write_stream, _):
async with ClientSession(
read_stream,
write_stream,