mcp/server: bind 0.0.0.0:9810 (FastMCP default is 127.0.0.1:8000)

The MCP service unit expects port 9810 per the inventory; FastMCP only
binds correctly when we set mcp.settings.host/port before run().

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
root
2026-05-20 16:42:30 +02:00
parent bc578df39b
commit 1dc40ca715

View File

@@ -35,6 +35,8 @@ SSH_USER = os.environ.get("HOMELAB_MCP_SSH_USER", "mcp-reader")
SSH_TIMEOUT = int(os.environ.get("HOMELAB_MCP_SSH_TIMEOUT", "10"))
mcp = FastMCP("homelab")
mcp.settings.host = os.environ.get("HOMELAB_MCP_HOST", "0.0.0.0")
mcp.settings.port = int(os.environ.get("HOMELAB_MCP_PORT", "9810"))
def _load_inventory() -> dict: