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:
BIN
src/__pycache__/__init__.cpython-314.pyc
Normal file
BIN
src/__pycache__/__init__.cpython-314.pyc
Normal file
Binary file not shown.
BIN
src/__pycache__/server.cpython-314.pyc
Normal file
BIN
src/__pycache__/server.cpython-314.pyc
Normal file
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 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
|
import os
|
||||||
@@ -27,7 +27,7 @@ async def api_get(endpoint: str) -> dict[str, Any]:
|
|||||||
resp.raise_for_status()
|
resp.raise_for_status()
|
||||||
return resp.json()
|
return resp.json()
|
||||||
except httpx.ConnectError:
|
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:
|
except httpx.HTTPStatusError as e:
|
||||||
return {"error": f"HTTP {e.response.status_code}: {e.response.text}"}
|
return {"error": f"HTTP {e.response.status_code}: {e.response.text}"}
|
||||||
except Exception as e:
|
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()
|
resp.raise_for_status()
|
||||||
return resp.json()
|
return resp.json()
|
||||||
except httpx.ConnectError:
|
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:
|
except httpx.HTTPStatusError as e:
|
||||||
return {"error": f"HTTP {e.response.status_code}: {e.response.text}"}
|
return {"error": f"HTTP {e.response.status_code}: {e.response.text}"}
|
||||||
except Exception as e:
|
except Exception as e:
|
||||||
@@ -57,7 +57,7 @@ async def api_delete(endpoint: str) -> dict[str, Any]:
|
|||||||
resp.raise_for_status()
|
resp.raise_for_status()
|
||||||
return resp.json()
|
return resp.json()
|
||||||
except httpx.ConnectError:
|
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:
|
except httpx.HTTPStatusError as e:
|
||||||
return {"error": f"HTTP {e.response.status_code}: {e.response.text}"}
|
return {"error": f"HTTP {e.response.status_code}: {e.response.text}"}
|
||||||
except Exception as e:
|
except Exception as e:
|
||||||
|
|||||||
Reference in New Issue
Block a user