@awesomate/hosting-mcp 0.51.0 → 0.52.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
CHANGED
|
@@ -42887,13 +42887,14 @@ server.registerTool(
|
|
|
42887
42887
|
"awesomate_crm_apps",
|
|
42888
42888
|
{
|
|
42889
42889
|
annotations: annotate("awesomate_crm_apps", MUTATING),
|
|
42890
|
-
description: "The account's own apps (a client portal, a members' app) whose users sign in by email link and then read and change only what each kind's access rules allow them (awesomate_crm_kinds set_access). Pro and above to create or change; reading is every plan. action 'list': each app with its publishable key, allowed origins, sign-up mode and default role. action 'create' {name, allowed_origins, sign_up?, default_role?}: name appears in the sign-in email; allowed_origins are the exact origins the app runs on (https://portal.example.com; http://localhost:5173 for development; capacitor://localhost for the mobile shell), with no path and no wildcard; sign_up 'invite' (default: only people added with awesomate_crm_app_users) or 'open' (anyone who uses the email link gets the default role). action 'update' {app_id, ...any of those, status?}: status 'disabled' signs everyone out of that app and stops its server keys. The publishable key (pk_...) is not a secret: it goes in the app's browser code, with @awesomate/sdk. Never put the account's own token (amt_pat_...) in browser code. Confirm origins and sign-up mode with the user: open sign-up lets strangers in under the default role. action 'customer_lookup' {app_id, roles?}: which roles in that app may look customers up (name, email and phone, by search or id, with @awesomate/sdk lookupCustomers) and so put a record under any customer, not only themselves. Without roles it reads the setting; roles ['staff'] switches it on for staff; [] switches it off. Never the app's default role (the one customers sign in with): that would show every customer to every other customer, and the hub refuses it. Off until the owner asks for it. SERVER KEYS (ak_...), for the app's own server or an n8n workflow, used with @awesomate/sdk createClient({ token: <key> }) or as a Bearer token on https://hub.awesomate.ai/api/sdk/v1/server: action 'keys' {app_id} lists them (never the secrets); 'create_key' {app_id, name, access: 'read'|'write', kinds?} makes one (kinds leaves it to those kinds, 'contact' to read contacts; leave it out for every kind) and returns the key ONCE: put it straight into the app server's environment (awesomate_app_set_env for an app hosted with us
|
|
42890
|
+
description: "The account's own apps (a client portal, a members' app) whose users sign in by email link and then read and change only what each kind's access rules allow them (awesomate_crm_kinds set_access). Pro and above to create or change; reading is every plan. action 'list': each app with its publishable key, allowed origins, sign-up mode and default role. action 'create' {name, allowed_origins, sign_up?, default_role?}: name appears in the sign-in email; allowed_origins are the exact origins the app runs on (https://portal.example.com; http://localhost:5173 for development; capacitor://localhost for the mobile shell), with no path and no wildcard; sign_up 'invite' (default: only people added with awesomate_crm_app_users) or 'open' (anyone who uses the email link gets the default role). action 'update' {app_id, ...any of those, status?}: status 'disabled' signs everyone out of that app and stops its server keys. The publishable key (pk_...) is not a secret: it goes in the app's browser code, with @awesomate/sdk. Never put the account's own token (amt_pat_...) in browser code. Confirm origins and sign-up mode with the user: open sign-up lets strangers in under the default role. action 'customer_lookup' {app_id, roles?}: which roles in that app may look customers up (name, email and phone, by search or id, with @awesomate/sdk lookupCustomers) and so put a record under any customer, not only themselves. Without roles it reads the setting; roles ['staff'] switches it on for staff; [] switches it off. Never the app's default role (the one customers sign in with): that would show every customer to every other customer, and the hub refuses it. Off until the owner asks for it. SERVER KEYS (ak_...), for the app's own server or an n8n workflow, used with @awesomate/sdk createClient({ token: <key> }) or as a Bearer token on https://hub.awesomate.ai/api/sdk/v1/server: action 'keys' {app_id} lists them (never the secrets); 'create_key' {app_id, name, access: 'read'|'write', kinds?} makes one (kinds leaves it to those kinds, 'contact' to read contacts; leave it out for every kind) and returns the key ONCE: put it straight into the app server's environment (awesomate_app_set_env for an app hosted with us) and never into browser code, a repository or a reply to the user. For an n8n workflow pass n8n_credential: true instead (prefer it): the hub puts the key into a Header Auth credential 'Awesomate app key: <name>' on their n8n (Authorization: Bearer, usable only towards the hub) and returns only its id and name, so the key never passes through you. 'revoke_key' {app_id, key_id} stops it at once, and removes a credential the hub made. A key reads every attribute of an app kind, contacts only as you read them, and writes need Support Plus and above. Prefer the narrowest key: read unless the server writes, and only the kinds it uses.",
|
|
42891
42891
|
inputSchema: {
|
|
42892
42892
|
action: external_exports.enum(["list", "create", "update", "keys", "create_key", "revoke_key", "customer_lookup"]),
|
|
42893
42893
|
app_id: external_exports.string().max(48).optional().describe("update, keys, create_key, revoke_key, customer_lookup: the app"),
|
|
42894
42894
|
access: external_exports.enum(["read", "write"]).optional().describe("create_key"),
|
|
42895
42895
|
kinds: external_exports.array(external_exports.string().max(41)).max(50).optional().describe("create_key: only these kinds (contact to read contacts); leave out for every kind"),
|
|
42896
42896
|
key_id: external_exports.string().max(64).optional().describe("revoke_key: from keys"),
|
|
42897
|
+
n8n_credential: external_exports.boolean().optional().describe("create_key: put the key into an n8n credential on their n8n instead of the answer"),
|
|
42897
42898
|
roles: external_exports.array(external_exports.string().max(31)).max(10).optional().describe("customer_lookup: the roles that may look customers up; [] switches it off; leave out to read"),
|
|
42898
42899
|
name: external_exports.string().max(80).optional(),
|
|
42899
42900
|
allowed_origins: external_exports.array(external_exports.string().max(200)).max(10).optional(),
|
|
@@ -42902,7 +42903,7 @@ server.registerTool(
|
|
|
42902
42903
|
status: external_exports.enum(["active", "disabled"]).optional().describe("update only")
|
|
42903
42904
|
}
|
|
42904
42905
|
},
|
|
42905
|
-
async ({ action, app_id, name, allowed_origins, sign_up, default_role, status, access, kinds, key_id, roles }) => {
|
|
42906
|
+
async ({ action, app_id, name, allowed_origins, sign_up, default_role, status, access, kinds, key_id, roles, n8n_credential }) => {
|
|
42906
42907
|
try {
|
|
42907
42908
|
const cfg = requireConfig();
|
|
42908
42909
|
if (action === "list") return textResult(await hubGet(cfg, "/api/my-crm/v1/apps"));
|
|
@@ -42920,7 +42921,7 @@ server.registerTool(
|
|
|
42920
42921
|
return textResult(await hubDelete(cfg, `${keys}/${encodeURIComponent(key_id)}`));
|
|
42921
42922
|
}
|
|
42922
42923
|
if (!name || !access) return errorResult(new Error("create_key needs a name and access (read or write)."));
|
|
42923
|
-
return textResult(await hubPost(cfg, keys, { name, access, ...kinds ? { kinds } : {} }));
|
|
42924
|
+
return textResult(await hubPost(cfg, keys, { name, access, ...kinds ? { kinds } : {}, ...n8n_credential === void 0 ? {} : { n8n_credential } }));
|
|
42924
42925
|
}
|
|
42925
42926
|
const fields = Object.fromEntries(Object.entries({ name, allowed_origins, sign_up, default_role }).filter(([, v]) => v !== void 0));
|
|
42926
42927
|
if (action === "create") return textResult(await hubPost(cfg, "/api/my-crm/v1/apps", fields));
|
|
@@ -43003,7 +43004,7 @@ server.registerTool(
|
|
|
43003
43004
|
"awesomate_crm_hooks",
|
|
43004
43005
|
{
|
|
43005
43006
|
annotations: annotate("awesomate_crm_hooks", MUTATING),
|
|
43006
|
-
description: "Send changes to an app's records to the account's own n8n: when a record of a named kind is created, updated or archived, the hub POSTs an event to a Webhook node on THEIR n8n (no other host is accepted), in order, at least once, retrying while n8n is down. Every writer counts: the app's people, its server key, Claude, a recipe, the assistant. Use it for 'when a job is requested, draft a quote', then write the result back with an app server key (awesomate_crm_apps create_key) from the same workflow. Event body: {id (stable: drop repeats), event: created|updated|archived, kind, record_id, changed: [attributes and links that changed], by, at, record (the record as it is when sent; null once archived), app}. Pro and above to change; reading is every plan. action 'list' {app_id}: each hook with delivered/missed counts and its last error. 'create' {app_id, name, url, kinds, events?}: url is the PRODUCTION webhook URL of an active workflow on their n8n (create and activate the workflow first with the awesomate_n8n tools);
|
|
43007
|
+
description: "Send changes to an app's records to the account's own n8n: when a record of a named kind is created, updated or archived, the hub POSTs an event to a Webhook node on THEIR n8n (no other host is accepted), in order, at least once, retrying while n8n is down. Every writer counts: the app's people, its server key, Claude, a recipe, the assistant. Use it for 'when a job is requested, draft a quote', then write the result back with an app server key (awesomate_crm_apps create_key) from the same workflow. Event body: {id (stable: drop repeats), event: created|updated|archived, kind, record_id, changed: [attributes and links that changed], by, at, record (the record as it is when sent; null once archived), app}. Pro and above to change; reading is every plan. action 'list' {app_id}: each hook with delivered/missed counts and its last error. 'create' {app_id, name, url, kinds, events?}: url is the PRODUCTION webhook URL of an active workflow on their n8n (create and activate the workflow first with the awesomate_n8n tools); pass n8n_credential: true (prefer it) and the hub puts the secret straight into an n8n Header Auth credential named 'Awesomate hook: <name>' on their n8n and returns only its id and name, so nothing secret passes through you: set the Webhook node's Authentication to Header Auth and pick that credential. Without it the secret comes back ONCE: put it into an n8n Header Auth credential (header X-Awesomate-Webhook-Secret), never into a reply. Removing the hook removes a credential the hub made. A new hook starts from now. 'update' {app_id, hook_id, name?, url?, kinds?, events?, enabled?}: enabled true retries at once. 'remove' {app_id, hook_id}. 'test' {app_id, hook_id}: one test event now ({event: 'test'}), and what n8n answered. Confirm the kinds and what the workflow will do with the user before creating one.",
|
|
43007
43008
|
inputSchema: {
|
|
43008
43009
|
action: external_exports.enum(["list", "create", "update", "remove", "test"]),
|
|
43009
43010
|
app_id: external_exports.string().max(48).describe("the app, from awesomate_crm_apps list"),
|
|
@@ -43012,16 +43013,17 @@ server.registerTool(
|
|
|
43012
43013
|
url: external_exports.string().max(500).optional().describe("create/update: the production URL of a Webhook node on the account's own n8n"),
|
|
43013
43014
|
kinds: external_exports.array(external_exports.string().max(41)).max(20).optional(),
|
|
43014
43015
|
events: external_exports.array(external_exports.enum(["created", "updated", "archived"])).max(3).optional().describe("default all three"),
|
|
43015
|
-
enabled: external_exports.boolean().optional().describe("update only")
|
|
43016
|
+
enabled: external_exports.boolean().optional().describe("update only"),
|
|
43017
|
+
n8n_credential: external_exports.boolean().optional().describe("create: put the secret into an n8n credential instead of the answer (recommended)")
|
|
43016
43018
|
}
|
|
43017
43019
|
},
|
|
43018
|
-
async ({ action, app_id, hook_id, name, url, kinds, events, enabled }) => {
|
|
43020
|
+
async ({ action, app_id, hook_id, name, url, kinds, events, enabled, n8n_credential }) => {
|
|
43019
43021
|
try {
|
|
43020
43022
|
const cfg = requireConfig();
|
|
43021
43023
|
const path = `/api/my-crm/v1/apps/${encodeURIComponent(app_id)}/hooks`;
|
|
43022
43024
|
if (action === "list") return textResult(await hubGet(cfg, path));
|
|
43023
43025
|
const fields = Object.fromEntries(Object.entries({ name, url, kinds, events }).filter(([, v]) => v !== void 0));
|
|
43024
|
-
if (action === "create") return textResult(await hubPost(cfg, path, fields));
|
|
43026
|
+
if (action === "create") return textResult(await hubPost(cfg, path, { ...fields, ...n8n_credential === void 0 ? {} : { n8n_credential } }));
|
|
43025
43027
|
if (!hook_id) return errorResult(new Error(`${action} needs hook_id, from list.`));
|
|
43026
43028
|
const one = `${path}/${encodeURIComponent(hook_id)}`;
|
|
43027
43029
|
if (action === "remove") return textResult(await hubDelete(cfg, one));
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@awesomate/hosting-mcp",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.52.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",
|
package/skill/CHANGELOG.json
CHANGED
|
@@ -1,5 +1,12 @@
|
|
|
1
1
|
{
|
|
2
2
|
"versions": [
|
|
3
|
+
{
|
|
4
|
+
"version": "0.52.0",
|
|
5
|
+
"highlights": [
|
|
6
|
+
"When your n8n is the one receiving, Claude can ask the hub to put a record hook's secret or an app server key straight into an n8n credential on your instance (n8n_credential). Nobody sees the secret, not Claude and not you",
|
|
7
|
+
"Removing the hook or revoking the key removes that credential too, so n8n never offers a dead one"
|
|
8
|
+
]
|
|
9
|
+
},
|
|
3
10
|
{
|
|
4
11
|
"version": "0.51.0",
|
|
5
12
|
"highlights": [
|
|
@@ -133,12 +133,14 @@ name and the default mode with the owner: switching it on lets an AI reply to th
|
|
|
133
133
|
## 7. Optional: automation
|
|
134
134
|
|
|
135
135
|
- **Server key** (`awesomate_crm_apps {action:'create_key'}`): for the app's own server or an n8n
|
|
136
|
-
workflow to read and write records. Read or write, only the kinds it needs.
|
|
137
|
-
|
|
136
|
+
workflow to read and write records. Read or write, only the kinds it needs. For n8n pass
|
|
137
|
+
`n8n_credential: true`: the hub puts the key into a credential on their n8n and you never see
|
|
138
|
+
it. Otherwise it is shown once: straight into the server's environment, never a reply or a repo.
|
|
138
139
|
- **Record events** (`awesomate_crm_hooks`): when a record of a kind is created, updated or
|
|
139
140
|
archived, the account's own n8n gets an event at once. Build and activate the workflow first
|
|
140
|
-
(awesomate-n8n skill), then create the hook with its production webhook URL and
|
|
141
|
-
|
|
141
|
+
(awesomate-n8n skill), then create the hook with its production webhook URL and
|
|
142
|
+
`n8n_credential: true`, and pick the credential it names in the Webhook node (Header Auth).
|
|
143
|
+
Use `test` to check it. Example: a job is
|
|
142
144
|
requested, the workflow drafts a quote and writes it back with a write key for `job`.
|
|
143
145
|
|
|
144
146
|
## 8. Check it works
|