sitebay-mcp 0.1.1757492007__tar.gz → 0.1.1757498234__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 (27) hide show
  1. sitebay_mcp-0.1.1757498234/Dockerfile +15 -0
  2. {sitebay_mcp-0.1.1757492007 → sitebay_mcp-0.1.1757498234}/PKG-INFO +6 -6
  3. {sitebay_mcp-0.1.1757492007 → sitebay_mcp-0.1.1757498234}/README.md +5 -5
  4. {sitebay_mcp-0.1.1757492007 → sitebay_mcp-0.1.1757498234}/pyproject.toml +1 -1
  5. {sitebay_mcp-0.1.1757492007 → sitebay_mcp-0.1.1757498234}/src/sitebay_mcp/client.py +1 -1
  6. {sitebay_mcp-0.1.1757492007 → sitebay_mcp-0.1.1757498234}/src/sitebay_mcp/resources.py +19 -28
  7. {sitebay_mcp-0.1.1757492007 → sitebay_mcp-0.1.1757498234}/src/sitebay_mcp/server.py +19 -26
  8. {sitebay_mcp-0.1.1757492007 → sitebay_mcp-0.1.1757498234}/src/sitebay_mcp/tools/operations.py +0 -23
  9. {sitebay_mcp-0.1.1757492007 → sitebay_mcp-0.1.1757498234}/src/sitebay_mcp/tools/sites.py +10 -22
  10. sitebay_mcp-0.1.1757492007/Dockerfile +0 -8
  11. {sitebay_mcp-0.1.1757492007 → sitebay_mcp-0.1.1757498234}/.flake8 +0 -0
  12. {sitebay_mcp-0.1.1757492007 → sitebay_mcp-0.1.1757498234}/.github/workflows/python-pytest.yml +0 -0
  13. {sitebay_mcp-0.1.1757492007 → sitebay_mcp-0.1.1757498234}/.github/workflows/testpypi.yaml +0 -0
  14. {sitebay_mcp-0.1.1757492007 → sitebay_mcp-0.1.1757498234}/.gitignore +0 -0
  15. {sitebay_mcp-0.1.1757492007 → sitebay_mcp-0.1.1757498234}/LICENSE +0 -0
  16. {sitebay_mcp-0.1.1757492007 → sitebay_mcp-0.1.1757498234}/example-config.json +0 -0
  17. {sitebay_mcp-0.1.1757492007 → sitebay_mcp-0.1.1757498234}/schema.json +0 -0
  18. {sitebay_mcp-0.1.1757492007 → sitebay_mcp-0.1.1757498234}/smithery.http.yaml.example +0 -0
  19. {sitebay_mcp-0.1.1757492007 → sitebay_mcp-0.1.1757498234}/smithery.yaml +0 -0
  20. {sitebay_mcp-0.1.1757492007 → sitebay_mcp-0.1.1757498234}/src/sitebay_mcp/__init__.py +0 -0
  21. {sitebay_mcp-0.1.1757492007 → sitebay_mcp-0.1.1757498234}/src/sitebay_mcp/auth.py +0 -0
  22. {sitebay_mcp-0.1.1757492007 → sitebay_mcp-0.1.1757498234}/src/sitebay_mcp/exceptions.py +0 -0
  23. {sitebay_mcp-0.1.1757492007 → sitebay_mcp-0.1.1757498234}/src/sitebay_mcp/tools/__init__.py +0 -0
  24. {sitebay_mcp-0.1.1757492007 → sitebay_mcp-0.1.1757498234}/tests/unit/__init__.py +0 -0
  25. {sitebay_mcp-0.1.1757492007 → sitebay_mcp-0.1.1757498234}/tests/unit/test_auth.py +0 -0
  26. {sitebay_mcp-0.1.1757492007 → sitebay_mcp-0.1.1757498234}/tests/unit/test_client.py +0 -0
  27. {sitebay_mcp-0.1.1757492007 → sitebay_mcp-0.1.1757498234}/uv.lock +0 -0
@@ -0,0 +1,15 @@
1
+ # Generated by https://smithery.ai. See: https://smithery.ai/docs/build/project-config
2
+ FROM python:3.10-slim
3
+
4
+ ENV PYTHONUNBUFFERED=1 \
5
+ PIP_DISABLE_PIP_VERSION_CHECK=1
6
+
7
+ WORKDIR /app
8
+ COPY . /app
9
+
10
+ # Upgrade pip and ensure build backend is available before installing the package
11
+ RUN pip install --no-cache-dir --upgrade pip && \
12
+ pip install --no-cache-dir hatchling && \
13
+ pip install --no-cache-dir .
14
+
15
+ CMD ["sitebay-mcp"]
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: sitebay-mcp
3
- Version: 0.1.1757492007
3
+ Version: 0.1.1757498234
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
@@ -26,15 +26,15 @@ A Model Context Protocol (MCP) server that provides Claude Code users with direc
26
26
 
27
27
  ### 🌐 Site Management
28
28
  - List all your hosted WordPress sites
29
- - Get detailed site information (status, region, PHP version, etc.)
29
+ - Get detailed site information (active, HTTP auth, plan)
30
30
  - Create new WordPress sites using SiteBay's ready-made sites
31
- - Update site configurations (PHP version, admin credentials, etc.)
31
+ - Update site settings (Cloudflare dev mode, domain, HTTP auth, Git URL)
32
32
  - Delete sites
33
33
 
34
34
  ### ⚡ Site Operations
35
35
  - Execute shell commands and WP-CLI commands on SiteBay servers
36
36
  - Edit files in wp-content directory on your hosted sites
37
- - View site events and deployment logs from SiteBay infrastructure
37
+
38
38
 
39
39
 
40
40
  ### 🛠 Advanced Features
@@ -65,6 +65,7 @@ uvx sitebay-mcp
65
65
  # Or install for repeated use
66
66
  uv tool install sitebay-mcp
67
67
  sitebay-mcp
68
+ ```
68
69
 
69
70
  ## HTTP Transport (Recommended for hosted deployments)
70
71
 
@@ -96,9 +97,8 @@ Add a server URL entry instead of a command:
96
97
  "SITEBAY_API_TOKEN": "your_api_token_here"
97
98
  }
98
99
  }
99
- }
100
100
  }
101
- ```
101
+ }
102
102
  ```
103
103
 
104
104
  ### Using pip
@@ -7,15 +7,15 @@ A Model Context Protocol (MCP) server that provides Claude Code users with direc
7
7
 
8
8
  ### 🌐 Site Management
9
9
  - List all your hosted WordPress sites
10
- - Get detailed site information (status, region, PHP version, etc.)
10
+ - Get detailed site information (active, HTTP auth, plan)
11
11
  - Create new WordPress sites using SiteBay's ready-made sites
12
- - Update site configurations (PHP version, admin credentials, etc.)
12
+ - Update site settings (Cloudflare dev mode, domain, HTTP auth, Git URL)
13
13
  - Delete sites
14
14
 
15
15
  ### ⚡ Site Operations
16
16
  - Execute shell commands and WP-CLI commands on SiteBay servers
17
17
  - Edit files in wp-content directory on your hosted sites
18
- - View site events and deployment logs from SiteBay infrastructure
18
+
19
19
 
20
20
 
21
21
  ### 🛠 Advanced Features
@@ -46,6 +46,7 @@ uvx sitebay-mcp
46
46
  # Or install for repeated use
47
47
  uv tool install sitebay-mcp
48
48
  sitebay-mcp
49
+ ```
49
50
 
50
51
  ## HTTP Transport (Recommended for hosted deployments)
51
52
 
@@ -77,9 +78,8 @@ Add a server URL entry instead of a command:
77
78
  "SITEBAY_API_TOKEN": "your_api_token_here"
78
79
  }
79
80
  }
80
- }
81
81
  }
82
- ```
82
+ }
83
83
  ```
84
84
 
85
85
  ### Using pip
@@ -1,6 +1,6 @@
1
1
  [project]
2
2
  name = "sitebay-mcp"
3
- version = "0.1.1757492007"
3
+ version = "0.1.1757498234"
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"
@@ -302,7 +302,7 @@ class SiteBayClient:
302
302
  # Staging methods removed (no longer supported)
303
303
 
304
304
  # Backup/Restore Methods
305
- async def get_backup_commits(self, fqdn: str, number_to_fetch: int = 10) -> List[Dict[str, Any]]:
305
+ async def get_backup_commits(self, fqdn: str, number_to_fetch: int = 1) -> List[Dict[str, Any]]:
306
306
  """Get backup commits for a site"""
307
307
  params = {"number_to_fetch": number_to_fetch}
308
308
  return await self.get(f"/site/{fqdn}/pit_restore/commits", params=params)
@@ -30,30 +30,18 @@ async def get_site_config_resource(ctx: Context, site_fqdn: str) -> str:
30
30
 
31
31
  site = await client.get_site(site_fqdn)
32
32
 
33
- # Format as readable configuration
33
+ # Format as readable configuration (schema-aligned fields)
34
34
  config = {
35
35
  "site_info": {
36
36
  "domain": site.get("fqdn"),
37
- "title": site.get("wordpress_blog_name") or site.get("wp_title"),
38
- "status": site.get("status"),
39
- "region": site.get("region_name"),
37
+ "active": site.get("active"),
38
+ "team_id": site.get("team_id"),
40
39
  "created": site.get("created_at"),
41
- "updated": site.get("updated_at")
42
- },
43
- "technical_specs": {
44
- "php_version": site.get("php_version"),
45
- "mysql_version": site.get("mysql_version"),
46
- "wordpress_version": site.get("wp_version"),
47
- "git_enabled": site.get("git_enabled", False)
48
- },
49
- "urls": {
50
- "site_url": site.get("site_url"),
51
- "admin_url": site.get("admin_url")
52
40
  },
53
41
  "features": {
54
- "staging_available": bool(site.get("staging_site")),
55
- "git_integration": site.get("git_enabled", False),
56
- "backup_enabled": True # SiteBay always has backups
42
+ "http_auth_enabled": site.get("http_auth_enabled", False),
43
+ "is_free": site.get("is_free", False),
44
+ "git_url": site.get("git_url"),
57
45
  }
58
46
  }
59
47
 
@@ -93,29 +81,32 @@ async def get_account_summary_resource(ctx: Context) -> str:
93
81
  "account_overview": {
94
82
  "total_sites": len(sites),
95
83
  "total_teams": len(teams),
96
- "available_ready_made_sites": len(ready_made_sites)
84
+ "available_ready_made_sites": len(ready_made_sites),
85
+ # Filled below
86
+ "active_sites": 0,
87
+ "inactive_sites": 0,
97
88
  },
98
- "sites_by_status": {},
99
- "sites_by_region": {},
100
89
  "recent_sites": []
101
90
  }
102
91
 
103
92
  # Analyze sites
93
+ active_count = 0
94
+ inactive_count = 0
104
95
  for site in sites:
105
- status = site.get("status", "unknown")
106
- summary["sites_by_status"][status] = summary["sites_by_status"].get(status, 0) + 1
107
-
108
- region = site.get("region_name", "unknown")
109
- summary["sites_by_region"][region] = summary["sites_by_region"].get(region, 0) + 1
96
+ if bool(site.get("active", False)):
97
+ active_count += 1
98
+ else:
99
+ inactive_count += 1
100
+ summary["account_overview"]["active_sites"] = active_count
101
+ summary["account_overview"]["inactive_sites"] = inactive_count
110
102
 
111
103
  # Get 5 most recent sites
112
104
  sorted_sites = sorted(sites, key=lambda x: x.get("created_at", ""), reverse=True)
113
105
  summary["recent_sites"] = [
114
106
  {
115
107
  "domain": site.get("fqdn"),
116
- "status": site.get("status"),
108
+ "active": site.get("active"),
117
109
  "created": site.get("created_at"),
118
- "region": site.get("region_name")
119
110
  }
120
111
  for site in sorted_sites[:5]
121
112
  ]
@@ -361,13 +361,10 @@ async def sitebay_list_teams(ctx: Context) -> str:
361
361
  for team in teams:
362
362
  result += f"• **{team.get('name', 'Unknown')}**\n"
363
363
  result += f" - ID: {team.get('id', 'Unknown')}\n"
364
- result += f" - Role: {team.get('role', 'Unknown')}\n"
365
- result += f" - Created: {team.get('created_at', 'Unknown')}\n"
366
-
367
- if team.get('description'):
368
- result += f" - Description: {team.get('description')}\n"
369
-
370
- result += "\n"
364
+ result += f" - Plan: {team.get('plan_type_name', 'Unknown')}\n"
365
+ result += f" - Active: {team.get('is_active', 'Unknown')}\n"
366
+ result += f" - Default: {team.get('is_default', 'Unknown')}\n"
367
+ result += f" - Created: {team.get('created_at', 'Unknown')}\n\n"
371
368
 
372
369
  await ctx.info("Successfully retrieved teams list")
373
370
  return result
@@ -385,8 +382,8 @@ async def sitebay_list_teams(ctx: Context) -> str:
385
382
  async def sitebay_wordpress_proxy(
386
383
  ctx: Context,
387
384
  fqdn: str,
388
- path: Optional[str] = None,
389
- query_params_json: Optional[str] = None,
385
+ path: str = "/wp-json/wp/v2/",
386
+ query_params_json: str = "",
390
387
  method: str = "get",
391
388
  ) -> str:
392
389
  """
@@ -405,10 +402,8 @@ async def sitebay_wordpress_proxy(
405
402
  await ctx.info(f"WordPress proxy request to {fqdn}{path or ''}")
406
403
 
407
404
  client = await initialize_client()
408
- proxy_data: dict[str, Any] = {"fqdn": fqdn, "method": method}
409
- if path is not None:
410
- proxy_data["path"] = path
411
- if query_params_json is not None:
405
+ proxy_data: dict[str, Any] = {"fqdn": fqdn, "method": method, "path": path}
406
+ if query_params_json:
412
407
  proxy_data["query_params_json"] = query_params_json
413
408
 
414
409
  result = await client.wordpress_proxy(proxy_data)
@@ -426,8 +421,8 @@ async def sitebay_wordpress_proxy(
426
421
  async def sitebay_shopify_proxy(
427
422
  ctx: Context,
428
423
  shop_name: str,
429
- path: Optional[str] = None,
430
- query_params_json: Optional[str] = None,
424
+ path: str = "/admin/api/2024-04",
425
+ query_params_json: str = "",
431
426
  method: str = "get",
432
427
  ) -> str:
433
428
  """
@@ -446,10 +441,8 @@ async def sitebay_shopify_proxy(
446
441
  await ctx.info(f"Shopify proxy request to {shop_name}{path or ''}")
447
442
 
448
443
  client = await initialize_client()
449
- proxy_data: dict[str, Any] = {"shop_name": shop_name, "method": method}
450
- if path is not None:
451
- proxy_data["path"] = path
452
- if query_params_json is not None:
444
+ proxy_data: dict[str, Any] = {"shop_name": shop_name, "method": method, "path": path}
445
+ if query_params_json:
453
446
  proxy_data["query_params_json"] = query_params_json
454
447
 
455
448
  result = await client.shopify_proxy(proxy_data)
@@ -467,7 +460,7 @@ async def sitebay_shopify_proxy(
467
460
  async def sitebay_posthog_proxy(
468
461
  ctx: Context,
469
462
  path: str,
470
- query_params_json: Optional[str] = None,
463
+ query_params_json: str = "",
471
464
  method: str = "get",
472
465
  ) -> str:
473
466
  """
@@ -486,7 +479,7 @@ async def sitebay_posthog_proxy(
486
479
 
487
480
  client = await initialize_client()
488
481
  proxy_data: dict[str, Any] = {"path": path, "method": method}
489
- if query_params_json is not None:
482
+ if query_params_json:
490
483
  proxy_data["query_params_json"] = query_params_json
491
484
 
492
485
  result = await client.posthog_proxy(proxy_data)
@@ -508,14 +501,14 @@ async def sitebay_posthog_proxy(
508
501
  async def sitebay_backup_list_commits(
509
502
  ctx: Context,
510
503
  fqdn: str,
511
- number_to_fetch: int = 10
504
+ number_to_fetch: int = 1
512
505
  ) -> str:
513
506
  """
514
507
  List available backup commits for point-in-time restore.
515
508
 
516
509
  Args:
517
510
  fqdn: The site domain
518
- number_to_fetch: Number of backup entries to fetch (default: 10)
511
+ number_to_fetch: Number of backup entries to fetch (default: 1)
519
512
 
520
513
  Returns:
521
514
  List of available backup commits
@@ -634,10 +627,10 @@ async def sitebay_account_affiliates(ctx: Context) -> str:
634
627
  result = f"**Your Affiliate Referrals** ({len(affiliates)} referrals):\n\n"
635
628
 
636
629
  for affiliate in affiliates:
637
- result += f"• **User**: {affiliate.get('email', 'Unknown')}\n"
630
+ result += f"• **Email**: {affiliate.get('email', 'Unknown')}\n"
631
+ result += f" - Name: {affiliate.get('full_name', 'Unknown')}\n"
638
632
  result += f" - Signed up: {affiliate.get('created_at', 'Unknown')}\n"
639
- result += f" - Status: {affiliate.get('status', 'Unknown')}\n"
640
- result += "\n"
633
+ result += f" - Active: {affiliate.get('is_active', 'Unknown')}\n\n"
641
634
 
642
635
  await ctx.info("Successfully retrieved affiliate referrals")
643
636
  return result
@@ -159,29 +159,6 @@ async def sitebay_site_external_path_create(
159
159
  return "External path tools are no longer supported."
160
160
 
161
161
 
162
- async def sitebay_site_external_path_update(
163
- client: SiteBayClient,
164
- fqdn: str,
165
- path_id: str,
166
- path: Optional[str] = None,
167
- target_url: Optional[str] = None,
168
- description: Optional[str] = None
169
- ) -> str:
170
- """
171
- Update an external path configuration.
172
-
173
- Args:
174
- fqdn: The fully qualified domain name of the site
175
- path_id: The ID of the external path to update
176
- path: New path value (optional)
177
- target_url: New target URL (optional)
178
- description: New description (optional)
179
-
180
- Returns:
181
- Update confirmation message
182
- """
183
- return "External path tools are no longer supported."
184
-
185
162
 
186
163
  async def sitebay_site_external_path_delete(
187
164
  client: SiteBayClient,
@@ -40,13 +40,10 @@ async def sitebay_list_sites(
40
40
 
41
41
  for site in sites:
42
42
  result += f"• **{site.get('fqdn', 'Unknown')}**\n"
43
- result += f" - Status: {site.get('status', 'Unknown')}\n"
44
- result += f" - Region: {site.get('region_name', 'Unknown')}\n"
45
- result += f" - WordPress Version: {site.get('wp_version', 'Unknown')}\n"
46
- result += f" - PHP Version: {site.get('php_version', 'Unknown')}\n"
43
+ result += f" - Active: {site.get('active', 'Unknown')}\n"
44
+ result += f" - HTTP Auth Enabled: {site.get('http_auth_enabled', 'Unknown')}\n"
45
+ result += f" - Is Free: {site.get('is_free', 'Unknown')}\n"
47
46
  result += f" - Created: {site.get('created_at', 'Unknown')}\n"
48
- if site.get('staging_site'):
49
- result += f" - Has Staging Site: Yes\n"
50
47
  result += "\n"
51
48
 
52
49
  return result
@@ -74,20 +71,14 @@ async def sitebay_get_site(
74
71
  site = await client.get_site(fqdn)
75
72
 
76
73
  result = f"**Site Details for {fqdn}**\n\n"
77
- result += f"• **Status**: {site.get('status', 'Unknown')}\n"
78
- result += f"• **Region**: {site.get('region_name', 'Unknown')}\n"
79
- result += f"• **WordPress Version**: {site.get('wp_version', 'Unknown')}\n"
80
- result += f"• **PHP Version**: {site.get('php_version', 'Unknown')}\n"
81
- result += f"• **MySQL Version**: {site.get('mysql_version', 'Unknown')}\n"
82
- result += f"• **Site URL**: {site.get('site_url', 'Unknown')}\n"
83
- result += f"• **Admin URL**: {site.get('admin_url', 'Unknown')}\n"
74
+ result += f"• **Active**: {site.get('active', 'Unknown')}\n"
75
+ result += f"• **HTTP Auth Enabled**: {site.get('http_auth_enabled', 'Unknown')}\n"
76
+ result += f"• **Is Free**: {site.get('is_free', 'Unknown')}\n"
77
+ result += f"• **Git URL**: {site.get('git_url', '')}\n"
84
78
  result += f"• **Created**: {site.get('created_at', 'Unknown')}\n"
85
79
  result += f"• **Updated**: {site.get('updated_at', 'Unknown')}\n"
86
80
 
87
- if site.get('staging_site'):
88
- result += f"• **Staging Site**: Available\n"
89
- else:
90
- result += f"• **Staging Site**: Not created\n"
81
+
91
82
 
92
83
  if site.get('git_enabled'):
93
84
  result += f"• **Git Integration**: Enabled\n"
@@ -155,11 +146,8 @@ async def sitebay_create_site(
155
146
 
156
147
  result = f"✅ **Site Created Successfully!**\n\n"
157
148
  result += f"• **Domain**: {site.get('fqdn')}\n"
158
- result += f"• **Status**: {site.get('status')}\n"
159
- if site.get('region_name'):
160
- result += f"• **Region**: {site.get('region_name')}\n"
161
- result += f"• **Site URL**: {site.get('site_url')}\n"
162
- result += f"• **Admin URL**: {site.get('admin_url')}\n"
149
+ result += f"• **Active**: {site.get('active', 'Unknown')}\n"
150
+ result += f"• **HTTP Auth Enabled**: {site.get('http_auth_enabled', 'Unknown')}\n"
163
151
  result += f"• **Admin Username**: {wordpress_username}\n"
164
152
  result += f"• **Admin Email**: {wordpress_email}\n"
165
153
  if git_url:
@@ -1,8 +0,0 @@
1
- # Generated by https://smithery.ai. See: https://smithery.ai/docs/build/project-config
2
- FROM python:3.10-slim
3
-
4
- WORKDIR /app
5
- COPY . /app
6
- RUN pip install --no-cache-dir .
7
-
8
- CMD ["sitebay-mcp"]