@awesomate/hosting-mcp 0.26.0 → 0.27.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
@@ -40969,6 +40969,7 @@ var TITLES = {
40969
40969
  awesomate_app_scaffold: "Get app scaffold guide",
40970
40970
  awesomate_app_deploy_info: "Get app deploy briefing",
40971
40971
  awesomate_app_health: "Check app health",
40972
+ awesomate_app_run_state: "Start or stop an app environment",
40972
40973
  awesomate_app_set_env: "Set app secret",
40973
40974
  awesomate_app_provision_db: "Add database to app",
40974
40975
  awesomate_n8n_workflows: "List n8n workflows",
@@ -41803,6 +41804,27 @@ server.registerTool(
41803
41804
  }
41804
41805
  }
41805
41806
  );
41807
+ server.registerTool(
41808
+ "awesomate_app_run_state",
41809
+ {
41810
+ annotations: annotate("awesomate_app_run_state", MUTATING),
41811
+ description: "Start or stop ONE environment of a Node app (its pm2 process). Use `stopped` to turn off a dev or staging environment the user has finished with. This frees process capacity on their hosting account, which is a real constraint: the account has a fixed number of processes it can run at once, and idle environments can starve the account's own websites. Use `running` to bring one back before you build or test on it. Stopping deletes NOTHING: code, database and address all stay, and starting again takes seconds. PRODUCTION CANNOT BE STOPPED (400 `prod_not_stoppable`); it is the address the user's customers reach. A 409 `run_state_failed` on a start means the account has no spare capacity, and the response carries nprocUsed/nprocLimit; tell the user which environment to stop rather than retrying. Static sites have no process (400 `static_app`). Requires apps:write (Support Plus+). Good habit: start dev before a build session, stop it after.",
41812
+ inputSchema: {
41813
+ appId: external_exports.number().int().positive().describe("The app id from awesomate_app_list / _get"),
41814
+ env: external_exports.enum(["dev", "staging", "prod"]).describe("Which environment to act on"),
41815
+ desiredState: external_exports.enum(["running", "stopped"]).describe("'stopped' frees capacity; 'running' starts it again")
41816
+ }
41817
+ },
41818
+ async ({ appId, env, desiredState }) => {
41819
+ try {
41820
+ return textResult(
41821
+ await hubPost(requireConfig(), `/api/my-apps/apps/${appId}/envs/${env}/run-state`, { desiredState })
41822
+ );
41823
+ } catch (err) {
41824
+ return errorResult(err);
41825
+ }
41826
+ }
41827
+ );
41806
41828
  server.registerTool(
41807
41829
  "awesomate_n8n_provision_pg",
41808
41830
  {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@awesomate/hosting-mcp",
3
- "version": "0.26.0",
3
+ "version": "0.27.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",
@@ -140,6 +140,14 @@ target; never touch prod without an explicit ask.**
140
140
  addresses from `awesomate_app_get` rather than constructing them — an
141
141
  account without the branded domains falls back to subdomains of its own
142
142
  primary domain (`dev-{app}.{domain}`).
143
+ **If dev is stopped, start it before you deploy to it.** `awesomate_app_get`
144
+ reports each environment's `desired_state`. A stopped environment is off to
145
+ free capacity on the account, not broken. `awesomate_app_run_state` with
146
+ `running` brings it back in seconds, and a health probe against a stopped
147
+ env fails for that reason and no other. **Offer to stop it again when the
148
+ session's work is done**: the account can only run a limited number of app
149
+ processes at once, so an idle dev environment is capacity taken from
150
+ something the user actually needs. Never stop `prod`; the tool refuses it.
143
151
  **Publishing to their WordPress site** (as opposed to an app) has its own
144
152
  tools, and `awesomate_run_wp_cli` is the wrong one for content: its
145
153
  argument gate rejects spaces outright, so a title or tagline can't go