sitebay-mcp 0.1.1751196041__tar.gz → 0.1.1751286041__tar.gz

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.
Files changed (25) hide show
  1. {sitebay_mcp-0.1.1751196041 → sitebay_mcp-0.1.1751286041}/PKG-INFO +1 -1
  2. {sitebay_mcp-0.1.1751196041 → sitebay_mcp-0.1.1751286041}/pyproject.toml +1 -1
  3. {sitebay_mcp-0.1.1751196041 → sitebay_mcp-0.1.1751286041}/src/sitebay_mcp/client.py +14 -3
  4. {sitebay_mcp-0.1.1751196041 → sitebay_mcp-0.1.1751286041}/.flake8 +0 -0
  5. {sitebay_mcp-0.1.1751196041 → sitebay_mcp-0.1.1751286041}/.github/workflows/python-pytest.yml +0 -0
  6. {sitebay_mcp-0.1.1751196041 → sitebay_mcp-0.1.1751286041}/.github/workflows/testpypi.yaml +0 -0
  7. {sitebay_mcp-0.1.1751196041 → sitebay_mcp-0.1.1751286041}/.gitignore +0 -0
  8. {sitebay_mcp-0.1.1751196041 → sitebay_mcp-0.1.1751286041}/Dockerfile +0 -0
  9. {sitebay_mcp-0.1.1751196041 → sitebay_mcp-0.1.1751286041}/LICENSE +0 -0
  10. {sitebay_mcp-0.1.1751196041 → sitebay_mcp-0.1.1751286041}/PLAN.md +0 -0
  11. {sitebay_mcp-0.1.1751196041 → sitebay_mcp-0.1.1751286041}/README.md +0 -0
  12. {sitebay_mcp-0.1.1751196041 → sitebay_mcp-0.1.1751286041}/example-config.json +0 -0
  13. {sitebay_mcp-0.1.1751196041 → sitebay_mcp-0.1.1751286041}/smithery.yaml +0 -0
  14. {sitebay_mcp-0.1.1751196041 → sitebay_mcp-0.1.1751286041}/src/sitebay_mcp/__init__.py +0 -0
  15. {sitebay_mcp-0.1.1751196041 → sitebay_mcp-0.1.1751286041}/src/sitebay_mcp/auth.py +0 -0
  16. {sitebay_mcp-0.1.1751196041 → sitebay_mcp-0.1.1751286041}/src/sitebay_mcp/exceptions.py +0 -0
  17. {sitebay_mcp-0.1.1751196041 → sitebay_mcp-0.1.1751286041}/src/sitebay_mcp/resources.py +0 -0
  18. {sitebay_mcp-0.1.1751196041 → sitebay_mcp-0.1.1751286041}/src/sitebay_mcp/server.py +0 -0
  19. {sitebay_mcp-0.1.1751196041 → sitebay_mcp-0.1.1751286041}/src/sitebay_mcp/tools/__init__.py +0 -0
  20. {sitebay_mcp-0.1.1751196041 → sitebay_mcp-0.1.1751286041}/src/sitebay_mcp/tools/operations.py +0 -0
  21. {sitebay_mcp-0.1.1751196041 → sitebay_mcp-0.1.1751286041}/src/sitebay_mcp/tools/sites.py +0 -0
  22. {sitebay_mcp-0.1.1751196041 → sitebay_mcp-0.1.1751286041}/tests/unit/__init__.py +0 -0
  23. {sitebay_mcp-0.1.1751196041 → sitebay_mcp-0.1.1751286041}/tests/unit/test_auth.py +0 -0
  24. {sitebay_mcp-0.1.1751196041 → sitebay_mcp-0.1.1751286041}/tests/unit/test_client.py +0 -0
  25. {sitebay_mcp-0.1.1751196041 → sitebay_mcp-0.1.1751286041}/uv.lock +0 -0
@@ -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,6 +1,6 @@
1
1
  [project]
2
2
  name = "sitebay-mcp"
3
- version = "0.1.1751196041"
3
+ version = "0.1.1751286041"
4
4
  description = "SiteBay MCP Server - WordPress hosting management through Claude Code"
5
5
  authors = [{name = "SiteBay", email = "support@sitebay.org"}]
6
6
  readme = "README.md"
@@ -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"""