@awesomate/hosting-mcp 0.9.0 → 0.11.0
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.
- package/dist/index.js +27 -13
- package/package.json +1 -1
- package/skill/awesomate-app-builder/SKILL.md +10 -1
- package/skill/awesomate-app-builder/references/security-checklist.md +57 -0
- package/skill/awesomate-app-builder/references/stack-decision.md +1 -1
- package/skill/awesomate-app-builder/references/wp-migrate.md +60 -0
- package/skill/awesomate-hosting/SKILL.md +10 -7
package/dist/index.js
CHANGED
|
@@ -40108,25 +40108,39 @@ readTool(
|
|
|
40108
40108
|
);
|
|
40109
40109
|
readTool(
|
|
40110
40110
|
"awesomate_get_limits",
|
|
40111
|
-
"Usage vs plan limits across every dimension (sites, custom domains, workflow credits, AI-editor credits) plus a nudges[] array. Call BEFORE any create action; when a nudge has severity 'approaching' or 'exceeded', surface it to the user with the recommended plan \u2014 never execute an upgrade without preview + explicit confirmation (upgrade tools ship in a later release; for now deep-link to the hub billing page).",
|
|
40111
|
+
"Usage vs plan limits across every dimension (sites, custom domains, apps, database provisions today, workflow credits, AI-editor credits) plus a nudges[] array. Call BEFORE any create action; when a nudge has severity 'approaching' or 'exceeded', surface it to the user with the recommended plan \u2014 never execute an upgrade without preview + explicit confirmation (upgrade tools ship in a later release; for now deep-link to the hub billing page). pgProvisionsToday is a flat daily cap that resets within 24h \u2014 no plan raises it, so don't pitch an upgrade for it.",
|
|
40112
40112
|
"/api/client-hosting/limits"
|
|
40113
40113
|
);
|
|
40114
|
+
var PLAN_LADDER_FALLBACK = {
|
|
40115
|
+
note: "Live per-account limits come from awesomate_get_limits \u2014 this is the plan ladder reference (static fallback).",
|
|
40116
|
+
plans: [
|
|
40117
|
+
{ name: "Essentials", purchasable: false, monthlyPriceUsd: 75, maxSites: 1, maxCustomDomains: 0, maxApps: 0, cpanelAccess: true, shellAccess: false, appBuilder: false },
|
|
40118
|
+
{ name: "Support Plus", purchasable: true, monthlyPriceUsd: 175, maxSites: 2, maxCustomDomains: 3, maxApps: 5, cpanelAccess: true, shellAccess: true, appBuilder: true },
|
|
40119
|
+
{ name: "Pro", purchasable: true, monthlyPriceUsd: 375, maxSites: 10, maxCustomDomains: 10, maxApps: 20, cpanelAccess: true, shellAccess: true, appBuilder: true },
|
|
40120
|
+
{ name: "Embedded", purchasable: false, monthlyPriceUsd: null, maxSites: 100, maxCustomDomains: 100, maxApps: 100, cpanelAccess: true, shellAccess: true, appBuilder: true, note: "Not generally available yet" }
|
|
40121
|
+
],
|
|
40122
|
+
upgradePath: "Essentials \u2192 Support Plus \u2192 Pro \u2192 Embedded; upgrades at hub.awesomate.ai/billing (only Support Plus and Pro are purchasable)"
|
|
40123
|
+
};
|
|
40114
40124
|
server.registerTool(
|
|
40115
40125
|
"awesomate_get_plan_features",
|
|
40116
40126
|
{
|
|
40117
|
-
description: "
|
|
40127
|
+
description: "The Awesomate plan ladder: what each plan includes for hosting (WordPress sites, custom domains, hosted apps, cPanel, shell/Claude Code access) and which plans are purchasable. Fetched live from the hub (single source of truth) with a static fallback. Use to explain what an upgrade unlocks; live per-account usage comes from awesomate_get_limits.",
|
|
40118
40128
|
inputSchema: {}
|
|
40119
40129
|
},
|
|
40120
|
-
async () =>
|
|
40121
|
-
|
|
40122
|
-
|
|
40123
|
-
|
|
40124
|
-
|
|
40125
|
-
|
|
40126
|
-
|
|
40127
|
-
|
|
40128
|
-
|
|
40129
|
-
|
|
40130
|
+
async () => {
|
|
40131
|
+
try {
|
|
40132
|
+
const live = await hubGet(requireConfig(), "/api/client-hosting/plan-ladder");
|
|
40133
|
+
if (Array.isArray(live?.plans) && live.plans.length > 0) {
|
|
40134
|
+
return textResult({
|
|
40135
|
+
note: "Live plan ladder from the hub. Per-account usage comes from awesomate_get_limits.",
|
|
40136
|
+
...live,
|
|
40137
|
+
upgradePath: PLAN_LADDER_FALLBACK.upgradePath
|
|
40138
|
+
});
|
|
40139
|
+
}
|
|
40140
|
+
} catch {
|
|
40141
|
+
}
|
|
40142
|
+
return textResult(PLAN_LADDER_FALLBACK);
|
|
40143
|
+
}
|
|
40130
40144
|
);
|
|
40131
40145
|
server.registerTool(
|
|
40132
40146
|
"awesomate_snapshot_site",
|
|
@@ -40207,7 +40221,7 @@ server.registerTool(
|
|
|
40207
40221
|
server.registerTool(
|
|
40208
40222
|
"awesomate_app_create",
|
|
40209
40223
|
{
|
|
40210
|
-
description: "Provision a new app on the client's cPanel account. Choose the stack deliberately (see the awesomate-app-builder skill): kind 'static' = a single fast landing/lead page served straight from the docroot (no DB, no server process \u2014 pick this for brochure/landing/lead-capture); kind 'node' = a dynamic app with a backend + database (logins, custom logic, an API). Pick the template by job \u2014 'node-auth-sync' (user accounts/logins, MySQL), 'node-crud-postgres' (structured data without logins: trackers/dashboards \u2014 ready-made CRUD + UI, Postgres), 'node-api-only' (webhooks/integrations/glue, no DB wiring), 'static-landing' (marketing/lead page). If dbEngine is omitted the template's native engine is used (node-crud-postgres \u2192 postgres). Returns 202 immediately with an appId + subdomain(s); poll awesomate_app_get until status=active, then fetch the starter files with awesomate_app_scaffold. Requires apps:write (Support Plus+) \u2014 a 403 means offer an upgrade. Get the user's confirmation on the stack + name before calling.",
|
|
40224
|
+
description: "Provision a new app on the client's cPanel account. Choose the stack deliberately (see the awesomate-app-builder skill): kind 'static' = a single fast landing/lead page served straight from the docroot (no DB, no server process \u2014 pick this for brochure/landing/lead-capture); kind 'node' = a dynamic app with a backend + database (logins, custom logic, an API). Pick the template by job \u2014 'node-auth-sync' (user accounts/logins, MySQL), 'node-crud-postgres' (structured data without logins: trackers/dashboards \u2014 ready-made CRUD + UI, Postgres), 'node-api-only' (webhooks/integrations/glue, no DB wiring), 'static-landing' (marketing/lead page). If dbEngine is omitted the template's native engine is used (node-crud-postgres \u2192 postgres). Returns 202 immediately with an appId + subdomain(s); poll awesomate_app_get until status=active, then fetch the starter files with awesomate_app_scaffold. Requires apps:write (Support Plus+) \u2014 a 403 means offer an upgrade. Plans also cap the NUMBER of apps (Support Plus 5, Pro 20 \u2014 check awesomate_get_limits.dimensions.apps first): a 409 with code 'app_limit' means the cap is reached \u2014 do NOT retry; tell the user their allowance is full and surface the recommendedPlan/deepLink from the error. Get the user's confirmation on the stack + name before calling.",
|
|
40211
40225
|
inputSchema: {
|
|
40212
40226
|
appSlug: external_exports.string().regex(/^[a-z][a-z0-9]{1,15}$/).describe("2-16 chars, starts with a letter, lowercase alphanumeric \u2014 used for subdomains + db names"),
|
|
40213
40227
|
kind: external_exports.enum(["node", "static"]).default("node").describe("'static' for a landing/lead page (no DB); 'node' for a dynamic app"),
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@awesomate/hosting-mcp",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.11.0",
|
|
4
4
|
"description": "Awesomate MCP server — lets Claude manage your Awesomate WordPress hosting, plan, limits, n8n automations, and build Node/static apps + databases",
|
|
5
5
|
"license": "UNLICENSED",
|
|
6
6
|
"type": "module",
|
|
@@ -95,7 +95,12 @@ target; never touch prod without an explicit ask.**
|
|
|
95
95
|
user the live dev URL and let them try it. Iterate on dev until they're happy.
|
|
96
96
|
7. **Wrap-up / promote** — only when the user approves, promote **dev → staging
|
|
97
97
|
→ main** (merge + push per branch). `awesomate_app_deploy` reports the
|
|
98
|
-
branch→env map + last-deploy state. Prod is `main`.
|
|
98
|
+
branch→env map + last-deploy state. Prod is `main`. **Before merging to
|
|
99
|
+
main**, walk [references/security-checklist.md](references/security-checklist.md)
|
|
100
|
+
— the deploy workflow's automated gate blocks prod on high-severity
|
|
101
|
+
findings (secrets, injectable SQL, eval…), and the checklist covers what
|
|
102
|
+
a scanner can't (authorization, webhook secrets, data minimization).
|
|
103
|
+
Never remove the gate step to make a deploy pass — fix the finding.
|
|
99
104
|
|
|
100
105
|
**Promote / rollback (git-based):** promoting is merging the tested branch
|
|
101
106
|
forward (`dev`→`staging`→`main`); rolling back is `git revert` of the bad
|
|
@@ -110,6 +115,10 @@ files directly (no build step).
|
|
|
110
115
|
- Confirm the stack + name before `awesomate_app_create`. Default the target
|
|
111
116
|
to **dev**; never push to prod without an explicit ask.
|
|
112
117
|
- A `403` on a write = plan gate (Support Plus+). Offer an upgrade, don't retry.
|
|
118
|
+
- A `409` with code `app_limit` = the plan's app allowance is full (Support
|
|
119
|
+
Plus 5, Pro 20 — `awesomate_app_context.limits` has the live numbers).
|
|
120
|
+
Don't retry; tell the user and surface the `recommendedPlan`/`deepLink`
|
|
121
|
+
from the error. Deleting an unused app also frees a slot.
|
|
113
122
|
- Never invent that a capability exists — read `awesomate_app_context` first.
|
|
114
123
|
- Never print a secret or commit a `.env` (the credentials + github skills
|
|
115
124
|
enforce this).
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
# Security checklist — walk this before promoting to prod
|
|
2
|
+
|
|
3
|
+
Two layers guard prod. The **automated gate** runs in every app's deploy
|
|
4
|
+
workflow (`scripts/security-check.mjs` — report-only on dev/staging,
|
|
5
|
+
BLOCKING on `main`, plus `npm audit --audit-level=critical`). This checklist
|
|
6
|
+
is the **human layer**: the things a scanner cannot see. Walk it with the
|
|
7
|
+
user in plain language before merging staging → main.
|
|
8
|
+
|
|
9
|
+
## What the automated gate already catches (don't re-litigate)
|
|
10
|
+
|
|
11
|
+
Committed secrets / a tracked `.env` / private keys · SQL built by
|
|
12
|
+
interpolation or concatenation · `eval` / `new Function` · shell exec with
|
|
13
|
+
interpolated input · critical dependency advisories. If the prod deploy
|
|
14
|
+
fails on the gate, read the Actions log — every finding prints its fix.
|
|
15
|
+
**Never remove or bypass the gate step to make a deploy pass.**
|
|
16
|
+
|
|
17
|
+
## The human checks (scanner-blind spots)
|
|
18
|
+
|
|
19
|
+
1. **Authorization, not just authentication.** Logged-in is not allowed.
|
|
20
|
+
For every route that reads/writes data: could user A pass user B's id and
|
|
21
|
+
touch B's data? Filter by the session's user id server-side, never trust
|
|
22
|
+
an id from the request body.
|
|
23
|
+
2. **Every input validated at the edge.** Each POST/PATCH handler starts
|
|
24
|
+
with a zod `safeParse`, with sane max lengths. No handler touches
|
|
25
|
+
`await c.req.json()` raw.
|
|
26
|
+
3. **Secrets flow one way.** Values live in env vars (set via
|
|
27
|
+
`awesomate_app_set_env`), are never logged, never echoed in responses,
|
|
28
|
+
never sent to the browser.
|
|
29
|
+
4. **Rendering is escape-safe.** Browser code uses `textContent` /
|
|
30
|
+
`createElement` for user data; server HTML never string-interpolates
|
|
31
|
+
user input without escaping.
|
|
32
|
+
5. **The n8n webhook is not world-callable.** If n8n is attached, the
|
|
33
|
+
workflow checks the `X-Awesomate-Webhook-Secret` header (set during
|
|
34
|
+
attach). Test: call the webhook without the header — it must refuse.
|
|
35
|
+
6. **Public API surface is intentional.** api-only starter: is `API_KEY`
|
|
36
|
+
set for prod, or is a public API genuinely intended? CORS open on
|
|
37
|
+
purpose?
|
|
38
|
+
7. **Sensitive data is minimized.** Only collect what the app needs; if it
|
|
39
|
+
stores personal data, tell the user plainly: connections are TLS and
|
|
40
|
+
secrets are encrypted, but the DATABASE is not blanket-encrypted at
|
|
41
|
+
rest — sensitive fields deserve app-level encryption (ask before adding).
|
|
42
|
+
8. **Errors don't leak.** 500 responses return a generic message, not stack
|
|
43
|
+
traces or SQL (the starters already do this — keep it).
|
|
44
|
+
|
|
45
|
+
## Static sites
|
|
46
|
+
|
|
47
|
+
No server code, so the gate doesn't run — the risks are the lead form's
|
|
48
|
+
webhook (point 5) and third-party scripts (don't add any that aren't
|
|
49
|
+
needed). Never put an API key in page JavaScript: anything in a static page
|
|
50
|
+
is public.
|
|
51
|
+
|
|
52
|
+
## How to talk about it
|
|
53
|
+
|
|
54
|
+
Non-technical user — say what you checked, not the jargon: *"Before making
|
|
55
|
+
it live I checked that people can only see their own data, that the contact
|
|
56
|
+
form can't be abused, and that your API key never appears anywhere public.
|
|
57
|
+
The deploy pipeline also scans every release automatically."*
|
|
@@ -8,7 +8,7 @@ confirm before building. **Never default to WordPress.**
|
|
|
8
8
|
|
|
9
9
|
| What the user is really trying to do | Stack | Why / how |
|
|
10
10
|
|---|---|---|
|
|
11
|
-
| "I already have a WordPress site" / a blog / publishes content regularly / **wants to rank on Google & AI** | **WordPress** | Best CMS for indexable content, sitemaps, schema. Hand to the awesomate-hosting skill to provision, then run **awesomate-seo**. |
|
|
11
|
+
| "I already have a WordPress site" / a blog / publishes content regularly / **wants to rank on Google & AI** | **WordPress** | Best CMS for indexable content, sitemaps, schema. Hand to the awesomate-hosting skill to provision, then run **awesomate-seo**. Existing WP elsewhere → migrate it, don't rebuild: [wp-migrate.md](wp-migrate.md) (also covers WP ↔ app coexistence on subdomains). |
|
|
12
12
|
| Sell products / online shop | **WordPress + WooCommerce** | Reuse the `woo-agent-storefront` (AI-shopping feeds + `llms.txt`) and `woo-catalog-perfection` skills. |
|
|
13
13
|
| A landing page / capture leads / a one-pager / "just needs to look good and be found" | **static site** (`kind: 'static'`) | Served straight from the cPanel docroot — no database, no server process, fastest load. Add SEO + a lead form (below). The right default for marketing pages. |
|
|
14
14
|
| A tool/app with **logins, custom logic, a dashboard, or an API** | **Node app** (`kind: 'node'`) | A real backend + database. |
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
# Moving an existing WordPress site to Awesomate (and WP ↔ app coexistence)
|
|
2
|
+
|
|
3
|
+
When the stack decision lands on WordPress **and the user already has a WP
|
|
4
|
+
site elsewhere**, don't rebuild it — migrate it. Plain-language framing:
|
|
5
|
+
*"We'll make an exact copy of your current site on your Awesomate hosting,
|
|
6
|
+
check it works, then point your domain at it. Your old site stays untouched
|
|
7
|
+
until you're happy."*
|
|
8
|
+
|
|
9
|
+
## The migration path
|
|
10
|
+
|
|
11
|
+
1. **Provision WP on Awesomate first** — the awesomate-hosting skill's
|
|
12
|
+
normal WP install (their plan's site limit applies; check
|
|
13
|
+
`awesomate_get_limits`). This gives a working target with SSL.
|
|
14
|
+
2. **Export from the old host.** Preference order:
|
|
15
|
+
- **A full-copy plugin** (Duplicator / All-in-One WP Migration): the user
|
|
16
|
+
installs it on their OLD site and downloads the archive — the only step
|
|
17
|
+
that happens outside Awesomate, so give them click-by-click guidance.
|
|
18
|
+
- **Host export**: many hosts offer a backup download (files + a `.sql`).
|
|
19
|
+
- **WP admin export (XML)**: last resort — content only (posts/pages/
|
|
20
|
+
media), loses theme/plugins/settings; expect to reassemble the look.
|
|
21
|
+
3. **Import on Awesomate.** With shell access (Support Plus+) prefer
|
|
22
|
+
`wp-cli` over the target install: unpack files into the docroot, import
|
|
23
|
+
the DB, then `wp search-replace 'https://old-domain.com'
|
|
24
|
+
'https://new-domain.com' --all-tables` (serialized-data-safe — never do
|
|
25
|
+
this with raw SQL). Plugin archives restore through the same plugin
|
|
26
|
+
installed on the new site.
|
|
27
|
+
4. **Verify before DNS.** Browse the copy on its Awesomate URL: pages,
|
|
28
|
+
images, forms, admin login, HTTPS. Run **awesomate-seo** (sitemap,
|
|
29
|
+
robots, meta) and offer the **wp-security-review** skill — a migrated
|
|
30
|
+
site imports its old plugins, and stale plugins are the top WP risk.
|
|
31
|
+
5. **Cut over DNS** — point the domain at Awesomate (add it as a custom
|
|
32
|
+
domain first; plan limits apply). Old site stays live as the fallback
|
|
33
|
+
until the user confirms; propagation can take up to a day and both
|
|
34
|
+
copies serve during it (avoid content edits that day).
|
|
35
|
+
6. **After cutover:** confirm SSL issued for the domain, re-run the SEO
|
|
36
|
+
check on the final URL, and remind them to cancel the old hosting only
|
|
37
|
+
once everything's verified.
|
|
38
|
+
|
|
39
|
+
## WP ↔ app coexistence (they want both)
|
|
40
|
+
|
|
41
|
+
The platform already separates them cleanly — **WordPress owns the main
|
|
42
|
+
domain; every app lives on its own subdomain** (`app.domain.com`,
|
|
43
|
+
`dev-app.domain.com`, …). No conflict: Apache routes the main site to WP's
|
|
44
|
+
docroot and each subdomain to its app.
|
|
45
|
+
|
|
46
|
+
- Marketing/blog/shop stays in WP; the tool their customers log into is the
|
|
47
|
+
Node app on a subdomain. Link between them with plain links.
|
|
48
|
+
- Don't try to serve an app *under a WP path* (`domain.com/app`) — that
|
|
49
|
+
fights WP's rewrites. A subdomain is the supported shape.
|
|
50
|
+
- Shared look: reuse the WP site's colors/logo in the app's UI rather than
|
|
51
|
+
loading WP themes into the app.
|
|
52
|
+
- Shared backend jobs (a form on either side emailing/CRM-ing): both can
|
|
53
|
+
call the same n8n webhook — one workflow, two callers.
|
|
54
|
+
|
|
55
|
+
## When NOT to migrate
|
|
56
|
+
|
|
57
|
+
If the old "WP site" is really one landing page and they don't blog or
|
|
58
|
+
sell: recommend rebuilding it as a **static site** on Awesomate instead
|
|
59
|
+
(faster, nothing to update) — see stack-decision.md. Migration is for sites
|
|
60
|
+
with real content, plugins, or a shop.
|
|
@@ -148,15 +148,18 @@ natural break so the richer MCP integration loads.
|
|
|
148
148
|
|
|
149
149
|
## 1. The plan model (so your nudges are accurate)
|
|
150
150
|
|
|
151
|
-
| Plan | WP sites | Custom domains | Shell / Claude Code | Notes |
|
|
152
|
-
|
|
153
|
-
| **Essentials** | 1 | 0 | **No** | read/status + upgrade nudges only |
|
|
154
|
-
| **Support Plus** |
|
|
155
|
-
| **Pro** |
|
|
156
|
-
| **Embedded** |
|
|
151
|
+
| Plan | WP sites | Hosted apps | Custom domains | Shell / Claude Code | Notes |
|
|
152
|
+
|---|---|---|---|---|---|
|
|
153
|
+
| **Essentials** | 1 | 0 | 0 | **No** | read/status + upgrade nudges only |
|
|
154
|
+
| **Support Plus** | 2 | 5 | 3 | **Yes** | shell, WP-CLI, snapshot/rollback, deploy, app builder |
|
|
155
|
+
| **Pro** | 10 | 20 | 10 | **Yes** | + higher limits |
|
|
156
|
+
| **Embedded** | 100 | 100 | 100 | **Yes** | agency tier, not generally available |
|
|
157
157
|
|
|
158
158
|
Authoritative limits are always what `awesomate_get_limits` returns for THIS
|
|
159
|
-
account
|
|
159
|
+
account (and `awesomate_get_plan_features` fetches the live ladder from the
|
|
160
|
+
hub) — never quote the table above as fact; use it only to explain upgrades.
|
|
161
|
+
App creation past the cap returns a 409 with code `app_limit` — don't retry;
|
|
162
|
+
surface the recommended plan instead.
|
|
160
163
|
|
|
161
164
|
## 2. Branch by capability
|
|
162
165
|
|