INNER CODE UNIT · Python
is_exposed_host
Nebulock-Inc/agentic-threat-hunting-framework · athf/mcp/server.py:129
def is_exposed_host(host: str) -> bool:
"""Return True if `host` accepts connections from beyond this machine."""
return host.strip().lower() not in LOOPBACK_HOSTS
def main(
workspace_path: Optional[str] = None,
transport: str = "stdio",
port: int = 3100,
host: str = DEFAULT_HOST,
) -> None:
"""Entry point for running the MCP server.
For the HTTP transports the server binds to loopback by default. It serves
unauthenticated tools over the whole workspace, so exposing it on a routable
interface requires passing `host` explicitly and putting an authenticating
proxy in front of it.
"""