From 146d7efb0ff0785c0dea4e90a2485c869c885c0c Mon Sep 17 00:00:00 2001 From: pengwa Date: Fri, 26 Sep 2025 22:42:23 +0800 Subject: [PATCH] Add error log for client stdio (#924) Co-authored-by: Your Name Co-authored-by: Marcelo Trylesinski Co-authored-by: Felix Weinberger <3823880+felixweinberger@users.noreply.github.com> --- src/mcp/client/stdio/__init__.py | 1 + 1 file changed, 1 insertion(+) diff --git a/src/mcp/client/stdio/__init__.py b/src/mcp/client/stdio/__init__.py index e3532e98..6dc7c89a 100644 --- a/src/mcp/client/stdio/__init__.py +++ b/src/mcp/client/stdio/__init__.py @@ -154,6 +154,7 @@ async def stdio_client(server: StdioServerParameters, errlog: TextIO = sys.stder try: message = types.JSONRPCMessage.model_validate_json(line) except Exception as exc: + logger.exception("Failed to parse JSONRPC message from server") await read_stream_writer.send(exc) continue