From 3f41416805dce7860e33070fd14d9e207e48f5aa Mon Sep 17 00:00:00 2001 From: root Date: Wed, 20 May 2026 20:23:03 +0200 Subject: [PATCH] mcp/server: log ssh failures so silent empties are debuggable --- mcp/server.py | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/mcp/server.py b/mcp/server.py index 89aeccb..f895991 100755 --- a/mcp/server.py +++ b/mcp/server.py @@ -99,10 +99,17 @@ def _run_via_hubris(remote_host: str, cmd: list[str], f"{SSH_USER}@{HUBRIS_HOST}", joined, ] - return subprocess.run( + proc = subprocess.run( ssh_args, capture_output=True, text=True, timeout=timeout or SSH_TIMEOUT * 3, ) + if proc.returncode != 0: + import logging as _l + _l.getLogger("homelab-mcp").warning( + "ssh failed rc=%s host=%s cmd=%r stderr=%r", + proc.returncode, remote_host, joined, proc.stderr.strip(), + ) + return proc def _service_to_host(service: str) -> str: