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

from __future__ import annotations

from mcp.server.fastmcp import FastMCP

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


def create_server(
    manager: VmManager | None = None,
    *,
    profile: McpToolProfile = "workspace-full",
) -> FastMCP:
    """Create and return a configured MCP server instance.

    `workspace-full` remains the default for 3.x compatibility. New chat hosts
    should usually start with `profile="workspace-core"`.
    """
    return Pyro(manager=manager).create_server(profile=profile)


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