diff --git a/src/__pycache__/__init__.cpython-314.pyc b/src/__pycache__/__init__.cpython-314.pyc new file mode 100644 index 0000000..1d2de44 Binary files /dev/null and b/src/__pycache__/__init__.cpython-314.pyc differ diff --git a/src/__pycache__/server.cpython-314.pyc b/src/__pycache__/server.cpython-314.pyc new file mode 100644 index 0000000..4bfcf68 Binary files /dev/null and b/src/__pycache__/server.cpython-314.pyc differ diff --git a/src/server.py b/src/server.py index 29f5d50..ec53fd1 100644 --- a/src/server.py +++ b/src/server.py @@ -1,7 +1,7 @@ """ Gridbot MCP Server - Wraps eToroGridbot REST API as MCP tools. -Requires SSH tunnel: ssh -L 8000:localhost:8000 services +Requires VPN connection and GRIDBOT_API_URL env var (default: http://10.0.1.3:8000) """ import os @@ -27,7 +27,7 @@ async def api_get(endpoint: str) -> dict[str, Any]: resp.raise_for_status() return resp.json() except httpx.ConnectError: - return {"error": "Connection failed - is SSH tunnel running?"} + return {"error": "Connection failed - check VPN (vpn-connect) and GRIDBOT_API_URL"} except httpx.HTTPStatusError as e: return {"error": f"HTTP {e.response.status_code}: {e.response.text}"} except Exception as e: @@ -42,7 +42,7 @@ async def api_post(endpoint: str, data: dict[str, Any] | None = None) -> dict[st resp.raise_for_status() return resp.json() except httpx.ConnectError: - return {"error": "Connection failed - is SSH tunnel running?"} + return {"error": "Connection failed - check VPN (vpn-connect) and GRIDBOT_API_URL"} except httpx.HTTPStatusError as e: return {"error": f"HTTP {e.response.status_code}: {e.response.text}"} except Exception as e: @@ -57,7 +57,7 @@ async def api_delete(endpoint: str) -> dict[str, Any]: resp.raise_for_status() return resp.json() except httpx.ConnectError: - return {"error": "Connection failed - is SSH tunnel running?"} + return {"error": "Connection failed - check VPN (vpn-connect) and GRIDBOT_API_URL"} except httpx.HTTPStatusError as e: return {"error": f"HTTP {e.response.status_code}: {e.response.text}"} except Exception as e: