"""MCP server exposing ephemeral VM lifecycle tools."""

from __future__ import annotations

from mcp.server.fastmcp import FastMCP

from pyro_mcp.api import Pyro
from pyro_mcp.vm_manager import VmManager


def create_server(manager: VmManager | None = None) -> FastMCP:
    """Create and return a configured MCP server instance."""
    return Pyro(manager=manager).create_server()


def main() -> None:
    """Run the MCP server over stdio."""
    create_server().run(transport="stdio")
