sitebay-mcp 0.1.1751189381__py3-none-any.whl → 0.1.1751285665__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
@@ -103,7 +103,7 @@ class SiteBayClient:
103
103
 
104
104
  return f"Validation Error: {str(error_data)}"
105
105
 
106
- def _extract_field_errors(self, error_data: dict) -> dict:
106
+ def _extract_field_errors(self, error_data: dict) -> dict[str, str]:
107
107
  """
108
108
  Extract field-specific errors for programmatic access
109
109
 
@@ -113,7 +113,7 @@ class SiteBayClient:
113
113
  Returns:
114
114
  Dictionary mapping field names to error messages
115
115
  """
116
- field_errors = {}
116
+ field_errors: dict[str, str] = {}
117
117
 
118
118
  if not error_data:
119
119
  return field_errors
@@ -233,11 +233,21 @@ class SiteBayClient:
233
233
  return await self._request("DELETE", endpoint, params=params)
234
234
 
235
235
  # Site Management Methods
236
- async def list_sites(self, team_id: Optional[str] = None) -> List[Dict[str, Any]]:
236
+ async def list_sites(self, team_id: Optional[str] = None) -> Union[List[Dict[str, Any]], str]:
237
237
  """List all sites for the user"""
238
238
  params = {"team_id": team_id} if team_id else None
239
239
  response = await self.get("/site", params=params)
240
- return response.get("results", [])
240
+
241
+ # Handle case where API returns error as string
242
+ if isinstance(response, str):
243
+ return response
244
+
245
+ # Handle normal dict response
246
+ if isinstance(response, dict):
247
+ return response.get("results", [])
248
+
249
+ # Handle unexpected response format
250
+ return f"Unexpected response format: {type(response).__name__}"
241
251
 
242
252
  async def get_site(self, fqdn: str) -> Dict[str, Any]:
243
253
  """Get details for a specific site"""
sitebay_mcp/resources.py CHANGED
@@ -132,7 +132,7 @@ async def get_account_summary_resource(ctx: Context) -> str:
132
132
  regions = await client.list_regions()
133
133
  templates = await client.list_templates()
134
134
 
135
- summary = {
135
+ summary: dict[str, Any] = {
136
136
  "account_overview": {
137
137
  "total_sites": len(sites),
138
138
  "total_teams": len(teams),
sitebay_mcp/server.py CHANGED
@@ -6,7 +6,7 @@ Main server implementation that provides MCP tools for SiteBay WordPress hosting
6
6
 
7
7
  import asyncio
8
8
  import sys
9
- from typing import Optional
9
+ from typing import Any, Optional
10
10
 
11
11
  from fastmcp import FastMCP
12
12
  from fastmcp.server import Context
@@ -454,7 +454,7 @@ async def sitebay_wordpress_proxy(
454
454
  await ctx.info(f"WordPress proxy request to {site_fqdn}{endpoint}")
455
455
 
456
456
  client = await initialize_client()
457
- proxy_data = {
457
+ proxy_data: dict[str, Any] = {
458
458
  "site_fqdn": site_fqdn,
459
459
  "endpoint": endpoint,
460
460
  "method": method
@@ -499,7 +499,7 @@ async def sitebay_shopify_proxy(
499
499
  await ctx.info(f"Shopify proxy request to {shop_domain}{endpoint}")
500
500
 
501
501
  client = await initialize_client()
502
- proxy_data = {
502
+ proxy_data: dict[str, Any] = {
503
503
  "shop_domain": shop_domain,
504
504
  "endpoint": endpoint,
505
505
  "access_token": access_token,
@@ -541,7 +541,7 @@ async def sitebay_posthog_proxy(
541
541
  await ctx.info(f"PostHog proxy request to {endpoint}")
542
542
 
543
543
  client = await initialize_client()
544
- proxy_data = {
544
+ proxy_data: dict[str, Any] = {
545
545
  "endpoint": endpoint,
546
546
  "data": data
547
547
  }
@@ -117,7 +117,7 @@ async def sitebay_site_get_events(
117
117
  result += f" - Description: {event.get('description')}\n"
118
118
 
119
119
  if event.get('metadata'):
120
- metadata = event.get('metadata')
120
+ metadata = event.get('metadata') or {}
121
121
  for key, value in metadata.items():
122
122
  result += f" - {key.title()}: {value}\n"
123
123
 
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: sitebay-mcp
3
- Version: 0.1.1751189381
3
+ Version: 0.1.1751285665
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
@@ -0,0 +1,14 @@
1
+ sitebay_mcp/__init__.py,sha256=RvWonHPlNJwFvYioSwHvLLRCuvmH0h6nmOR2rB95HKc,386
2
+ sitebay_mcp/auth.py,sha256=idUbSdtIAMqrSLnzZ17VmhxLHox0SA81cb2ks2YrxUU,1739
3
+ sitebay_mcp/client.py,sha256=C0SSjOyfwf9s40HRNNVphQSaoPxnyA4Cydg6Oy-VyhM,14981
4
+ sitebay_mcp/exceptions.py,sha256=3zt40zk8MD-k4-5NwxMzWcQDbexLcVOUsoNIREXwhWg,1157
5
+ sitebay_mcp/resources.py,sha256=A9vbeFBFT2UoodJawRtzmqSBzRbx1ksGMl00vFnrMUc,5501
6
+ sitebay_mcp/server.py,sha256=M3Z1oEmGOyIpy2wJgR9O_wYxZAMtEkt4CI8Qs4YiwIo,28321
7
+ sitebay_mcp/tools/__init__.py,sha256=5QxQGl_HgkH-7uFqY3puZmTqeVQkE-yxym43EcRr6zc,108
8
+ sitebay_mcp/tools/operations.py,sha256=VXwpt-p2MguW-sK1FHmQUMD2ldEi5T_p59pNMG-kuuQ,8803
9
+ sitebay_mcp/tools/sites.py,sha256=rNeRwFg9FmE6RuZOZS7TRxILl-bcIJuW2nKUippuKjc,8889
10
+ sitebay_mcp-0.1.1751285665.dist-info/METADATA,sha256=rrS7nVFbW2MdZm8ElrE4HjApq7sVY1NLPEXplSkCBvQ,8161
11
+ sitebay_mcp-0.1.1751285665.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
12
+ sitebay_mcp-0.1.1751285665.dist-info/entry_points.txt,sha256=kOW3HHmOw1mAqzbDliyWzaHwS-tAwISRFdQHBa9QvRc,56
13
+ sitebay_mcp-0.1.1751285665.dist-info/licenses/LICENSE,sha256=PjkyMZfBImLXpO5eKb_sI__W1JMf1jL51n1O7H4a1I0,1062
14
+ sitebay_mcp-0.1.1751285665.dist-info/RECORD,,
@@ -1,14 +0,0 @@
1
- sitebay_mcp/__init__.py,sha256=RvWonHPlNJwFvYioSwHvLLRCuvmH0h6nmOR2rB95HKc,386
2
- sitebay_mcp/auth.py,sha256=idUbSdtIAMqrSLnzZ17VmhxLHox0SA81cb2ks2YrxUU,1739
3
- sitebay_mcp/client.py,sha256=MzEje2tpK0SIlf_znYtaQ2R6V-kdgoEuaO3KIExJFVU,14597
4
- sitebay_mcp/exceptions.py,sha256=3zt40zk8MD-k4-5NwxMzWcQDbexLcVOUsoNIREXwhWg,1157
5
- sitebay_mcp/resources.py,sha256=wWJoFlR9rRBxx64t8U_JXSWZ8JC7Z9O3wiZvdMDnnOA,5485
6
- sitebay_mcp/server.py,sha256=J6QlvxNYOsgGoROBBCZP-dg8Yp8JBfQJ_BYqVc9vCi8,28268
7
- sitebay_mcp/tools/__init__.py,sha256=5QxQGl_HgkH-7uFqY3puZmTqeVQkE-yxym43EcRr6zc,108
8
- sitebay_mcp/tools/operations.py,sha256=Nus863sqREI_V9OPHOuiO-FOMz6u6MtLcr04LNVcFdk,8797
9
- sitebay_mcp/tools/sites.py,sha256=rNeRwFg9FmE6RuZOZS7TRxILl-bcIJuW2nKUippuKjc,8889
10
- sitebay_mcp-0.1.1751189381.dist-info/METADATA,sha256=W_bjME2LL3MNa27ShYSv1gsOKKEta7oGJRJtA6J-KDE,8161
11
- sitebay_mcp-0.1.1751189381.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
12
- sitebay_mcp-0.1.1751189381.dist-info/entry_points.txt,sha256=kOW3HHmOw1mAqzbDliyWzaHwS-tAwISRFdQHBa9QvRc,56
13
- sitebay_mcp-0.1.1751189381.dist-info/licenses/LICENSE,sha256=PjkyMZfBImLXpO5eKb_sI__W1JMf1jL51n1O7H4a1I0,1062
14
- sitebay_mcp-0.1.1751189381.dist-info/RECORD,,