fix: Update gridbot-mcp from SSH tunnel to VPN architecture

- Change error messages from "SSH tunnel" to "VPN"
- Update docstring to reference VPN and GRIDBOT_API_URL
- Default API URL now http://10.0.1.3:8000 (conductor on infra VM)

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
This commit is contained in:
Christian Gick
2026-01-15 16:32:48 +02:00
parent d231fcce67
commit 1ac1e245d6
3 changed files with 4 additions and 4 deletions

Binary file not shown.

Binary file not shown.

View File

@@ -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: