File tree Expand file tree Collapse file tree 2 files changed +3
-2
lines changed
Expand file tree Collapse file tree 2 files changed +3
-2
lines changed Original file line number Diff line number Diff line change 1616
1717UYUNI_MCP_HOST = os .environ .get ("UYUNI_MCP_HOST" , "127.0.0.1" )
1818UYUNI_MCP_PORT = int (os .environ .get ("UYUNI_MCP_PORT" , "8000" ))
19- UYUNI_AUTH_SERVER = os .environ .get ("UYUNI_AUTH_SERVER" )
19+ UYUNI_AUTH_SERVER = os .environ .get ("UYUNI_AUTH_SERVER" , None )
2020
2121UYUNI_MCP_SSL_VERIFY = (
2222 os .environ .get ("UYUNI_MCP_SSL_VERIFY" , "true" ).lower ()
Original file line number Diff line number Diff line change @@ -1551,7 +1551,8 @@ def main_cli():
15511551 logger .info ("Running Uyuni MCP server." )
15521552
15531553 if CONFIG ["UYUNI_MCP_TRANSPORT" ] == Transport .HTTP .value :
1554- mcp .add_middleware (AuthTokenMiddleware ())
1554+ if CONFIG ["AUTH_SERVER" ]:
1555+ mcp .add_middleware (AuthTokenMiddleware ())
15551556 mcp .run (transport = "streamable-http" , host = CONFIG ["UYUNI_MCP_HOST" ], port = CONFIG ["UYUNI_MCP_PORT" ])
15561557 elif CONFIG ["UYUNI_MCP_TRANSPORT" ] == Transport .STDIO .value :
15571558 mcp .run (transport = "stdio" )
You can’t perform that action at this time.
0 commit comments