Files
ethanfelandClaude Opus 4.8 de6c54cd8a feat: COMFY_BRIDGE_MCP_HOST to bind 0.0.0.0 for Docker/remote access
Adds a host bind env var (mirrors the port var) plus a README section on
running ComfyUI in Docker: bind 0.0.0.0, publish the port, point the agent at
the server IP, and handle images via a shared folder with matching paths.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-28 14:51:25 +02:00

20 lines
768 B
Python

from src.bridge import mcp_server
def test_resolve_bind_defaults(monkeypatch):
monkeypatch.delenv("COMFY_BRIDGE_MCP_HOST", raising=False)
monkeypatch.delenv("COMFY_BRIDGE_MCP_PORT", raising=False)
assert mcp_server._resolve_bind(None, None) == ("127.0.0.1", 9188)
def test_resolve_bind_reads_env(monkeypatch):
monkeypatch.setenv("COMFY_BRIDGE_MCP_HOST", "0.0.0.0")
monkeypatch.setenv("COMFY_BRIDGE_MCP_PORT", "9999")
assert mcp_server._resolve_bind(None, None) == ("0.0.0.0", 9999)
def test_resolve_bind_explicit_args_override_env(monkeypatch):
monkeypatch.setenv("COMFY_BRIDGE_MCP_HOST", "0.0.0.0")
monkeypatch.setenv("COMFY_BRIDGE_MCP_PORT", "9999")
assert mcp_server._resolve_bind("127.0.0.1", 1234) == ("127.0.0.1", 1234)