"""Main entry point for {{ project_name }}."""

import asyncio
import sys

import structlog

from {{ package_name }}.server import main

logger = structlog.get_logger(__name__)


def run() -> None:
    """Run the MCP server."""
    try:
        asyncio.run(main())
    except KeyboardInterrupt:
        logger.info("server_stopped", reason="keyboard_interrupt")
        sys.exit(0)
    except Exception as e:
        logger.error("server_error", error=str(e), exc_info=True)
        sys.exit(1)


if __name__ == "__main__":
    run()