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 <noreply@anthropic.com>
This commit is contained in:
PiersandClaude Opus 4.7 committed 2026-05-22 10:04:14 +10:00
1 parent e915e6da01
commit d3e364a18f
1 file changed
+1 -1
+1 -1
View File
@@ -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()