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
All checks were successful
Build and Push Monarch MCP Docker Image / build (push) Successful in 7s
This commit is contained in:
@@ -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 = [
|
||||
Route("/health", health_check, methods=["GET"]),
|
||||
Mount("/mcp", app=mcp_app),
|
||||
]
|
||||
|
||||
return Starlette(routes=routes, lifespan=mcp_app.lifespan)
|
||||
return Starlette(
|
||||
routes=[
|
||||
Route("/health", health_check, methods=["GET"]),
|
||||
Mount("/", app=mcp_app),
|
||||
],
|
||||
lifespan=mcp_app.lifespan,
|
||||
)
|
||||
|
||||
|
||||
app = create_app()
|
||||
|
||||
Reference in New Issue
Block a user