@awesomate/hosting-mcp 0.13.0 → 0.13.1

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@awesomate/hosting-mcp",
3
- "version": "0.13.0",
3
+ "version": "0.13.1",
4
4
  "description": "Awesomate MCP server \u2014 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",
@@ -345,10 +345,18 @@ function installSkill() {
345
345
  // 2026-07-28). npx treats both forms identically at runtime; the = form keeps
346
346
  // the value glued to the token so these args are safe to copy anywhere.
347
347
  // The explicit package must stay: this package ships two bins.
348
- const CLEAN_ENTRY = {
349
- command: 'npx',
350
- args: ['-y', '--package=@awesomate/hosting-mcp', 'awesomate-hosting-mcp'],
351
- };
348
+ // Windows: a bare `npx` spawn fails silently (it's npx.cmd there), so the
349
+ // server never starts and the tools never appear — even after a restart.
350
+ // First observed on the first Windows client, 2026-08-19. cmd /c resolves it.
351
+ const CLEAN_ENTRY = process.platform === 'win32'
352
+ ? {
353
+ command: 'cmd',
354
+ args: ['/c', 'npx', '-y', '--package=@awesomate/hosting-mcp', 'awesomate-hosting-mcp'],
355
+ }
356
+ : {
357
+ command: 'npx',
358
+ args: ['-y', '--package=@awesomate/hosting-mcp', 'awesomate-hosting-mcp'],
359
+ };
352
360
  const MANUAL_ADD_JSON = JSON.stringify({ mcpServers: { 'awesomate-hosting': CLEAN_ENTRY } }, null, 2);
353
361
 
354
362
  /**
@@ -377,7 +385,11 @@ function ensureMcpRegistration() {
377
385
 
378
386
  const entry = cfg.mcpServers?.['awesomate-hosting'];
379
387
  const entryIsClean =
380
- entry && !entry.env?.AWESOMATE_PAT && JSON.stringify(entry.args ?? []).includes('awesomate-hosting-mcp');
388
+ entry &&
389
+ !entry.env?.AWESOMATE_PAT &&
390
+ JSON.stringify(entry.args ?? []).includes('awesomate-hosting-mcp') &&
391
+ // A bare-npx registration is broken on Windows — rewrite it.
392
+ (process.platform !== 'win32' || entry.command === 'cmd');
381
393
 
382
394
  let changed = false;
383
395
  if (!entryIsClean) {
@@ -550,7 +562,13 @@ async function main() {
550
562
 
551
563
  const who = profile.email ? `${slug} (${profile.email}, plan ${redeemed.plan})` : `${slug} (plan ${redeemed.plan})`;
552
564
  console.log(`\n✓ Connected: ${who}${pinPath ? ` — pinned ${dirname(pinPath)}` : ''}`);
553
- console.log('Setup complete. Next: run awesomate_whoami to confirm the account, then ask me to read your plan and list your sites.');
565
+ console.log('Setup complete.');
566
+ console.log('');
567
+ console.log('IMPORTANT — restart Claude Code now: the MCP tools and skills load only at startup.');
568
+ console.log('Until the restart, builds still work — the assistant should follow');
569
+ console.log('~/.claude/skills/awesomate-n8n/references/rest-fallback.md (n8n) or');
570
+ console.log('~/.claude/skills/awesomate-hosting/references/rest-fallback.md (hosting).');
571
+ console.log('After restarting: run awesomate_whoami to confirm the account, then ask for your first build.');
554
572
  console.log('(The skill works in your current Claude session right away via its REST fallback — restart Claude Code when convenient to load the MCP tools.)');
555
573
  if (issues.length) {
556
574
  console.log(SUPPORT_HINT);
@@ -64,9 +64,11 @@ conflicts with anything under `references/vendor/`, platform-notes wins.
64
64
  | Provision a Postgres DB + n8n credential | `awesomate_n8n_provision_pg` |
65
65
  | Refresh these skills from the latest package | `awesomate_skill_update` |
66
66
 
67
- No MCP tools available (server not connected yet)? One restart of Claude
68
- Code usually fixes it; the awesomate-hosting skill's
69
- `references/rest-fallback.md` covers the interim.
67
+ No `awesomate_n8n_*` tools in this session (fresh bootstrap, or the server
68
+ didn't load)? Suggest a Claude Code restart once then BUILD ANYWAY:
69
+ [references/rest-fallback.md](references/rest-fallback.md) maps every tool
70
+ to its REST endpoint, and the full loop works over it. Never tell the user
71
+ they're blocked on a restart.
70
72
 
71
73
  ## 2. References — read on demand
72
74
 
@@ -0,0 +1,69 @@
1
+ # No MCP tools? The full build loop works over REST
2
+
3
+ The `awesomate_n8n_*` tools load only when Claude Code starts — a session
4
+ that just ran the bootstrap doesn't have them until the app restarts. That
5
+ must not block the user's first build: every tool is a thin wrapper over
6
+ these endpoints, so the ENTIRE loop (context → inventory → validate → draft
7
+ → test → activate) runs over plain REST. Tell the user a restart will make
8
+ this smoother, then build anyway.
9
+
10
+ ## Auth (never echo the token)
11
+
12
+ Read `~/.awesomate/credentials.json` (Windows:
13
+ `%USERPROFILE%\.awesomate\credentials.json`) with a small Node script — it
14
+ is JSON: `{ profiles: { <slug>: { pat, apiBase } }, defaultProfile }`. Pick
15
+ the profile named by `.awesomate.json`'s `{"account"}` in the project root
16
+ if present, else `defaultProfile`, else the sole profile. Send
17
+ `Authorization: Bearer <pat>` to `<apiBase>` (default
18
+ `https://hub.awesomate.ai`). On macOS/Linux,
19
+ `node ~/.claude/skills/awesomate-hosting/scripts/resolve-account.mjs --api`
20
+ prints `ACCT/API/PAT` in shell format (NOT JSON). Never print the PAT into
21
+ the conversation or logs.
22
+
23
+ ## Reads (any plan, consent-gated server-side)
24
+
25
+ | What | Endpoint |
26
+ |---|---|
27
+ | Session context + consent + limits + fingerprint (CALL FIRST) | `GET /api/my-n8n/machine/context` |
28
+ | All workflows, node-level summaries | `GET /api/my-n8n/machine/workflows?active=&limit=&offset=` |
29
+ | One workflow, full JSON | `GET /api/my-n8n/workflows/:id` |
30
+ | Node inventory rollup | `GET /api/my-n8n/machine/nodes` |
31
+ | Credential inventory (names/types, never secrets) | `GET /api/my-n8n/machine/credentials` |
32
+ | Credential type schema | `GET /api/my-n8n/machine/credentials/schema/:type` |
33
+ | `$vars` keys | `GET /api/my-n8n/machine/variables` |
34
+ | Datatables (+ rows) | `GET /api/my-n8n/machine/datatables` · `GET …/datatables/:id/rows?limit=` |
35
+ | Possibilities brief | `GET /api/my-n8n/machine/possibilities` |
36
+ | Executions | `GET /api/my-n8n/workflows/:id/executions` · `GET /api/my-n8n/executions/:execId` |
37
+ | Node-by-node execution debug | `GET /api/my-n8n/machine/executions/:execId/debug` |
38
+ | Live node docs + community templates | `POST /api/my-n8n/machine/node-catalog/:tool` — tool ∈ search_nodes, get_node, search_templates, get_template, validate_node, tools_documentation; body = the tool's args (e.g. `{"query":"gmail"}`, `{"nodeType":"n8n-nodes-base.gmail"}`) |
39
+
40
+ ## Writes (Support Plus+, consent + quotas + audit apply identically)
41
+
42
+ | Action | Endpoint |
43
+ |---|---|
44
+ | Validate workflow JSON | `POST /api/my-n8n/machine/workflows/validate` `{workflow}` |
45
+ | Create inactive `[CLI]` draft | `POST /api/my-n8n/machine/workflows/draft` `{name, nodes, connections, settings?}` |
46
+ | Update a draft in place | `PATCH /api/my-n8n/machine/workflows/:id` `{name?, nodes, connections, settings?}` |
47
+ | Activate / deactivate | `POST /api/my-n8n/machine/workflows/:id/activate` `{active: true|false}` |
48
+ | Test-fire the production webhook | `POST /api/my-n8n/machine/workflows/:id/test-fire` `{payload}` |
49
+ | Promote draft → live (webhookIds preserved) | `POST /api/my-n8n/machine/workflows/:id/promote` `{draftId}` (`:id` = LIVE id) |
50
+ | Roll a promote back | `POST /api/my-n8n/machine/operations/:operationId/rollback` |
51
+ | Delete an inactive draft | `DELETE /api/my-n8n/machine/workflows/:id` |
52
+ | Create a datatable (pass workflowId!) | `POST /api/my-n8n/machine/datatables` `{name, columns, workflowId?}` |
53
+ | Add a column / write rows | `POST …/datatables/:id/columns` · `POST …/datatables/:id/rows` `{mode, rows?/filter?/data?}` |
54
+ | Provision Postgres + n8n credential | `POST /api/my-n8n/machine/pg-credentials` |
55
+
56
+ ## Error contract (same as the tools)
57
+
58
+ - `403 consent_required` + `flag` + `settingsUrl` → relay the link, re-check
59
+ after the user toggles (a null `settingsUrl` means contact support).
60
+ - `403 missingScopes` → token predates n8n support — reconnect from
61
+ hub.awesomate.ai/sites.
62
+ - `429 quota_exceeded` → the plan's daily cap; stop, don't retry-loop.
63
+ - `503 node_catalog_unavailable` → use `references/vendor/` knowledge.
64
+ - `404` on a path in this table → check the path against this file
65
+ EXACTLY; do not probe variations — anything not listed here does not
66
+ exist, and everything listed here is the complete surface.
67
+
68
+ The skill's judgment (six-phase loop, approval gates, testing policy,
69
+ never-activate-a-copy) applies unchanged — only the transport differs.