sitebay-mcp 0.1.1751180311__py3-none-any.whl → 0.1.1751196041__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 +2 -2
- sitebay_mcp/resources.py +1 -1
- sitebay_mcp/server.py +7 -4
- sitebay_mcp/tools/operations.py +1 -1
- sitebay_mcp/tools/sites.py +18 -3
- {sitebay_mcp-0.1.1751180311.dist-info → sitebay_mcp-0.1.1751196041.dist-info}/METADATA +1 -1
- sitebay_mcp-0.1.1751196041.dist-info/RECORD +14 -0
- sitebay_mcp-0.1.1751180311.dist-info/RECORD +0 -14
- {sitebay_mcp-0.1.1751180311.dist-info → sitebay_mcp-0.1.1751196041.dist-info}/WHEEL +0 -0
- {sitebay_mcp-0.1.1751180311.dist-info → sitebay_mcp-0.1.1751196041.dist-info}/entry_points.txt +0 -0
- {sitebay_mcp-0.1.1751180311.dist-info → sitebay_mcp-0.1.1751196041.dist-info}/licenses/LICENSE +0 -0
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
|
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
|
@@ -69,6 +69,9 @@ async def sitebay_list_sites(ctx: Context, team_id: Optional[str] = None) -> str
|
|
69
69
|
except SiteBayError as e:
|
70
70
|
await ctx.error(f"SiteBay API error: {str(e)}")
|
71
71
|
return f"❌ SiteBay Error: {str(e)}"
|
72
|
+
except ValueError as e:
|
73
|
+
await ctx.error(f"Validation error listing sites: {str(e)}")
|
74
|
+
return f"❌ Validation Error: {str(e)}"
|
72
75
|
except Exception as e:
|
73
76
|
await ctx.error(f"Unexpected error listing sites: {str(e)}")
|
74
77
|
return f"❌ Unexpected error: {str(e)}"
|
@@ -451,7 +454,7 @@ async def sitebay_wordpress_proxy(
|
|
451
454
|
await ctx.info(f"WordPress proxy request to {site_fqdn}{endpoint}")
|
452
455
|
|
453
456
|
client = await initialize_client()
|
454
|
-
proxy_data = {
|
457
|
+
proxy_data: dict[str, Any] = {
|
455
458
|
"site_fqdn": site_fqdn,
|
456
459
|
"endpoint": endpoint,
|
457
460
|
"method": method
|
@@ -496,7 +499,7 @@ async def sitebay_shopify_proxy(
|
|
496
499
|
await ctx.info(f"Shopify proxy request to {shop_domain}{endpoint}")
|
497
500
|
|
498
501
|
client = await initialize_client()
|
499
|
-
proxy_data = {
|
502
|
+
proxy_data: dict[str, Any] = {
|
500
503
|
"shop_domain": shop_domain,
|
501
504
|
"endpoint": endpoint,
|
502
505
|
"access_token": access_token,
|
@@ -538,7 +541,7 @@ async def sitebay_posthog_proxy(
|
|
538
541
|
await ctx.info(f"PostHog proxy request to {endpoint}")
|
539
542
|
|
540
543
|
client = await initialize_client()
|
541
|
-
proxy_data = {
|
544
|
+
proxy_data: dict[str, Any] = {
|
542
545
|
"endpoint": endpoint,
|
543
546
|
"data": data
|
544
547
|
}
|
sitebay_mcp/tools/operations.py
CHANGED
@@ -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
|
|
sitebay_mcp/tools/sites.py
CHANGED
@@ -3,8 +3,8 @@ Site management tools for SiteBay MCP Server
|
|
3
3
|
"""
|
4
4
|
|
5
5
|
from typing import Optional, Dict, Any, List
|
6
|
-
from
|
7
|
-
from
|
6
|
+
from sitebay_mcp.client import SiteBayClient
|
7
|
+
from sitebay_mcp.exceptions import SiteBayError
|
8
8
|
|
9
9
|
|
10
10
|
async def sitebay_list_sites(
|
@@ -21,7 +21,17 @@ async def sitebay_list_sites(
|
|
21
21
|
Formatted string with site details
|
22
22
|
"""
|
23
23
|
try:
|
24
|
+
if team_id is not None and not isinstance(team_id, str):
|
25
|
+
msg = "team_id must be a string if provided"
|
26
|
+
raise ValueError(msg)
|
27
|
+
|
24
28
|
sites = await client.list_sites(team_id=team_id)
|
29
|
+
|
30
|
+
if isinstance(sites, str):
|
31
|
+
return f"Error listing sites: {sites}"
|
32
|
+
|
33
|
+
if not isinstance(sites, list) or not all(isinstance(s, dict) for s in sites):
|
34
|
+
return f"Unexpected response format when listing sites: {sites}"
|
25
35
|
|
26
36
|
if not sites:
|
27
37
|
return "No sites found for your account."
|
@@ -43,6 +53,8 @@ async def sitebay_list_sites(
|
|
43
53
|
|
44
54
|
except SiteBayError as e:
|
45
55
|
return f"Error listing sites: {str(e)}"
|
56
|
+
except ValueError as e:
|
57
|
+
return f"Error listing sites: {str(e)}"
|
46
58
|
|
47
59
|
|
48
60
|
async def sitebay_get_site(
|
@@ -242,7 +254,10 @@ async def sitebay_delete_site(
|
|
242
254
|
try:
|
243
255
|
await client.delete_site(fqdn)
|
244
256
|
|
245
|
-
return
|
257
|
+
return (
|
258
|
+
"✅ **Site Deleted Successfully**\n\n"
|
259
|
+
f"The site {fqdn} has been permanently deleted."
|
260
|
+
)
|
246
261
|
|
247
262
|
except SiteBayError as e:
|
248
263
|
return f"Error deleting site: {str(e)}"
|
@@ -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=95oR1EQ8h1F42qdDPcpYwjuVKKMY7yy7yqa3LxO_T0E,14623
|
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.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,,
|
@@ -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=ssMCobCxWb-KQLPVvVORlAW0NFlDd9LzIbzXTuspL0I,28122
|
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=R6SlMr9qdtWnYZ2F0FhoX2cmm-KIS7I1wmCWWjWFMsU,8345
|
10
|
-
sitebay_mcp-0.1.1751180311.dist-info/METADATA,sha256=YIMyUXuEdRJ3_XrFqakHo5OTFRrUmvbK4p2CP7r-k0A,8161
|
11
|
-
sitebay_mcp-0.1.1751180311.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
|
12
|
-
sitebay_mcp-0.1.1751180311.dist-info/entry_points.txt,sha256=kOW3HHmOw1mAqzbDliyWzaHwS-tAwISRFdQHBa9QvRc,56
|
13
|
-
sitebay_mcp-0.1.1751180311.dist-info/licenses/LICENSE,sha256=PjkyMZfBImLXpO5eKb_sI__W1JMf1jL51n1O7H4a1I0,1062
|
14
|
-
sitebay_mcp-0.1.1751180311.dist-info/RECORD,,
|
File without changes
|
{sitebay_mcp-0.1.1751180311.dist-info → sitebay_mcp-0.1.1751196041.dist-info}/entry_points.txt
RENAMED
File without changes
|
{sitebay_mcp-0.1.1751180311.dist-info → sitebay_mcp-0.1.1751196041.dist-info}/licenses/LICENSE
RENAMED
File without changes
|