# Copyright (c) 2025 Dedalus Labs, Inc. and its contributors
# SPDX-License-Identifier: MIT
from dedalus_mcp import MCPServer
from dedalus_mcp.server import TransportSecuritySettings
from .gcal import get_gcal_connection, gcal_tools
from .smoke import smoke_tools
# --- Server ------------------------------------------------------------------
async def main() -> None:
# Ensure we have a valid Google access token before starting the server.
# We default to non-interactive: if tokens are missing, users should run:
# uv run python -m src.gcal_auth
gcal_api = get_gcal_connection(interactive_auth=False)
server = MCPServer(
name="gcal-mcp",
connections=[gcal_api],
http_security=TransportSecuritySettings(enable_dns_rebinding_protection=False),
authorization_server="https://preview.as.dedaluslabs.ai",
)
server.collect(*smoke_tools, *gcal_tools)
await server.serve(port=8080)