diff --git a/pyproject.toml b/pyproject.toml index bee8ef757..686971602 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -7,7 +7,7 @@ dependencies = [ "python-dotenv>=1.1.0", "exceptiongroup>=1.2.2", "httpx>=0.28.1", - "mcp>=1.9.2,<2.0.0", + "mcp>=1.9.4,<2.0.0", "openapi-pydantic>=0.5.1", "rich>=13.9.4", "typer>=0.15.2", diff --git a/tests/client/test_streamable_http.py b/tests/client/test_streamable_http.py index f0ee398bd..11f4b4e33 100644 --- a/tests/client/test_streamable_http.py +++ b/tests/client/test_streamable_http.py @@ -1,7 +1,7 @@ import asyncio import json import sys -from collections.abc import Generator +from collections.abc import AsyncGenerator import pytest import uvicorn @@ -87,9 +87,11 @@ def run_nested_server(host: str, port: int) -> None: server.run() -@pytest.fixture(scope="module") -def streamable_http_server() -> Generator[str, None, None]: +@pytest.fixture() +async def streamable_http_server() -> AsyncGenerator[str, None]: with run_server_in_process(run_server, transport="streamable-http") as url: + async with Client(transport=StreamableHttpTransport(f"{url}/mcp")) as client: + assert await client.ping() yield f"{url}/mcp" @@ -158,13 +160,3 @@ class TestTimeout: ) as client: with pytest.raises(McpError): await client.call_tool("sleep", {"seconds": 0.2}, timeout=0.1) - - async def test_timeout_client_timeout_overrides_tool_call_timeout_if_lower( - self, streamable_http_server: str - ): - with pytest.raises(McpError): - async with Client( - transport=StreamableHttpTransport(streamable_http_server), - timeout=0.1, - ) as client: - await client.call_tool("sleep", {"seconds": 0.2}, timeout=2) diff --git a/uv.lock b/uv.lock index 4eacf6541..c390a5bb1 100644 --- a/uv.lock +++ b/uv.lock @@ -472,7 +472,7 @@ requires-dist = [ { name = "authlib", specifier = ">=1.5.2" }, { name = "exceptiongroup", specifier = ">=1.2.2" }, { name = "httpx", specifier = ">=0.28.1" }, - { name = "mcp", specifier = ">=1.9.2,<2.0.0" }, + { name = "mcp", specifier = ">=1.9.4,<2.0.0" }, { name = "openapi-pydantic", specifier = ">=0.5.1" }, { name = "python-dotenv", specifier = ">=1.1.0" }, { name = "rich", specifier = ">=13.9.4" },