hostinger-api-mcp 0.0.4 → 0.0.8

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
@@ -234,6 +234,32 @@ This endpoint retrieves DNS zone records for a specific domain.
234
234
 
235
235
  - `domain`: Domain name (required)
236
236
 
237
+ ### DNS_updateZoneRecordsV1
238
+
239
+ This endpoint updates DNS records for the selected domain. This endpoint could also be used
240
+ to delete single record when multiple records exist under same name. In that case use `overwrite` flag
241
+ and provide records which should remain. All other records under same name will be deleted.
242
+
243
+ - **Method**: `PUT`
244
+ - **Path**: `/api/dns/v1/zones/{domain}`
245
+
246
+ **Parameters**:
247
+
248
+ - `domain`: Domain name (required)
249
+ - `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.
250
+ - `zone`: zone property (required)
251
+
252
+ ### DNS_deleteZoneRecordsV1
253
+
254
+ This endpoint deletes selected DNS records for the selected domain.
255
+
256
+ - **Method**: `DELETE`
257
+ - **Path**: `/api/dns/v1/zones/{domain}`
258
+
259
+ **Parameters**:
260
+
261
+ - `domain`: Domain name (required)
262
+
237
263
  ### DNS_resetZoneRecordsV1
238
264
 
239
265
  This endpoint resets DNS zone to the default records.
@@ -248,6 +274,22 @@ This endpoint resets DNS zone to the default records.
248
274
  - `reset_email_records`: Determines if email records should be reset
249
275
  - `whitelisted_record_types`: Specifies which record types to not reset
250
276
 
277
+ ### DNS_validateZoneRecordsV1
278
+
279
+ This endpoint used to validate DNS records prior update for the selected domain.
280
+
281
+ If the validation is successful, the response will contain `200 Success` code.
282
+ If there is validation error, the response will fail with `422 Validation error` code.
283
+
284
+ - **Method**: `POST`
285
+ - **Path**: `/api/dns/v1/zones/{domain}/validate`
286
+
287
+ **Parameters**:
288
+
289
+ - `domain`: Domain name (required)
290
+ - `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.
291
+ - `zone`: zone property (required)
292
+
251
293
  ### domains_getDomainListV1
252
294
 
253
295
  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.4",
3
+ "version": "0.0.8",
4
4
  "description": "MCP server for Hostinger API",
5
5
  "repository": {
6
6
  "type": "git",
package/server.js CHANGED
@@ -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. This endpoint could also be used\nto delete single record when multiple records exist under same name. In that case use `overwrite` flag\nand provide records which should remain. All other records under same name will be deleted.",
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.17
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.2",
1853
+ version: "0.0.8",
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/' + this.server.getClientVersion();
1878
+ headers['User-Agent'] = 'hostinger-mcp-server/0.0.8';
1792
1879
 
1793
1880
  return headers;
1794
1881
  }
package/server.ts CHANGED
@@ -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. This endpoint could also be used\nto delete single record when multiple records exist under same name. In that case use `overwrite` flag\nand provide records which should remain. All other records under same name will be deleted.",
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.17
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.2",
1873
+ version: "0.0.8",
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/' + this.server.getClientVersion();
1898
+ headers['User-Agent'] = 'hostinger-mcp-server/0.0.8';
1812
1899
 
1813
1900
  return headers;
1814
1901
  }
package/types.d.ts CHANGED
@@ -163,6 +163,42 @@ If you want to add new payment method, please use [hPanel](https://hpanel.hostin
163
163
  response: any; // Response structure will depend on the API
164
164
  };
165
165
 
166
+ /**
167
+ * This endpoint updates DNS records for the selected domain. This endpoint could also be used
168
+ to delete single record when multiple records exist under same name. In that case use `overwrite` flag
169
+ and provide records which should remain. All other records under same name will be deleted.
170
+ */
171
+ "undefined": {
172
+ params: {
173
+ /**
174
+ * Domain name
175
+ */
176
+ domain: string;
177
+ /**
178
+ * 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.
179
+ */
180
+ overwrite?: boolean;
181
+ /**
182
+ * zone property
183
+ */
184
+ zone: array;
185
+ };
186
+ response: any; // Response structure will depend on the API
187
+ };
188
+
189
+ /**
190
+ * This endpoint deletes selected DNS records for the selected domain.
191
+ */
192
+ "undefined": {
193
+ params: {
194
+ /**
195
+ * Domain name
196
+ */
197
+ domain: string;
198
+ };
199
+ response: any; // Response structure will depend on the API
200
+ };
201
+
166
202
  /**
167
203
  * This endpoint resets DNS zone to the default records.
168
204
  */
@@ -188,6 +224,30 @@ If you want to add new payment method, please use [hPanel](https://hpanel.hostin
188
224
  response: any; // Response structure will depend on the API
189
225
  };
190
226
 
227
+ /**
228
+ * This endpoint used to validate DNS records prior update for the selected domain.
229
+
230
+ If the validation is successful, the response will contain `200 Success` code.
231
+ If there is validation error, the response will fail with `422 Validation error` code.
232
+ */
233
+ "undefined": {
234
+ params: {
235
+ /**
236
+ * Domain name
237
+ */
238
+ domain: string;
239
+ /**
240
+ * 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.
241
+ */
242
+ overwrite?: boolean;
243
+ /**
244
+ * zone property
245
+ */
246
+ zone: array;
247
+ };
248
+ response: any; // Response structure will depend on the API
249
+ };
250
+
191
251
  /**
192
252
  * This endpoint retrieves a list of all domains associated with your account.
193
253
  */