from __future__ import annotations

import sys

from .config import mcp_config, set_transport_mode
from .security.audit import audit_log
from .server import create_mcp_server


def main() -> None:
    set_transport_mode("http")
    server = create_mcp_server()
    audit_log({"event": "startup", "transport": "streamable-http", "port": mcp_config.port})
    server.run(transport="streamable-http", host="0.0.0.0", port=mcp_config.port)


if __name__ == "__main__":
    main()
