mirror of
https://github.com/prowler-cloud/prowler.git
synced 2025-12-19 05:17:47 +00:00
feat(mcp): add health check endpoint (#8905)
This commit is contained in:
committed by
GitHub
parent
9761651f8d
commit
27304a8007
@@ -2,6 +2,7 @@ import os
|
||||
|
||||
from fastmcp import FastMCP
|
||||
from prowler_mcp_server.lib.logger import logger
|
||||
from starlette.responses import JSONResponse
|
||||
|
||||
|
||||
async def setup_main_server(transport: str) -> FastMCP:
|
||||
@@ -52,4 +53,9 @@ async def setup_main_server(transport: str) -> FastMCP:
|
||||
except Exception as e:
|
||||
logger.error(f"Failed to import Prowler Documentation server: {e}")
|
||||
|
||||
# Add health check endpoint
|
||||
@prowler_mcp_server.custom_route("/health", methods=["GET"])
|
||||
async def health_check(request):
|
||||
return JSONResponse({"status": "healthy", "service": "prowler-mcp-server"})
|
||||
|
||||
return prowler_mcp_server
|
||||
|
||||
Reference in New Issue
Block a user