From 317acdffadbaf99ccb644bdad38e44aa4e09c31f Mon Sep 17 00:00:00 2001 From: Willem Jiang Date: Tue, 9 Sep 2025 23:02:15 +0800 Subject: [PATCH] fix: the stdio and sse mcp server loading issue (#566) --- src/server/mcp_utils.py | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/server/mcp_utils.py b/src/server/mcp_utils.py index dcb9340..ce2bf19 100644 --- a/src/server/mcp_utils.py +++ b/src/server/mcp_utils.py @@ -30,7 +30,12 @@ async def _get_tools_from_client_session( Raises: Exception: If there's an error during the process """ - async with client_context_manager as (read, write, _): + async with client_context_manager as context_result: + # Access by index to be safe + read = context_result[0] + write = context_result[1] + # Ignore any additional values + async with ClientSession( read, write, read_timeout_seconds=timedelta(seconds=timeout_seconds) ) as session: