From d3e364a18f582046971ae1dd85af99285230f708 Mon Sep 17 00:00:00 2001 From: Piers Date: Fri, 22 May 2026 10:04:14 +1000 Subject: [PATCH] chore: harden MCP_HOST default to 127.0.0.1 per DD-242 Brings syncthing-blade-mcp into compliance with DD-242 transport policy (directives/access-policy.md): blade MCPs invoked manually with HTTP enabled MUST default to 127.0.0.1, never 0.0.0.0. Users who want to expose the server beyond loopback set MCP_HOST=0.0.0.0 explicitly. Co-Authored-By: Claude Opus 4.7 --- src/syncthing_mcp/__main__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/syncthing_mcp/__main__.py b/src/syncthing_mcp/__main__.py index cf67c7f..f3be613 100644 --- a/src/syncthing_mcp/__main__.py +++ b/src/syncthing_mcp/__main__.py @@ -19,7 +19,7 @@ def _run_http() -> None: """Start the Streamable HTTP server with optional bearer-token auth.""" from syncthing_mcp.server import mcp - host = os.environ.get("MCP_HOST", "0.0.0.0") + host = os.environ.get("MCP_HOST", "127.0.0.1") port = int(os.environ.get("MCP_PORT", "8000")) token = os.environ.get("MCP_AUTH_TOKEN", "").strip()