@awesomate/hosting-mcp 0.48.0 → 0.49.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 +18 -4
- package/package.json +1 -1
- package/skill/CHANGELOG.json +8 -0
package/dist/index.js
CHANGED
|
@@ -42886,10 +42886,13 @@ server.registerTool(
|
|
|
42886
42886
|
"awesomate_crm_apps",
|
|
42887
42887
|
{
|
|
42888
42888
|
annotations: annotate("awesomate_crm_apps", MUTATING),
|
|
42889
|
-
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. 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.",
|
|
42889
|
+
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. 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, or the n8n credential) and never into browser code, a repository or a reply to the user; 'revoke_key' {app_id, key_id} stops it at once. 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.",
|
|
42890
42890
|
inputSchema: {
|
|
42891
|
-
action: external_exports.enum(["list", "create", "update"]),
|
|
42892
|
-
app_id: external_exports.string().max(48).optional().describe("update: the app"),
|
|
42891
|
+
action: external_exports.enum(["list", "create", "update", "keys", "create_key", "revoke_key"]),
|
|
42892
|
+
app_id: external_exports.string().max(48).optional().describe("update, keys, create_key, revoke_key: the app"),
|
|
42893
|
+
access: external_exports.enum(["read", "write"]).optional().describe("create_key"),
|
|
42894
|
+
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"),
|
|
42895
|
+
key_id: external_exports.string().max(64).optional().describe("revoke_key: from keys"),
|
|
42893
42896
|
name: external_exports.string().max(80).optional(),
|
|
42894
42897
|
allowed_origins: external_exports.array(external_exports.string().max(200)).max(10).optional(),
|
|
42895
42898
|
sign_up: external_exports.enum(["invite", "open"]).optional(),
|
|
@@ -42897,10 +42900,21 @@ server.registerTool(
|
|
|
42897
42900
|
status: external_exports.enum(["active", "disabled"]).optional().describe("update only")
|
|
42898
42901
|
}
|
|
42899
42902
|
},
|
|
42900
|
-
async ({ action, app_id, name, allowed_origins, sign_up, default_role, status }) => {
|
|
42903
|
+
async ({ action, app_id, name, allowed_origins, sign_up, default_role, status, access, kinds, key_id }) => {
|
|
42901
42904
|
try {
|
|
42902
42905
|
const cfg = requireConfig();
|
|
42903
42906
|
if (action === "list") return textResult(await hubGet(cfg, "/api/my-crm/v1/apps"));
|
|
42907
|
+
if (action === "keys" || action === "create_key" || action === "revoke_key") {
|
|
42908
|
+
if (!app_id) return errorResult(new Error(`${action} needs app_id, from list.`));
|
|
42909
|
+
const keys = `/api/my-crm/v1/apps/${encodeURIComponent(app_id)}/keys`;
|
|
42910
|
+
if (action === "keys") return textResult(await hubGet(cfg, keys));
|
|
42911
|
+
if (action === "revoke_key") {
|
|
42912
|
+
if (!key_id) return errorResult(new Error("revoke_key needs key_id, from keys."));
|
|
42913
|
+
return textResult(await hubDelete(cfg, `${keys}/${encodeURIComponent(key_id)}`));
|
|
42914
|
+
}
|
|
42915
|
+
if (!name || !access) return errorResult(new Error("create_key needs a name and access (read or write)."));
|
|
42916
|
+
return textResult(await hubPost(cfg, keys, { name, access, ...kinds ? { kinds } : {} }));
|
|
42917
|
+
}
|
|
42904
42918
|
const fields = Object.fromEntries(Object.entries({ name, allowed_origins, sign_up, default_role }).filter(([, v]) => v !== void 0));
|
|
42905
42919
|
if (action === "create") return textResult(await hubPost(cfg, "/api/my-crm/v1/apps", fields));
|
|
42906
42920
|
if (!app_id) return errorResult(new Error("update needs app_id, from list."));
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@awesomate/hosting-mcp",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.49.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,13 @@
|
|
|
1
1
|
{
|
|
2
2
|
"versions": [
|
|
3
|
+
{
|
|
4
|
+
"version": "0.49.0",
|
|
5
|
+
"highlights": [
|
|
6
|
+
"Your app's own server, or an n8n workflow, can now read and write your app data with a server key of its own (awesomate_crm_apps, create_key), instead of your account's token",
|
|
7
|
+
"Keep each key narrow: read only, or only the kinds it needs. Revoking one stops it at once, and switching an app off stops all its keys",
|
|
8
|
+
"Use a key with the @awesomate/sdk package (createClient with the key as the token) or as a Bearer token from n8n. It never works from a browser"
|
|
9
|
+
]
|
|
10
|
+
},
|
|
3
11
|
{
|
|
4
12
|
"version": "0.48.0",
|
|
5
13
|
"highlights": [
|