import uvicorn from fastmcp import FastMCP # Create the FastMCP server mcp = FastMCP("MathServer") @mcp.tool() def sum_numbers(a: int, b: int) -> int: """Returns the sum of two numbers.""" return a + b if __name__ == "__main__": # Create the ASGI app and run it explicitly with uvicorn app = mcp.http_app(transport="sse") uvicorn.run(app, host="0.0.0.0", port=7860)