File tree Expand file tree Collapse file tree 2 files changed +3
-12
lines changed
Expand file tree Collapse file tree 2 files changed +3
-12
lines changed Original file line number Diff line number Diff line change 3232
3333if TYPE_CHECKING :
3434 from redis_sre_agent .core .tasks import TaskManager
35- from redis_sre_agent .core .threads import ThreadManager
3635
3736logger = logging .getLogger (__name__ )
3837
Original file line number Diff line number Diff line change 1010"""
1111
1212import logging
13- import os
1413from typing import Any , Dict , List , Optional
1514
1615from mcp .server .fastmcp import FastMCP
1716
1817logger = logging .getLogger (__name__ )
1918
20- # API URL - can be overridden via environment variable
21- API_BASE_URL = os .environ .get ("REDIS_SRE_API_URL" , "http://localhost:8080" )
22-
2319# Create the MCP server instance
2420mcp = FastMCP (
2521 name = "redis-sre-agent" ,
@@ -934,10 +930,6 @@ def get_http_app():
934930 return mcp .streamable_http_app ()
935931
936932
937- # ASGI app for uvicorn deployment - lazy initialization to avoid import-time errors
938- def _get_app ():
939- return get_http_app ()
940-
941-
942- # For uvicorn: uvicorn redis_sre_agent.mcp_server.server:app
943- app = None # Will be initialized on first request
933+ # ASGI app for uvicorn deployment
934+ # Usage: uvicorn redis_sre_agent.mcp_server.server:app --host 0.0.0.0 --port 8081
935+ app = mcp .streamable_http_app ()
You can’t perform that action at this time.
0 commit comments