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:
Binary file not shown.
@@ -1,7 +1,7 @@
|
|||||||
"""
|
"""
|
||||||
Gridbot MCP Server - Wraps eToroGridbot REST API as MCP tools.
|
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
|
import os
|
||||||
@@ -13,7 +13,7 @@ from mcp.server import Server
|
|||||||
from mcp.server.stdio import stdio_server
|
from mcp.server.stdio import stdio_server
|
||||||
from mcp.types import Tool, TextContent
|
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
|
TIMEOUT = 30.0
|
||||||
|
|
||||||
server = Server("gridbot-mcp")
|
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),
|
"percentage": arguments.get("percentage", 50.0),
|
||||||
"reason": arguments.get("reason", "manual_trigger"),
|
"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":
|
case "scale_out_adjust_threshold":
|
||||||
payload = {
|
payload = {
|
||||||
"symbol": arguments["symbol"],
|
"symbol": arguments["symbol"],
|
||||||
|
|||||||
Reference in New Issue
Block a user