MCPcopy Create free account
hub / github.com/OpenRaiser/PaperFlow / run_server

Function run_server

deployments/desktop/server.py:597–609  ·  view source on GitHub ↗
(host: str = "127.0.0.1", port: int = 8765, open_browser: bool = True)

Source from the content-addressed store, hash-verified

595 sys.stdout.write("[gui] " + fmt % args + "\n")
596
597
598def _is_loopback_host(host: str) -> bool:
599 """Whether binding to host keeps the server reachable only from this machine."""
600 candidate = str(host or "").strip().strip("[]").lower()
601 if candidate in {"localhost", ""}:
602 return True
603 try:
604 return ipaddress.ip_address(candidate).is_loopback
605 except ValueError:
606 # A hostname we cannot classify offline; treat as non-loopback so the
607 # explicit opt-in below is required rather than assumed safe.
608 return False
609
610
611def run_server(
612 host: str = "127.0.0.1",

Callers 1

mainFunction · 0.70

Calls 1

startMethod · 0.80

Tested by

no test coverage detected