Replace hardcoded IPs with DNS hostnames

- Updated server.py BASE_URL to use services.agiliton.internal
- Updated docstring with new default URL

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
This commit is contained in:
Christian Gick
2026-01-17 09:11:41 +02:00
parent 69d7c1f572
commit b072878ca5
2 changed files with 3 additions and 3 deletions

View File

@@ -1,7 +1,7 @@
"""
Gridbot MCP Server - Wraps eToroGridbot REST API as MCP tools.
Requires VPN connection and GRIDBOT_API_URL env var (default: http://10.0.1.3:8000)
Requires VPN connection and GRIDBOT_API_URL env var (default: http://services.agiliton.internal:8000)
"""
import os
@@ -13,7 +13,7 @@ from mcp.server import Server
from mcp.server.stdio import stdio_server
from mcp.types import Tool, TextContent
BASE_URL = os.getenv("GRIDBOT_API_URL", "http://10.0.1.3:8000")
BASE_URL = os.getenv("GRIDBOT_API_URL", "http://services.agiliton.internal:8000")
TIMEOUT = 30.0
server = Server("gridbot-mcp")
@@ -726,7 +726,7 @@ async def call_tool(name: str, arguments: dict[str, Any]) -> list[TextContent]:
"percentage": arguments.get("percentage", 50.0),
"reason": arguments.get("reason", "manual_trigger"),
}
result = await api_post("/portfolio/scale-out-trigger", payload)
result = await api_post("/api/trade/scale-out/trigger", payload)
case "scale_out_adjust_threshold":
payload = {
"symbol": arguments["symbol"],