#!/usr/bin/env python3 """ Claude Agent Selection MCP Server - Production Entry Point Built following FastMCP best practices: - Single entry point with proper async handling - Clean server initialization - Full feature set with hierarchical agent intelligence """ from agent_mcp_server.server import mcp, initialize_server async def initialize_and_run(): """Initialize services and start server""" await initialize_server() # Use run() in synchronous context as per FastMCP best practices await mcp.run_async(transport="stdio") def main(): """ Main entry point following FastMCP best practices. Initializes then uses mcp.run() in synchronous context. """ # Import here to avoid any import-time async issues import asyncio # Use the recommended pattern from FastMCP docs async def init_then_run(): await initialize_server() # Run initialization asyncio.run(init_then_run()) # Then run the server synchronously as recommended mcp.run(transport="stdio") if __name__ == "__main__": main()