StarrySkyWorld commited on
Commit
1994bf9
·
verified ·
1 Parent(s): 022f7b7

Update main.py

Browse files
Files changed (1) hide show
  1. main.py +5 -0
main.py CHANGED
@@ -666,6 +666,11 @@ async def service_control(service: str, action: str) -> Dict[str, Any]:
666
  if action not in ["start", "stop", "restart", "status"]: return {"error": "Invalid action"}
667
  return await execute_command(f"systemctl {action} {service}")
668
 
 
 
 
 
 
669
  # ============ FastAPI 应用构建 ============
670
 
671
  def create_app():
 
666
  if action not in ["start", "stop", "restart", "status"]: return {"error": "Invalid action"}
667
  return await execute_command(f"systemctl {action} {service}")
668
 
669
+
670
+ @mcp.tool()
671
+ async def get_server_addr():
672
+ return os.getenv("SERVER_URL", default="Unknown")
673
+
674
  # ============ FastAPI 应用构建 ============
675
 
676
  def create_app():