hostinger-api-mcp 3.28.6 → 3.30.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.
Files changed (56) hide show
  1. package/CHANGELOG.md +22 -0
  2. package/README.md +9 -40
  3. package/gemini-extension.json +1 -1
  4. package/package.json +1 -1
  5. package/server.json +2 -2
  6. package/skills/headless/SKILL.md +1 -0
  7. package/skills/headless/VERSION +2 -2
  8. package/skills/headless/hostinger-mcp.mjs +88 -0
  9. package/skills/headless/push-content.mjs +530 -0
  10. package/skills/headless/steps/04-content-model/SKILL.md +9 -9
  11. package/skills/headless/steps/04-content-model/wordpress/SKILL.md +83 -252
  12. package/skills/headless/steps/04-content-model/wordpress/by-hand.md +31 -0
  13. package/skills/headless/steps/04-content-model/wordpress/custom-plugins.md +2 -2
  14. package/skills/headless/steps/04-content-model/wordpress/woocommerce.md +21 -49
  15. package/skills/headless/steps/05-design/SKILL.md +1 -1
  16. package/skills/headless/wait.mjs +15 -95
  17. package/skills/headless/wp-mcp.mjs +125 -0
  18. package/skills/maintain-wordpress/SKILL.md +1 -1
  19. package/skills/troubleshoot-website/SKILL.md +1 -1
  20. package/src/core/runtime.js +96 -0
  21. package/src/core/runtime.ts +96 -0
  22. package/src/core/skills.js +55 -27
  23. package/src/core/skills.ts +55 -27
  24. package/src/core/tools/all.js +78 -4
  25. package/src/core/tools/all.ts +78 -4
  26. package/src/core/tools/hosting.js +78 -4
  27. package/src/core/tools/hosting.ts +78 -4
  28. package/src/servers/agency-hosting.js +1 -1
  29. package/src/servers/agency-hosting.ts +1 -1
  30. package/src/servers/agent-readiness.js +1 -1
  31. package/src/servers/agent-readiness.ts +1 -1
  32. package/src/servers/all.js +1 -1
  33. package/src/servers/all.ts +1 -1
  34. package/src/servers/billing.js +1 -1
  35. package/src/servers/billing.ts +1 -1
  36. package/src/servers/dns.js +1 -1
  37. package/src/servers/dns.ts +1 -1
  38. package/src/servers/domains.js +1 -1
  39. package/src/servers/domains.ts +1 -1
  40. package/src/servers/ecommerce.js +1 -1
  41. package/src/servers/ecommerce.ts +1 -1
  42. package/src/servers/gpu.js +1 -1
  43. package/src/servers/gpu.ts +1 -1
  44. package/src/servers/horizons.js +1 -1
  45. package/src/servers/horizons.ts +1 -1
  46. package/src/servers/hosting.js +1 -1
  47. package/src/servers/hosting.ts +1 -1
  48. package/src/servers/mail.js +1 -1
  49. package/src/servers/mail.ts +1 -1
  50. package/src/servers/reach.js +1 -1
  51. package/src/servers/reach.ts +1 -1
  52. package/src/servers/vps.js +1 -1
  53. package/src/servers/vps.ts +1 -1
  54. package/src/servers/wordpress.js +1 -1
  55. package/src/servers/wordpress.ts +1 -1
  56. package/types.d.ts +29 -0
package/CHANGELOG.md CHANGED
@@ -4,6 +4,28 @@ Generated at release time from the diff between the previous and current
4
4
  build. Tool changes are listed individually; everything else is summarised
5
5
  by area.
6
6
 
7
+ ## v3.30.0 — 2026-11-05
8
+
9
+ ### Operations
10
+
11
+ - Added `hosting_php_update` — Update website PHP version, extensions and options
12
+ - Hid 4 operations from search (they still run through `execute`): `hosting_php_reset-extensions`, `hosting_php_update-extensions`, `hosting_php_update-options`, `hosting_php_update-version`
13
+
14
+ ### Also in this release
15
+
16
+ - Documentation: `README.md`
17
+ - Bundled agent skills: `skills/headless/VERSION`, `skills/maintain-wordpress/SKILL.md`, `skills/troubleshoot-website/SKILL.md`
18
+ - Request handling and authentication: `src/core/runtime.js`, `src/core/runtime.ts`
19
+ - Other files: `src/core/skills.js`, `src/core/skills.ts`
20
+ - Build and packaging: `types.d.ts`
21
+
22
+ ## v3.29.0 — 2026-11-05
23
+
24
+ ### Also in this release
25
+
26
+ - Bundled agent skills: 12 files
27
+ - Other files: `src/core/skills.js`, `src/core/skills.ts`
28
+
7
29
  ## v3.28.6 — 2026-11-05
8
30
 
9
31
  ### Also in this release
package/README.md CHANGED
@@ -69,7 +69,7 @@ pnpm update -g @hostinger/mcp
69
69
 
70
70
  This package installs the following MCP server commands:
71
71
 
72
- - `hostinger-api-mcp` — unified server over every operation (412 total)
72
+ - `hostinger-api-mcp` — unified server over every operation (409 total)
73
73
  - `hostinger-agency-hosting-mcp` — 43 operations for agency-hosting
74
74
  - `hostinger-agent-readiness-mcp` — 4 operations for agent-readiness
75
75
  - `hostinger-billing-mcp` — 10 operations for billing
@@ -78,7 +78,7 @@ This package installs the following MCP server commands:
78
78
  - `hostinger-ecommerce-mcp` — 30 operations for ecommerce
79
79
  - `hostinger-gpu-mcp` — 5 operations for gpu
80
80
  - `hostinger-horizons-mcp` — 7 operations for horizons
81
- - `hostinger-hosting-mcp` — 57 operations for hosting
81
+ - `hostinger-hosting-mcp` — 54 operations for hosting
82
82
  - `hostinger-mail-mcp` — 39 operations for mail
83
83
  - `hostinger-reach-mcp` — 71 operations for reach
84
84
  - `hostinger-vps-mcp` — 68 operations for vps
@@ -1960,6 +1960,13 @@ Clear a website's server cache (the hosting server's page cache) and Hostinger C
1960
1960
  - **Method**: `custom`
1961
1961
  - **Path**: `custom`
1962
1962
 
1963
+ #### hosting_php_update
1964
+
1965
+ Change a website's PHP version, extensions and php.ini options in one call. Pass only what to change, at least one of version, resetExtensions, extensions and options. Steps run in the order version, resetExtensions, extensions, options, and the call stops at the first failure. applied lists the steps that ran. When a step fails, the call returns an error whose text is the same JSON: failed names the step and why, and skipped lists the ones not attempted; a multi-execute batch stops there too. WARNING: changing the version resets the website's extensions (PHP 8.0 and later) and its options to their defaults, so pass the extensions and options to keep in the same call; they are applied after the version. Option values above the plan limit are capped silently: read the applied values back with hosting_php_get, which also lists the available versions, extensions and options. Works for Shared and Cloud hosting websites.
1966
+
1967
+ - **Method**: `custom`
1968
+ - **Path**: `custom`
1969
+
1963
1970
  #### hosting_websites_list-domains
1964
1971
 
1965
1972
  List the extra domains of a website: its parked (alias) domains, which show the same site under another domain name, and its subdomains (e.g. blog.example.com), with each one's root directory. parked items have domain (a domain name or an IP address) and type (domain or ip); subdomains items have domain (the full name), subdomain (the prefix) and root_directory. A list that cannot be read comes back as { error } and the other is still returned. To add or remove one use hosting_websites_add-domain or hosting_websites_remove-domain. Works for Shared and Cloud hosting websites.
@@ -2441,15 +2448,6 @@ or specific order IDs for more targeted results.
2441
2448
  - **Method**: `GET`
2442
2449
  - **Path**: `/api/hosting/v1/orders`
2443
2450
 
2444
- #### hosting_php_reset-extensions
2445
-
2446
- Resets all PHP extensions of the website to their default state.
2447
-
2448
- Use it to recover from extension conflicts or restore the original configuration.
2449
-
2450
- - **Method**: `PATCH`
2451
- - **Path**: `/api/hosting/v1/accounts/{username}/websites/{domain}/php/extensions/reset`
2452
-
2453
2451
  #### hosting_php_get
2454
2452
 
2455
2453
  Returns the full PHP configuration for the website: current version, available versions
@@ -2470,35 +2468,6 @@ Use it to debug PHP issues or inspect the complete PHP environment of the websit
2470
2468
  - **Method**: `GET`
2471
2469
  - **Path**: `/api/hosting/v1/accounts/{username}/websites/{domain}/php/php-info`
2472
2470
 
2473
- #### hosting_php_update-extensions
2474
-
2475
- Enables or disables PHP extensions (modules) for the website.
2476
-
2477
- Use the Get PHP details endpoint to check the current extension states before changing them.
2478
-
2479
- - **Method**: `PATCH`
2480
- - **Path**: `/api/hosting/v1/accounts/{username}/websites/{domain}/php/extensions`
2481
-
2482
- #### hosting_php_update-options
2483
-
2484
- Updates PHP options for the website (e.g. `memory_limit`, `max_execution_time`, `upload_max_filesize`).
2485
- Only provide the options you want to change, inside the `options` object.
2486
-
2487
- Values above the account plan limit are silently capped to that limit, so the request can succeed
2488
- with a smaller applied value. Call the Get PHP details endpoint afterwards to read the applied value.
2489
-
2490
- - **Method**: `PATCH`
2491
- - **Path**: `/api/hosting/v1/accounts/{username}/websites/{domain}/php/options`
2492
-
2493
- #### hosting_php_update-version
2494
-
2495
- Changes the PHP version of the website.
2496
-
2497
- Use the Get PHP details endpoint to see the versions available for the website.
2498
-
2499
- - **Method**: `PATCH`
2500
- - **Path**: `/api/hosting/v1/accounts/{username}/websites/{domain}/php/version`
2501
-
2502
2471
  #### hosting_redirects_list-website
2503
2472
 
2504
2473
  Returns a paginated list of redirects configured for the selected website.
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "hostinger-api-mcp",
3
- "version": "3.28.6",
3
+ "version": "3.30.0",
4
4
  "description": "Hostinger API — manage domains, DNS, hosting, VPS, billing and more from Gemini CLI.",
5
5
  "mcpServers": {
6
6
  "hostinger": {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "hostinger-api-mcp",
3
- "version": "3.28.6",
3
+ "version": "3.30.0",
4
4
  "mcpName": "io.github.hostinger/hostinger-api-mcp",
5
5
  "description": "MCP server for Hostinger API",
6
6
  "repository": {
package/server.json CHANGED
@@ -17,12 +17,12 @@
17
17
  "url": "https://github.com/hostinger/api-mcp-server",
18
18
  "source": "github"
19
19
  },
20
- "version": "3.28.6",
20
+ "version": "3.30.0",
21
21
  "packages": [
22
22
  {
23
23
  "registryType": "npm",
24
24
  "identifier": "@hostinger/mcp",
25
- "version": "3.28.6",
25
+ "version": "3.30.0",
26
26
  "transport": {
27
27
  "type": "stdio"
28
28
  },
@@ -239,6 +239,7 @@ took from it.
239
239
  | `brief.md` | refine | refined brief, audience, tone, pages, must-haves |
240
240
  | `site.json` | provision | chosen backend, username, install id, all URLs |
241
241
  | `content-model.md` | content model | entities, fields, pages, navigation |
242
+ | `content.json` | content model (WordPress) | the drafted content `push-content.mjs` pushes |
242
243
  | `design.md` (+ `brand/` logo files) | design | chosen design direction: tokens, type, logo, components, per-page composition, accessibility |
243
244
  | `src/` | frontend | the website source implementing `design.md`; framework choice is recorded in `state.json → frontend` |
244
245
  | `deploy.json` | deploy | build id, deployed at, live URLs |
@@ -1,3 +1,3 @@
1
- version=3.28.6
2
- commit=3ecd304d96fb
1
+ version=3.30.0
2
+ commit=451f245ab30b
3
3
  built=2026-11-05
@@ -0,0 +1,88 @@
1
+ // The local Hostinger MCP server (the management API), spoken to over newline-delimited JSON-RPC on
2
+ // stdio. It reuses the sign-in from the connect step. Shared by wait.mjs and push-content.mjs.
3
+
4
+ import { spawn } from 'node:child_process';
5
+ import { homedir } from 'node:os';
6
+
7
+ // ── platform-safe binary names (npm/npx are .cmd on Windows), as in connect/bootstrap.mjs ──────────
8
+ const isWin = process.platform === 'win32';
9
+ const bin = (name) => (isWin ? `${name}.cmd` : name);
10
+ const MCP = [bin('npx'), '-y', '--package=@hostinger/mcp@latest', 'hostinger-api-mcp'];
11
+ // Node >= 18.20.2 / 20.12.2 refuses to spawn a .cmd/.bat without a shell
12
+ // (CVE-2024-27980), so npx.cmd needs shell:true on Windows. Our args are all
13
+ // fixed literals, so enabling the shell introduces no injection risk.
14
+ const spawnShell = isWin;
15
+
16
+ // One server per script run. Once it dies every pending and later call rejects, so the caller ends with
17
+ // exit 2 rather than hanging.
18
+ export function connect(clientName) {
19
+ const child = spawn(MCP[0], MCP.slice(1), { stdio: ['pipe', 'pipe', 'pipe'], shell: spawnShell, cwd: homedir() });
20
+ const pending = new Map();
21
+ let buffer = '';
22
+ let diag = '';
23
+ let dead = null;
24
+ let nextId = 0;
25
+ const die = (reason) => {
26
+ dead ??= new Error(`the Hostinger MCP server stopped (${reason}): ${diag.trim().slice(-500)}`);
27
+ for (const { reject } of pending.values()) reject(dead);
28
+ pending.clear();
29
+ };
30
+ child.on('error', (e) => die(e.message));
31
+ // 'close' comes after stderr is drained, so the reason is in diag. A write to a dying server fails
32
+ // with EPIPE before that; 'close' still follows, so the EPIPE itself is ignored.
33
+ child.on('close', (code) => die(`exit code ${code}`));
34
+ child.stdin.on('error', () => {});
35
+ child.stderr.on('data', (chunk) => (diag = (diag + chunk).slice(-2000)));
36
+ child.stdout.on('data', (chunk) => {
37
+ buffer += chunk;
38
+ let i;
39
+ while ((i = buffer.indexOf('\n')) >= 0) {
40
+ const line = buffer.slice(0, i);
41
+ buffer = buffer.slice(i + 1);
42
+ try {
43
+ const message = JSON.parse(line);
44
+ pending.get(message.id)?.resolve(message);
45
+ pending.delete(message.id);
46
+ } catch {
47
+ /* not a JSON-RPC line */
48
+ }
49
+ }
50
+ });
51
+ // A call can stall on a live server (a stuck upstream request), so each one has its own deadline; past
52
+ // it, it answers like an error reply. A stalled start ends the run. The start gets longer: a cold `npx`
53
+ // fetch of the server takes 13-40 s on an idle machine and over 60 s on a busy one.
54
+ const rpc = (method, params, seconds = 60) =>
55
+ new Promise((resolve, reject) => {
56
+ if (dead) return reject(dead);
57
+ const id = (nextId += 1);
58
+ const timer = setTimeout(() => {
59
+ pending.delete(id);
60
+ resolve({ error: { message: `no reply to ${method} in ${seconds} s` } });
61
+ }, seconds * 1000);
62
+ const settle = (fn) => (value) => {
63
+ clearTimeout(timer);
64
+ fn(value);
65
+ };
66
+ pending.set(id, { resolve: settle(resolve), reject: settle(reject) });
67
+ child.stdin.write(`${JSON.stringify({ jsonrpc: '2.0', id, method, params })}\n`);
68
+ });
69
+ const ready = rpc('initialize', { protocolVersion: '2025-06-18', capabilities: {}, clientInfo: { name: clientName, version: '1' } }, 180)
70
+ .then((reply) => {
71
+ if (reply.error) throw new Error(`the Hostinger MCP server didn't start: ${reply.error.message}`);
72
+ child.stdin.write(`${JSON.stringify({ jsonrpc: '2.0', method: 'notifications/initialized' })}\n`);
73
+ });
74
+ // Runs one API operation: { data } on success, else { error, status } with the HTTP status the server
75
+ // keeps in its error text (NaN when there is none).
76
+ const execute = async (operation, params) => {
77
+ await ready;
78
+ const reply = await rpc('tools/call', { name: 'execute', arguments: { operation, params } });
79
+ const text = reply.result?.content?.[0]?.text ?? reply.error?.message ?? 'unknown error';
80
+ if (reply.error || reply.result?.isError) return { error: text.slice(0, 300), status: Number(text.match(/HTTP (\d{3})/)?.[1]) };
81
+ try {
82
+ return { data: JSON.parse(text) };
83
+ } catch {
84
+ return { error: text.slice(0, 300), status: NaN };
85
+ }
86
+ };
87
+ return { execute, close: () => child.kill() };
88
+ }