hostinger-api-mcp 0.0.5 → 0.0.9

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.
@@ -1,4 +1,4 @@
1
- name: publish-release
1
+ name: build-release
2
2
 
3
3
  on:
4
4
  push:
@@ -6,8 +6,28 @@ on:
6
6
  - main
7
7
 
8
8
  jobs:
9
- npmjs:
9
+ release:
10
10
  runs-on: ubuntu-latest
11
+ steps:
12
+ - name: Repo checkout
13
+ uses: actions/checkout@v4
14
+
15
+ - name: Bump version and push tag
16
+ id: bump
17
+ uses: mathieudutour/github-tag-action@v6.2
18
+ with:
19
+ github_token: ${{ secrets.GITHUB_TOKEN }}
20
+ release_branches: main
21
+
22
+ - name: Release tag
23
+ uses: ncipollo/release-action@v1
24
+ with:
25
+ tag: ${{ steps.bump.outputs.new_tag }}
26
+ generateReleaseNotes: true
27
+
28
+ publish-npmjs:
29
+ runs-on: ubuntu-latest
30
+ needs: [release]
11
31
  permissions:
12
32
  contents: read
13
33
  id-token: write
@@ -27,8 +47,9 @@ jobs:
27
47
  env:
28
48
  NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
29
49
 
30
- github:
50
+ release-github:
31
51
  runs-on: ubuntu-latest
52
+ needs: [release]
32
53
  permissions:
33
54
  contents: read
34
55
  id-token: write
package/CODEOWNERS ADDED
@@ -0,0 +1 @@
1
+ * @hostinger/vps-team-dev
package/README.md CHANGED
@@ -124,7 +124,10 @@ This endpoint creates a new service order.
124
124
  To place order, you need to provide payment method ID and list of price items from the catalog endpoint together with quantity.
125
125
  Coupons also can be provided during order creation.
126
126
 
127
- Orders created using this endpoint will be set for automatically renewal.
127
+ Orders created using this endpoint will be set for automatic renewal.
128
+
129
+ Some `credit_card` payments might need additional verification, rendering purchase unprocessed.
130
+ We recommend use other payment methods than `credit_card` if you encounter this issue.
128
131
 
129
132
  - **Method**: `POST`
130
133
  - **Path**: `/api/billing/v1/orders`
@@ -234,6 +237,33 @@ This endpoint retrieves DNS zone records for a specific domain.
234
237
 
235
238
  - `domain`: Domain name (required)
236
239
 
240
+ ### DNS_updateZoneRecordsV1
241
+
242
+ This endpoint updates DNS records for the selected domain.
243
+
244
+ Using `overwrite = true` will replace existing records with the provided ones.
245
+ Otherwise existing records will be updated and new records will be added.
246
+
247
+ - **Method**: `PUT`
248
+ - **Path**: `/api/dns/v1/zones/{domain}`
249
+
250
+ **Parameters**:
251
+
252
+ - `domain`: Domain name (required)
253
+ - `overwrite`: If `true`, resource records (RRs) matching name and type will be deleted and new RRs will be created, otherwise resource records' ttl's are updated and new records are appended. If no matching RRs are found, they are created.
254
+ - `zone`: zone property (required)
255
+
256
+ ### DNS_deleteZoneRecordsV1
257
+
258
+ This endpoint deletes selected DNS records for the selected domain.
259
+
260
+ - **Method**: `DELETE`
261
+ - **Path**: `/api/dns/v1/zones/{domain}`
262
+
263
+ **Parameters**:
264
+
265
+ - `domain`: Domain name (required)
266
+
237
267
  ### DNS_resetZoneRecordsV1
238
268
 
239
269
  This endpoint resets DNS zone to the default records.
@@ -248,6 +278,22 @@ This endpoint resets DNS zone to the default records.
248
278
  - `reset_email_records`: Determines if email records should be reset
249
279
  - `whitelisted_record_types`: Specifies which record types to not reset
250
280
 
281
+ ### DNS_validateZoneRecordsV1
282
+
283
+ This endpoint used to validate DNS records prior update for the selected domain.
284
+
285
+ If the validation is successful, the response will contain `200 Success` code.
286
+ If there is validation error, the response will fail with `422 Validation error` code.
287
+
288
+ - **Method**: `POST`
289
+ - **Path**: `/api/dns/v1/zones/{domain}/validate`
290
+
291
+ **Parameters**:
292
+
293
+ - `domain`: Domain name (required)
294
+ - `overwrite`: If `true`, resource records (RRs) matching name and type will be deleted and new RRs will be created, otherwise resource records' ttl's are updated and new records are appended. If no matching RRs are found, they are created.
295
+ - `zone`: zone property (required)
296
+
251
297
  ### domains_getDomainListV1
252
298
 
253
299
  This endpoint retrieves a list of all domains associated with your account.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "hostinger-api-mcp",
3
- "version": "0.0.5",
3
+ "version": "0.0.9",
4
4
  "description": "MCP server for Hostinger API",
5
5
  "repository": {
6
6
  "type": "git",
package/server.js CHANGED
@@ -32,7 +32,7 @@ const TOOLS = [
32
32
  },
33
33
  {
34
34
  "name": "billing_createNewServiceOrderV1",
35
- "description": "This endpoint creates a new service order. \n\nTo place order, you need to provide payment method ID and list of price items from the catalog endpoint together with quantity.\nCoupons also can be provided during order creation.\n\nOrders created using this endpoint will be set for automatically renewal.",
35
+ "description": "This endpoint creates a new service order. \n\nTo place order, you need to provide payment method ID and list of price items from the catalog endpoint together with quantity.\nCoupons also can be provided during order creation.\n\nOrders created using this endpoint will be set for automatic renewal.\n\nSome `credit_card` payments might need additional verification, rendering purchase unprocessed.\nWe recommend use other payment methods than `credit_card` if you encounter this issue.",
36
36
  "method": "POST",
37
37
  "path": "/api/billing/v1/orders",
38
38
  "inputSchema": {
@@ -265,6 +265,61 @@ const TOOLS = [
265
265
  }
266
266
  ]
267
267
  },
268
+ {
269
+ "name": "DNS_updateZoneRecordsV1",
270
+ "description": "This endpoint updates DNS records for the selected domain. \n\nUsing `overwrite = true` will replace existing records with the provided ones. \nOtherwise existing records will be updated and new records will be added.",
271
+ "method": "PUT",
272
+ "path": "/api/dns/v1/zones/{domain}",
273
+ "inputSchema": {
274
+ "type": "object",
275
+ "properties": {
276
+ "domain": {
277
+ "type": "string",
278
+ "description": "Domain name"
279
+ },
280
+ "overwrite": {
281
+ "type": "boolean",
282
+ "description": "If `true`, resource records (RRs) matching name and type will be deleted and new RRs will be created, otherwise resource records' ttl's are updated and new records are appended. If no matching RRs are found, they are created."
283
+ },
284
+ "zone": {
285
+ "type": "array",
286
+ "description": "zone property"
287
+ }
288
+ },
289
+ "required": [
290
+ "domain",
291
+ "zone"
292
+ ]
293
+ },
294
+ "security": [
295
+ {
296
+ "apiToken": []
297
+ }
298
+ ]
299
+ },
300
+ {
301
+ "name": "DNS_deleteZoneRecordsV1",
302
+ "description": "This endpoint deletes selected DNS records for the selected domain.",
303
+ "method": "DELETE",
304
+ "path": "/api/dns/v1/zones/{domain}",
305
+ "inputSchema": {
306
+ "type": "object",
307
+ "properties": {
308
+ "domain": {
309
+ "type": "string",
310
+ "description": "Domain name"
311
+ }
312
+ },
313
+ "required": [
314
+ "domain"
315
+ ]
316
+ },
317
+ "security": [
318
+ {
319
+ "apiToken": []
320
+ }
321
+ ]
322
+ },
268
323
  {
269
324
  "name": "DNS_resetZoneRecordsV1",
270
325
  "description": "This endpoint resets DNS zone to the default records.",
@@ -300,6 +355,38 @@ const TOOLS = [
300
355
  }
301
356
  ]
302
357
  },
358
+ {
359
+ "name": "DNS_validateZoneRecordsV1",
360
+ "description": "This endpoint used to validate DNS records prior update for the selected domain. \n\nIf the validation is successful, the response will contain `200 Success` code.\nIf there is validation error, the response will fail with `422 Validation error` code.",
361
+ "method": "POST",
362
+ "path": "/api/dns/v1/zones/{domain}/validate",
363
+ "inputSchema": {
364
+ "type": "object",
365
+ "properties": {
366
+ "domain": {
367
+ "type": "string",
368
+ "description": "Domain name"
369
+ },
370
+ "overwrite": {
371
+ "type": "boolean",
372
+ "description": "If `true`, resource records (RRs) matching name and type will be deleted and new RRs will be created, otherwise resource records' ttl's are updated and new records are appended. If no matching RRs are found, they are created."
373
+ },
374
+ "zone": {
375
+ "type": "array",
376
+ "description": "zone property"
377
+ }
378
+ },
379
+ "required": [
380
+ "domain",
381
+ "zone"
382
+ ]
383
+ },
384
+ "security": [
385
+ {
386
+ "apiToken": []
387
+ }
388
+ ]
389
+ },
303
390
  {
304
391
  "name": "domains_getDomainListV1",
305
392
  "description": "This endpoint retrieves a list of all domains associated with your account.",
@@ -1745,7 +1832,7 @@ const SECURITY_SCHEMES = {
1745
1832
 
1746
1833
  /**
1747
1834
  * MCP Server for Hostinger API
1748
- * Generated from OpenAPI spec version 0.0.14
1835
+ * Generated from OpenAPI spec version 0.0.18
1749
1836
  */
1750
1837
  class MCPServer {
1751
1838
  constructor() {
@@ -1763,7 +1850,7 @@ class MCPServer {
1763
1850
  this.server = new Server(
1764
1851
  {
1765
1852
  name: "hostinger-api-mcp",
1766
- version: "0.0.5",
1853
+ version: "0.0.9",
1767
1854
  },
1768
1855
  {
1769
1856
  capabilities: {
@@ -1788,7 +1875,7 @@ class MCPServer {
1788
1875
  });
1789
1876
  }
1790
1877
 
1791
- headers['User-Agent'] = 'hostinger-mcp-server/0.0.5';
1878
+ headers['User-Agent'] = 'hostinger-mcp-server/0.0.9';
1792
1879
 
1793
1880
  return headers;
1794
1881
  }
package/server.ts CHANGED
@@ -48,7 +48,7 @@ const TOOLS: OpenApiTool[] = [
48
48
  },
49
49
  {
50
50
  "name": "billing_createNewServiceOrderV1",
51
- "description": "This endpoint creates a new service order. \n\nTo place order, you need to provide payment method ID and list of price items from the catalog endpoint together with quantity.\nCoupons also can be provided during order creation.\n\nOrders created using this endpoint will be set for automatically renewal.",
51
+ "description": "This endpoint creates a new service order. \n\nTo place order, you need to provide payment method ID and list of price items from the catalog endpoint together with quantity.\nCoupons also can be provided during order creation.\n\nOrders created using this endpoint will be set for automatic renewal.\n\nSome `credit_card` payments might need additional verification, rendering purchase unprocessed.\nWe recommend use other payment methods than `credit_card` if you encounter this issue.",
52
52
  "method": "POST",
53
53
  "path": "/api/billing/v1/orders",
54
54
  "inputSchema": {
@@ -281,6 +281,61 @@ const TOOLS: OpenApiTool[] = [
281
281
  }
282
282
  ]
283
283
  },
284
+ {
285
+ "name": "DNS_updateZoneRecordsV1",
286
+ "description": "This endpoint updates DNS records for the selected domain. \n\nUsing `overwrite = true` will replace existing records with the provided ones. \nOtherwise existing records will be updated and new records will be added.",
287
+ "method": "PUT",
288
+ "path": "/api/dns/v1/zones/{domain}",
289
+ "inputSchema": {
290
+ "type": "object",
291
+ "properties": {
292
+ "domain": {
293
+ "type": "string",
294
+ "description": "Domain name"
295
+ },
296
+ "overwrite": {
297
+ "type": "boolean",
298
+ "description": "If `true`, resource records (RRs) matching name and type will be deleted and new RRs will be created, otherwise resource records' ttl's are updated and new records are appended. If no matching RRs are found, they are created."
299
+ },
300
+ "zone": {
301
+ "type": "array",
302
+ "description": "zone property"
303
+ }
304
+ },
305
+ "required": [
306
+ "domain",
307
+ "zone"
308
+ ]
309
+ },
310
+ "security": [
311
+ {
312
+ "apiToken": []
313
+ }
314
+ ]
315
+ },
316
+ {
317
+ "name": "DNS_deleteZoneRecordsV1",
318
+ "description": "This endpoint deletes selected DNS records for the selected domain.",
319
+ "method": "DELETE",
320
+ "path": "/api/dns/v1/zones/{domain}",
321
+ "inputSchema": {
322
+ "type": "object",
323
+ "properties": {
324
+ "domain": {
325
+ "type": "string",
326
+ "description": "Domain name"
327
+ }
328
+ },
329
+ "required": [
330
+ "domain"
331
+ ]
332
+ },
333
+ "security": [
334
+ {
335
+ "apiToken": []
336
+ }
337
+ ]
338
+ },
284
339
  {
285
340
  "name": "DNS_resetZoneRecordsV1",
286
341
  "description": "This endpoint resets DNS zone to the default records.",
@@ -316,6 +371,38 @@ const TOOLS: OpenApiTool[] = [
316
371
  }
317
372
  ]
318
373
  },
374
+ {
375
+ "name": "DNS_validateZoneRecordsV1",
376
+ "description": "This endpoint used to validate DNS records prior update for the selected domain. \n\nIf the validation is successful, the response will contain `200 Success` code.\nIf there is validation error, the response will fail with `422 Validation error` code.",
377
+ "method": "POST",
378
+ "path": "/api/dns/v1/zones/{domain}/validate",
379
+ "inputSchema": {
380
+ "type": "object",
381
+ "properties": {
382
+ "domain": {
383
+ "type": "string",
384
+ "description": "Domain name"
385
+ },
386
+ "overwrite": {
387
+ "type": "boolean",
388
+ "description": "If `true`, resource records (RRs) matching name and type will be deleted and new RRs will be created, otherwise resource records' ttl's are updated and new records are appended. If no matching RRs are found, they are created."
389
+ },
390
+ "zone": {
391
+ "type": "array",
392
+ "description": "zone property"
393
+ }
394
+ },
395
+ "required": [
396
+ "domain",
397
+ "zone"
398
+ ]
399
+ },
400
+ "security": [
401
+ {
402
+ "apiToken": []
403
+ }
404
+ ]
405
+ },
319
406
  {
320
407
  "name": "domains_getDomainListV1",
321
408
  "description": "This endpoint retrieves a list of all domains associated with your account.",
@@ -1761,7 +1848,7 @@ const SECURITY_SCHEMES: Record<string, SecurityScheme> = {
1761
1848
 
1762
1849
  /**
1763
1850
  * MCP Server for Hostinger API
1764
- * Generated from OpenAPI spec version 0.0.14
1851
+ * Generated from OpenAPI spec version 0.0.18
1765
1852
  */
1766
1853
  class MCPServer {
1767
1854
  private server: Server;
@@ -1783,7 +1870,7 @@ class MCPServer {
1783
1870
  this.server = new Server(
1784
1871
  {
1785
1872
  name: "hostinger-api-mcp",
1786
- version: "0.0.5",
1873
+ version: "0.0.9",
1787
1874
  },
1788
1875
  {
1789
1876
  capabilities: {
@@ -1808,7 +1895,7 @@ class MCPServer {
1808
1895
  });
1809
1896
  }
1810
1897
 
1811
- headers['User-Agent'] = 'hostinger-mcp-server/0.0.5';
1898
+ headers['User-Agent'] = 'hostinger-mcp-server/0.0.9';
1812
1899
 
1813
1900
  return headers;
1814
1901
  }
package/types.d.ts CHANGED
@@ -22,7 +22,10 @@ Prices in catalog items is displayed as cents (without floating point), e.g: flo
22
22
  To place order, you need to provide payment method ID and list of price items from the catalog endpoint together with quantity.
23
23
  Coupons also can be provided during order creation.
24
24
 
25
- Orders created using this endpoint will be set for automatically renewal.
25
+ Orders created using this endpoint will be set for automatic renewal.
26
+
27
+ Some `credit_card` payments might need additional verification, rendering purchase unprocessed.
28
+ We recommend use other payment methods than `credit_card` if you encounter this issue.
26
29
  */
27
30
  "undefined": {
28
31
  params: {
@@ -163,6 +166,43 @@ If you want to add new payment method, please use [hPanel](https://hpanel.hostin
163
166
  response: any; // Response structure will depend on the API
164
167
  };
165
168
 
169
+ /**
170
+ * This endpoint updates DNS records for the selected domain.
171
+
172
+ Using `overwrite = true` will replace existing records with the provided ones.
173
+ Otherwise existing records will be updated and new records will be added.
174
+ */
175
+ "undefined": {
176
+ params: {
177
+ /**
178
+ * Domain name
179
+ */
180
+ domain: string;
181
+ /**
182
+ * If `true`, resource records (RRs) matching name and type will be deleted and new RRs will be created, otherwise resource records' ttl's are updated and new records are appended. If no matching RRs are found, they are created.
183
+ */
184
+ overwrite?: boolean;
185
+ /**
186
+ * zone property
187
+ */
188
+ zone: array;
189
+ };
190
+ response: any; // Response structure will depend on the API
191
+ };
192
+
193
+ /**
194
+ * This endpoint deletes selected DNS records for the selected domain.
195
+ */
196
+ "undefined": {
197
+ params: {
198
+ /**
199
+ * Domain name
200
+ */
201
+ domain: string;
202
+ };
203
+ response: any; // Response structure will depend on the API
204
+ };
205
+
166
206
  /**
167
207
  * This endpoint resets DNS zone to the default records.
168
208
  */
@@ -188,6 +228,30 @@ If you want to add new payment method, please use [hPanel](https://hpanel.hostin
188
228
  response: any; // Response structure will depend on the API
189
229
  };
190
230
 
231
+ /**
232
+ * This endpoint used to validate DNS records prior update for the selected domain.
233
+
234
+ If the validation is successful, the response will contain `200 Success` code.
235
+ If there is validation error, the response will fail with `422 Validation error` code.
236
+ */
237
+ "undefined": {
238
+ params: {
239
+ /**
240
+ * Domain name
241
+ */
242
+ domain: string;
243
+ /**
244
+ * If `true`, resource records (RRs) matching name and type will be deleted and new RRs will be created, otherwise resource records' ttl's are updated and new records are appended. If no matching RRs are found, they are created.
245
+ */
246
+ overwrite?: boolean;
247
+ /**
248
+ * zone property
249
+ */
250
+ zone: array;
251
+ };
252
+ response: any; // Response structure will depend on the API
253
+ };
254
+
191
255
  /**
192
256
  * This endpoint retrieves a list of all domains associated with your account.
193
257
  */