refactor: mount FastMCP app at root and retain /health for compatibility
All checks were successful
Build and Push Monarch MCP Docker Image / build (push) Successful in 7s

This commit is contained in:
Ben
2025-12-24 04:56:33 +00:00
parent ebb571a7a6
commit 92fa2c3f11

View File

@@ -184,12 +184,13 @@ def create_app():
# FastMCP.http_app() already includes its own health check and SSE routes.
# By default it uses /sse for the stream and /messages for POSTs.
routes = [
return Starlette(
routes=[
Route("/health", health_check, methods=["GET"]),
Mount("/mcp", app=mcp_app),
]
return Starlette(routes=routes, lifespan=mcp_app.lifespan)
Mount("/", app=mcp_app),
],
lifespan=mcp_app.lifespan,
)
app = create_app()