From c2e9745163032359c0be6aa4b8a7ef7ed2514591 Mon Sep 17 00:00:00 2001 From: Luca Beurer-Kellner Date: Thu, 8 May 2025 18:03:37 +0200 Subject: [PATCH] line logging --- gateway/mcp/mcp.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/gateway/mcp/mcp.py b/gateway/mcp/mcp.py index 46ac78b..0a40000 100644 --- a/gateway/mcp/mcp.py +++ b/gateway/mcp/mcp.py @@ -396,6 +396,7 @@ def stream_and_forward_stdout(mcp_process: subprocess.Popen, ctx: McpContext) -> line_str = line.decode(UTF_8_ENCODING).strip() if not line_str: continue + mcp_log(f"[INFO] Received line: {line_str}") parsed_json = json.loads(line_str) processed_json = hook_tool_result(ctx, parsed_json) @@ -435,6 +436,8 @@ def run_stdio_input_loop(ctx: McpContext, mcp_process: subprocess.Popen) -> None if not line: break + mcp_log(f"[INFO] Received line: {line}") + # Try to decode and parse as JSON to check for tool calls try: text = line.decode(UTF_8_ENCODING)