sitebay-mcp 0.1.1751196041__py3-none-any.whl → 0.1.1751286041__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
sitebay_mcp/client.py CHANGED
@@ -27,7 +27,8 @@ class SiteBayClient:
27
27
  self._client = httpx.AsyncClient(
28
28
  base_url=self.BASE_URL,
29
29
  timeout=timeout,
30
- headers=self.auth.get_headers()
30
+ headers=self.auth.get_headers(),
31
+ follow_redirects=True
31
32
  )
32
33
 
33
34
  async def __aenter__(self):
@@ -233,11 +234,21 @@ class SiteBayClient:
233
234
  return await self._request("DELETE", endpoint, params=params)
234
235
 
235
236
  # Site Management Methods
236
- async def list_sites(self, team_id: Optional[str] = None) -> List[Dict[str, Any]]:
237
+ async def list_sites(self, team_id: Optional[str] = None) -> Union[List[Dict[str, Any]], str]:
237
238
  """List all sites for the user"""
238
239
  params = {"team_id": team_id} if team_id else None
239
240
  response = await self.get("/site", params=params)
240
- return response.get("results", [])
241
+
242
+ # Handle case where API returns error as string
243
+ if isinstance(response, str):
244
+ return response
245
+
246
+ # Handle normal dict response
247
+ if isinstance(response, dict):
248
+ return response.get("results", [])
249
+
250
+ # Handle unexpected response format
251
+ return f"Unexpected response format: {type(response).__name__}"
241
252
 
242
253
  async def get_site(self, fqdn: str) -> Dict[str, Any]:
243
254
  """Get details for a specific site"""
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: sitebay-mcp
3
- Version: 0.1.1751196041
3
+ Version: 0.1.1751286041
4
4
  Summary: SiteBay MCP Server - WordPress hosting management through Claude Code
5
5
  Author-email: SiteBay <support@sitebay.org>
6
6
  License-File: LICENSE
@@ -1,14 +1,14 @@
1
1
  sitebay_mcp/__init__.py,sha256=RvWonHPlNJwFvYioSwHvLLRCuvmH0h6nmOR2rB95HKc,386
2
2
  sitebay_mcp/auth.py,sha256=idUbSdtIAMqrSLnzZ17VmhxLHox0SA81cb2ks2YrxUU,1739
3
- sitebay_mcp/client.py,sha256=95oR1EQ8h1F42qdDPcpYwjuVKKMY7yy7yqa3LxO_T0E,14623
3
+ sitebay_mcp/client.py,sha256=tPE6tgiwUXTSIVpyMYYoI8gweJe-lHUGdUuto3r6jFk,15016
4
4
  sitebay_mcp/exceptions.py,sha256=3zt40zk8MD-k4-5NwxMzWcQDbexLcVOUsoNIREXwhWg,1157
5
5
  sitebay_mcp/resources.py,sha256=A9vbeFBFT2UoodJawRtzmqSBzRbx1ksGMl00vFnrMUc,5501
6
6
  sitebay_mcp/server.py,sha256=M3Z1oEmGOyIpy2wJgR9O_wYxZAMtEkt4CI8Qs4YiwIo,28321
7
7
  sitebay_mcp/tools/__init__.py,sha256=5QxQGl_HgkH-7uFqY3puZmTqeVQkE-yxym43EcRr6zc,108
8
8
  sitebay_mcp/tools/operations.py,sha256=VXwpt-p2MguW-sK1FHmQUMD2ldEi5T_p59pNMG-kuuQ,8803
9
9
  sitebay_mcp/tools/sites.py,sha256=rNeRwFg9FmE6RuZOZS7TRxILl-bcIJuW2nKUippuKjc,8889
10
- sitebay_mcp-0.1.1751196041.dist-info/METADATA,sha256=gW11_e6ZJcnsvL-wGGfrka0Jpb1Ca8bi0RkhR5mOS8A,8161
11
- sitebay_mcp-0.1.1751196041.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
12
- sitebay_mcp-0.1.1751196041.dist-info/entry_points.txt,sha256=kOW3HHmOw1mAqzbDliyWzaHwS-tAwISRFdQHBa9QvRc,56
13
- sitebay_mcp-0.1.1751196041.dist-info/licenses/LICENSE,sha256=PjkyMZfBImLXpO5eKb_sI__W1JMf1jL51n1O7H4a1I0,1062
14
- sitebay_mcp-0.1.1751196041.dist-info/RECORD,,
10
+ sitebay_mcp-0.1.1751286041.dist-info/METADATA,sha256=azvnLv-3oZoNV-GsJcpQ-2no15CN9vE6lDrqD7c61z4,8161
11
+ sitebay_mcp-0.1.1751286041.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
12
+ sitebay_mcp-0.1.1751286041.dist-info/entry_points.txt,sha256=kOW3HHmOw1mAqzbDliyWzaHwS-tAwISRFdQHBa9QvRc,56
13
+ sitebay_mcp-0.1.1751286041.dist-info/licenses/LICENSE,sha256=PjkyMZfBImLXpO5eKb_sI__W1JMf1jL51n1O7H4a1I0,1062
14
+ sitebay_mcp-0.1.1751286041.dist-info/RECORD,,