hostinger-api-mcp 0.0.21 → 0.0.22
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/README.md +35 -9
- package/package.json +1 -1
- package/server.js +53 -13
- package/server.ts +53 -13
- package/types.d.ts +46 -9
package/README.md
CHANGED
|
@@ -136,6 +136,13 @@ Prices in catalog items is displayed as cents (without floating point), e.g: flo
|
|
|
136
136
|
|
|
137
137
|
This endpoint creates a new service order.
|
|
138
138
|
|
|
139
|
+
**DEPRECATED**
|
|
140
|
+
|
|
141
|
+
To purchase a domain, use [`POST /api/domains/v1/portfolio`](/#tag/domains-portfolio/POST/api/domains/v1/portfolio) instead.
|
|
142
|
+
|
|
143
|
+
To purchase a VPS, use [`POST /api/vps/v1/virtual-machines`](/#tag/vps-virtual-machine/POST/api/vps/v1/virtual-machines) instead.
|
|
144
|
+
|
|
145
|
+
|
|
139
146
|
To place order, you need to provide payment method ID and list of price items from the catalog endpoint together with quantity.
|
|
140
147
|
Coupons also can be provided during order creation.
|
|
141
148
|
|
|
@@ -412,7 +419,9 @@ This endpoint retrieves a list of all domains associated with your account.
|
|
|
412
419
|
|
|
413
420
|
### domains_purchaseNewDomainV1
|
|
414
421
|
|
|
415
|
-
This endpoint allows you to buy (purchase) and register a new domain name.
|
|
422
|
+
This endpoint allows you to buy (purchase) and register a new domain name.
|
|
423
|
+
|
|
424
|
+
If registration fails, login to [hPanel](https://hpanel.hostinger.com/) and check the domain registration status.
|
|
416
425
|
|
|
417
426
|
If no payment method is provided, your default payment method will be used automatically.
|
|
418
427
|
|
|
@@ -428,7 +437,7 @@ Some TLDs require `additional_details` to be provided and these will be validate
|
|
|
428
437
|
|
|
429
438
|
- `domain`: Domain name (required)
|
|
430
439
|
- `item_id`: Catalog price item ID (required)
|
|
431
|
-
- `payment_method_id`: Payment method ID
|
|
440
|
+
- `payment_method_id`: Payment method ID, default will be used if not provided
|
|
432
441
|
- `domain_contacts`: Domain contact information
|
|
433
442
|
- `additional_details`: Additional registration data, possible values depends on TLD
|
|
434
443
|
- `coupons`: Discount coupon codes
|
|
@@ -939,6 +948,24 @@ This endpoint retrieves a list of all available virtual machines.
|
|
|
939
948
|
|
|
940
949
|
|
|
941
950
|
|
|
951
|
+
### VPS_purchaseNewVirtualMachineV1
|
|
952
|
+
|
|
953
|
+
This endpoint allows you to buy (purchase) and setup a new virtual machine.
|
|
954
|
+
|
|
955
|
+
If virtual machine setup fails for any reason, login to [hPanel](https://hpanel.hostinger.com/) and complete the setup manually.
|
|
956
|
+
|
|
957
|
+
If no payment method is provided, your default payment method will be used automatically.
|
|
958
|
+
|
|
959
|
+
- **Method**: `POST`
|
|
960
|
+
- **Path**: `/api/vps/v1/virtual-machines`
|
|
961
|
+
|
|
962
|
+
**Parameters**:
|
|
963
|
+
|
|
964
|
+
- `item_id`: Catalog price item ID (required)
|
|
965
|
+
- `payment_method_id`: Payment method ID, default will be used if not provided
|
|
966
|
+
- `setup`: setup parameter (required)
|
|
967
|
+
- `coupons`: Discount coupon codes
|
|
968
|
+
|
|
942
969
|
### VPS_getScanMetricsV1
|
|
943
970
|
|
|
944
971
|
This endpoint retrieves the scan metrics for the [Monarx](https://www.monarx.com/) malware scanner installed on a specified virtual machine.
|
|
@@ -995,8 +1022,8 @@ It includes the following metrics:
|
|
|
995
1022
|
**Parameters**:
|
|
996
1023
|
|
|
997
1024
|
- `virtualMachineId`: Virtual Machine ID (required)
|
|
998
|
-
- `date_from`:
|
|
999
|
-
- `date_to`:
|
|
1025
|
+
- `date_from`: date_from parameter (required)
|
|
1026
|
+
- `date_to`: date_to parameter (required)
|
|
1000
1027
|
|
|
1001
1028
|
### VPS_setNameserversV1
|
|
1002
1029
|
|
|
@@ -1133,8 +1160,7 @@ Requirements for the password is the same as in the [recreate virtual machine en
|
|
|
1133
1160
|
|
|
1134
1161
|
### VPS_setupNewVirtualMachineV1
|
|
1135
1162
|
|
|
1136
|
-
This endpoint will setup newly purchased virtual machine
|
|
1137
|
-
New virtual machine can be purchased using [`/api/billing/v1/orders`](/#tag/billing-orders/POST/api/billing/v1/orders) endpoint.
|
|
1163
|
+
This endpoint will setup newly purchased virtual machine with `initial` state.
|
|
1138
1164
|
|
|
1139
1165
|
- **Method**: `POST`
|
|
1140
1166
|
- **Path**: `/api/vps/v1/virtual-machines/{virtualMachineId}/setup`
|
|
@@ -1149,9 +1175,9 @@ New virtual machine can be purchased using [`/api/billing/v1/orders`](/#tag/bill
|
|
|
1149
1175
|
- `hostname`: Override default hostname of the virtual machine
|
|
1150
1176
|
- `install_monarx`: Install Monarx malware scanner (if supported)
|
|
1151
1177
|
- `enable_backups`: Enable weekly backup schedule
|
|
1152
|
-
- `ns1`:
|
|
1153
|
-
- `ns2`:
|
|
1154
|
-
- `public_key`:
|
|
1178
|
+
- `ns1`: Name server 1
|
|
1179
|
+
- `ns2`: Name server 2
|
|
1180
|
+
- `public_key`: Use SSH key
|
|
1155
1181
|
|
|
1156
1182
|
### VPS_getSnapshotV1
|
|
1157
1183
|
|
package/package.json
CHANGED
package/server.js
CHANGED
|
@@ -48,7 +48,7 @@ const TOOLS = [
|
|
|
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 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.",
|
|
51
|
+
"description": "This endpoint creates a new service order. \n\n**DEPRECATED**\n\nTo purchase a domain, use [`POST /api/domains/v1/portfolio`](/#tag/domains-portfolio/POST/api/domains/v1/portfolio) instead.\n\nTo purchase a VPS, use [`POST /api/vps/v1/virtual-machines`](/#tag/vps-virtual-machine/POST/api/vps/v1/virtual-machines) instead.\n\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": {
|
|
@@ -739,7 +739,7 @@ const TOOLS = [
|
|
|
739
739
|
},
|
|
740
740
|
{
|
|
741
741
|
"name": "domains_purchaseNewDomainV1",
|
|
742
|
-
"description": "This endpoint allows you to buy (purchase) and register a new domain name.
|
|
742
|
+
"description": "This endpoint allows you to buy (purchase) and register a new domain name. \n\nIf registration fails, login to [hPanel](https://hpanel.hostinger.com/) and check the domain registration status.\n\nIf no payment method is provided, your default payment method will be used automatically.\n\nIf no WHOIS information is provided, the default contact information for that TLD (Top-Level Domain) will be used. \nBefore making a request, ensure that WHOIS information for the desired TLD exists in your account.\n\nSome TLDs require `additional_details` to be provided and these will be validated before completing the purchase. The required additional details vary by TLD.",
|
|
743
743
|
"method": "POST",
|
|
744
744
|
"path": "/api/domains/v1/portfolio",
|
|
745
745
|
"inputSchema": {
|
|
@@ -755,7 +755,7 @@ const TOOLS = [
|
|
|
755
755
|
},
|
|
756
756
|
"payment_method_id": {
|
|
757
757
|
"type": "integer",
|
|
758
|
-
"description": "Payment method ID"
|
|
758
|
+
"description": "Payment method ID, default will be used if not provided"
|
|
759
759
|
},
|
|
760
760
|
"domain_contacts": {
|
|
761
761
|
"type": "object",
|
|
@@ -1902,6 +1902,46 @@ const TOOLS = [
|
|
|
1902
1902
|
}
|
|
1903
1903
|
]
|
|
1904
1904
|
},
|
|
1905
|
+
{
|
|
1906
|
+
"name": "VPS_purchaseNewVirtualMachineV1",
|
|
1907
|
+
"description": "This endpoint allows you to buy (purchase) and setup a new virtual machine.\n\nIf virtual machine setup fails for any reason, login to [hPanel](https://hpanel.hostinger.com/) and complete the setup manually.\n\nIf no payment method is provided, your default payment method will be used automatically. ",
|
|
1908
|
+
"method": "POST",
|
|
1909
|
+
"path": "/api/vps/v1/virtual-machines",
|
|
1910
|
+
"inputSchema": {
|
|
1911
|
+
"type": "object",
|
|
1912
|
+
"properties": {
|
|
1913
|
+
"item_id": {
|
|
1914
|
+
"type": "string",
|
|
1915
|
+
"description": "Catalog price item ID"
|
|
1916
|
+
},
|
|
1917
|
+
"payment_method_id": {
|
|
1918
|
+
"type": "integer",
|
|
1919
|
+
"description": "Payment method ID, default will be used if not provided"
|
|
1920
|
+
},
|
|
1921
|
+
"setup": {
|
|
1922
|
+
"type": "string",
|
|
1923
|
+
"description": "setup parameter"
|
|
1924
|
+
},
|
|
1925
|
+
"coupons": {
|
|
1926
|
+
"type": "array",
|
|
1927
|
+
"description": "Discount coupon codes",
|
|
1928
|
+
"items": {
|
|
1929
|
+
"type": "string",
|
|
1930
|
+
"description": "coupons parameter"
|
|
1931
|
+
}
|
|
1932
|
+
}
|
|
1933
|
+
},
|
|
1934
|
+
"required": [
|
|
1935
|
+
"item_id",
|
|
1936
|
+
"setup"
|
|
1937
|
+
]
|
|
1938
|
+
},
|
|
1939
|
+
"security": [
|
|
1940
|
+
{
|
|
1941
|
+
"apiToken": []
|
|
1942
|
+
}
|
|
1943
|
+
]
|
|
1944
|
+
},
|
|
1905
1945
|
{
|
|
1906
1946
|
"name": "VPS_getScanMetricsV1",
|
|
1907
1947
|
"description": "This endpoint retrieves the scan metrics for the [Monarx](https://www.monarx.com/) malware scanner installed on a specified virtual machine.\nThe scan metrics provide detailed information about the malware scans performed by Monarx, including the number of scans, \ndetected threats, and other relevant statistics. This information is useful for monitoring the security status of the \nvirtual machine and assessing the effectiveness of the malware scanner.",
|
|
@@ -1985,11 +2025,11 @@ const TOOLS = [
|
|
|
1985
2025
|
},
|
|
1986
2026
|
"date_from": {
|
|
1987
2027
|
"type": "string",
|
|
1988
|
-
"description": "
|
|
2028
|
+
"description": "date_from parameter"
|
|
1989
2029
|
},
|
|
1990
2030
|
"date_to": {
|
|
1991
2031
|
"type": "string",
|
|
1992
|
-
"description": "
|
|
2032
|
+
"description": "date_to parameter"
|
|
1993
2033
|
}
|
|
1994
2034
|
},
|
|
1995
2035
|
"required": [
|
|
@@ -2250,7 +2290,7 @@ const TOOLS = [
|
|
|
2250
2290
|
},
|
|
2251
2291
|
{
|
|
2252
2292
|
"name": "VPS_setupNewVirtualMachineV1",
|
|
2253
|
-
"description": "This endpoint will setup newly purchased virtual machine
|
|
2293
|
+
"description": "This endpoint will setup newly purchased virtual machine with `initial` state. ",
|
|
2254
2294
|
"method": "POST",
|
|
2255
2295
|
"path": "/api/vps/v1/virtual-machines/{virtualMachineId}/setup",
|
|
2256
2296
|
"inputSchema": {
|
|
@@ -2290,15 +2330,15 @@ const TOOLS = [
|
|
|
2290
2330
|
},
|
|
2291
2331
|
"ns1": {
|
|
2292
2332
|
"type": "string",
|
|
2293
|
-
"description": "
|
|
2333
|
+
"description": "Name server 1"
|
|
2294
2334
|
},
|
|
2295
2335
|
"ns2": {
|
|
2296
2336
|
"type": "string",
|
|
2297
|
-
"description": "
|
|
2337
|
+
"description": "Name server 2"
|
|
2298
2338
|
},
|
|
2299
2339
|
"public_key": {
|
|
2300
2340
|
"type": "object",
|
|
2301
|
-
"description": "
|
|
2341
|
+
"description": "Use SSH key",
|
|
2302
2342
|
"properties": {
|
|
2303
2343
|
"name": {
|
|
2304
2344
|
"type": "string",
|
|
@@ -2306,7 +2346,7 @@ const TOOLS = [
|
|
|
2306
2346
|
},
|
|
2307
2347
|
"key": {
|
|
2308
2348
|
"type": "string",
|
|
2309
|
-
"description": "SSH
|
|
2349
|
+
"description": "Contents of the SSH key"
|
|
2310
2350
|
}
|
|
2311
2351
|
}
|
|
2312
2352
|
}
|
|
@@ -2472,7 +2512,7 @@ const SECURITY_SCHEMES = {
|
|
|
2472
2512
|
|
|
2473
2513
|
/**
|
|
2474
2514
|
* MCP Server for Hostinger API
|
|
2475
|
-
* Generated from OpenAPI spec version 0.0.
|
|
2515
|
+
* Generated from OpenAPI spec version 0.0.60
|
|
2476
2516
|
*/
|
|
2477
2517
|
class MCPServer {
|
|
2478
2518
|
constructor() {
|
|
@@ -2490,7 +2530,7 @@ class MCPServer {
|
|
|
2490
2530
|
this.server = new Server(
|
|
2491
2531
|
{
|
|
2492
2532
|
name: "hostinger-api-mcp",
|
|
2493
|
-
version: "0.0.
|
|
2533
|
+
version: "0.0.22",
|
|
2494
2534
|
},
|
|
2495
2535
|
{
|
|
2496
2536
|
capabilities: {
|
|
@@ -2515,7 +2555,7 @@ class MCPServer {
|
|
|
2515
2555
|
});
|
|
2516
2556
|
}
|
|
2517
2557
|
|
|
2518
|
-
headers['User-Agent'] = 'hostinger-mcp-server/0.0.
|
|
2558
|
+
headers['User-Agent'] = 'hostinger-mcp-server/0.0.22';
|
|
2519
2559
|
|
|
2520
2560
|
return headers;
|
|
2521
2561
|
}
|
package/server.ts
CHANGED
|
@@ -64,7 +64,7 @@ const TOOLS: OpenApiTool[] = [
|
|
|
64
64
|
},
|
|
65
65
|
{
|
|
66
66
|
"name": "billing_createNewServiceOrderV1",
|
|
67
|
-
"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.",
|
|
67
|
+
"description": "This endpoint creates a new service order. \n\n**DEPRECATED**\n\nTo purchase a domain, use [`POST /api/domains/v1/portfolio`](/#tag/domains-portfolio/POST/api/domains/v1/portfolio) instead.\n\nTo purchase a VPS, use [`POST /api/vps/v1/virtual-machines`](/#tag/vps-virtual-machine/POST/api/vps/v1/virtual-machines) instead.\n\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.",
|
|
68
68
|
"method": "POST",
|
|
69
69
|
"path": "/api/billing/v1/orders",
|
|
70
70
|
"inputSchema": {
|
|
@@ -755,7 +755,7 @@ const TOOLS: OpenApiTool[] = [
|
|
|
755
755
|
},
|
|
756
756
|
{
|
|
757
757
|
"name": "domains_purchaseNewDomainV1",
|
|
758
|
-
"description": "This endpoint allows you to buy (purchase) and register a new domain name.
|
|
758
|
+
"description": "This endpoint allows you to buy (purchase) and register a new domain name. \n\nIf registration fails, login to [hPanel](https://hpanel.hostinger.com/) and check the domain registration status.\n\nIf no payment method is provided, your default payment method will be used automatically.\n\nIf no WHOIS information is provided, the default contact information for that TLD (Top-Level Domain) will be used. \nBefore making a request, ensure that WHOIS information for the desired TLD exists in your account.\n\nSome TLDs require `additional_details` to be provided and these will be validated before completing the purchase. The required additional details vary by TLD.",
|
|
759
759
|
"method": "POST",
|
|
760
760
|
"path": "/api/domains/v1/portfolio",
|
|
761
761
|
"inputSchema": {
|
|
@@ -771,7 +771,7 @@ const TOOLS: OpenApiTool[] = [
|
|
|
771
771
|
},
|
|
772
772
|
"payment_method_id": {
|
|
773
773
|
"type": "integer",
|
|
774
|
-
"description": "Payment method ID"
|
|
774
|
+
"description": "Payment method ID, default will be used if not provided"
|
|
775
775
|
},
|
|
776
776
|
"domain_contacts": {
|
|
777
777
|
"type": "object",
|
|
@@ -1918,6 +1918,46 @@ const TOOLS: OpenApiTool[] = [
|
|
|
1918
1918
|
}
|
|
1919
1919
|
]
|
|
1920
1920
|
},
|
|
1921
|
+
{
|
|
1922
|
+
"name": "VPS_purchaseNewVirtualMachineV1",
|
|
1923
|
+
"description": "This endpoint allows you to buy (purchase) and setup a new virtual machine.\n\nIf virtual machine setup fails for any reason, login to [hPanel](https://hpanel.hostinger.com/) and complete the setup manually.\n\nIf no payment method is provided, your default payment method will be used automatically. ",
|
|
1924
|
+
"method": "POST",
|
|
1925
|
+
"path": "/api/vps/v1/virtual-machines",
|
|
1926
|
+
"inputSchema": {
|
|
1927
|
+
"type": "object",
|
|
1928
|
+
"properties": {
|
|
1929
|
+
"item_id": {
|
|
1930
|
+
"type": "string",
|
|
1931
|
+
"description": "Catalog price item ID"
|
|
1932
|
+
},
|
|
1933
|
+
"payment_method_id": {
|
|
1934
|
+
"type": "integer",
|
|
1935
|
+
"description": "Payment method ID, default will be used if not provided"
|
|
1936
|
+
},
|
|
1937
|
+
"setup": {
|
|
1938
|
+
"type": "string",
|
|
1939
|
+
"description": "setup parameter"
|
|
1940
|
+
},
|
|
1941
|
+
"coupons": {
|
|
1942
|
+
"type": "array",
|
|
1943
|
+
"description": "Discount coupon codes",
|
|
1944
|
+
"items": {
|
|
1945
|
+
"type": "string",
|
|
1946
|
+
"description": "coupons parameter"
|
|
1947
|
+
}
|
|
1948
|
+
}
|
|
1949
|
+
},
|
|
1950
|
+
"required": [
|
|
1951
|
+
"item_id",
|
|
1952
|
+
"setup"
|
|
1953
|
+
]
|
|
1954
|
+
},
|
|
1955
|
+
"security": [
|
|
1956
|
+
{
|
|
1957
|
+
"apiToken": []
|
|
1958
|
+
}
|
|
1959
|
+
]
|
|
1960
|
+
},
|
|
1921
1961
|
{
|
|
1922
1962
|
"name": "VPS_getScanMetricsV1",
|
|
1923
1963
|
"description": "This endpoint retrieves the scan metrics for the [Monarx](https://www.monarx.com/) malware scanner installed on a specified virtual machine.\nThe scan metrics provide detailed information about the malware scans performed by Monarx, including the number of scans, \ndetected threats, and other relevant statistics. This information is useful for monitoring the security status of the \nvirtual machine and assessing the effectiveness of the malware scanner.",
|
|
@@ -2001,11 +2041,11 @@ const TOOLS: OpenApiTool[] = [
|
|
|
2001
2041
|
},
|
|
2002
2042
|
"date_from": {
|
|
2003
2043
|
"type": "string",
|
|
2004
|
-
"description": "
|
|
2044
|
+
"description": "date_from parameter"
|
|
2005
2045
|
},
|
|
2006
2046
|
"date_to": {
|
|
2007
2047
|
"type": "string",
|
|
2008
|
-
"description": "
|
|
2048
|
+
"description": "date_to parameter"
|
|
2009
2049
|
}
|
|
2010
2050
|
},
|
|
2011
2051
|
"required": [
|
|
@@ -2266,7 +2306,7 @@ const TOOLS: OpenApiTool[] = [
|
|
|
2266
2306
|
},
|
|
2267
2307
|
{
|
|
2268
2308
|
"name": "VPS_setupNewVirtualMachineV1",
|
|
2269
|
-
"description": "This endpoint will setup newly purchased virtual machine
|
|
2309
|
+
"description": "This endpoint will setup newly purchased virtual machine with `initial` state. ",
|
|
2270
2310
|
"method": "POST",
|
|
2271
2311
|
"path": "/api/vps/v1/virtual-machines/{virtualMachineId}/setup",
|
|
2272
2312
|
"inputSchema": {
|
|
@@ -2306,15 +2346,15 @@ const TOOLS: OpenApiTool[] = [
|
|
|
2306
2346
|
},
|
|
2307
2347
|
"ns1": {
|
|
2308
2348
|
"type": "string",
|
|
2309
|
-
"description": "
|
|
2349
|
+
"description": "Name server 1"
|
|
2310
2350
|
},
|
|
2311
2351
|
"ns2": {
|
|
2312
2352
|
"type": "string",
|
|
2313
|
-
"description": "
|
|
2353
|
+
"description": "Name server 2"
|
|
2314
2354
|
},
|
|
2315
2355
|
"public_key": {
|
|
2316
2356
|
"type": "object",
|
|
2317
|
-
"description": "
|
|
2357
|
+
"description": "Use SSH key",
|
|
2318
2358
|
"properties": {
|
|
2319
2359
|
"name": {
|
|
2320
2360
|
"type": "string",
|
|
@@ -2322,7 +2362,7 @@ const TOOLS: OpenApiTool[] = [
|
|
|
2322
2362
|
},
|
|
2323
2363
|
"key": {
|
|
2324
2364
|
"type": "string",
|
|
2325
|
-
"description": "SSH
|
|
2365
|
+
"description": "Contents of the SSH key"
|
|
2326
2366
|
}
|
|
2327
2367
|
}
|
|
2328
2368
|
}
|
|
@@ -2488,7 +2528,7 @@ const SECURITY_SCHEMES: Record<string, SecurityScheme> = {
|
|
|
2488
2528
|
|
|
2489
2529
|
/**
|
|
2490
2530
|
* MCP Server for Hostinger API
|
|
2491
|
-
* Generated from OpenAPI spec version 0.0.
|
|
2531
|
+
* Generated from OpenAPI spec version 0.0.60
|
|
2492
2532
|
*/
|
|
2493
2533
|
class MCPServer {
|
|
2494
2534
|
private server: Server;
|
|
@@ -2510,7 +2550,7 @@ class MCPServer {
|
|
|
2510
2550
|
this.server = new Server(
|
|
2511
2551
|
{
|
|
2512
2552
|
name: "hostinger-api-mcp",
|
|
2513
|
-
version: "0.0.
|
|
2553
|
+
version: "0.0.22",
|
|
2514
2554
|
},
|
|
2515
2555
|
{
|
|
2516
2556
|
capabilities: {
|
|
@@ -2535,7 +2575,7 @@ class MCPServer {
|
|
|
2535
2575
|
});
|
|
2536
2576
|
}
|
|
2537
2577
|
|
|
2538
|
-
headers['User-Agent'] = 'hostinger-mcp-server/0.0.
|
|
2578
|
+
headers['User-Agent'] = 'hostinger-mcp-server/0.0.22';
|
|
2539
2579
|
|
|
2540
2580
|
return headers;
|
|
2541
2581
|
}
|
package/types.d.ts
CHANGED
|
@@ -26,6 +26,13 @@ Prices in catalog items is displayed as cents (without floating point), e.g: flo
|
|
|
26
26
|
/**
|
|
27
27
|
* This endpoint creates a new service order.
|
|
28
28
|
|
|
29
|
+
**DEPRECATED**
|
|
30
|
+
|
|
31
|
+
To purchase a domain, use [`POST /api/domains/v1/portfolio`](/#tag/domains-portfolio/POST/api/domains/v1/portfolio) instead.
|
|
32
|
+
|
|
33
|
+
To purchase a VPS, use [`POST /api/vps/v1/virtual-machines`](/#tag/vps-virtual-machine/POST/api/vps/v1/virtual-machines) instead.
|
|
34
|
+
|
|
35
|
+
|
|
29
36
|
To place order, you need to provide payment method ID and list of price items from the catalog endpoint together with quantity.
|
|
30
37
|
Coupons also can be provided during order creation.
|
|
31
38
|
|
|
@@ -388,7 +395,9 @@ before transferring the domain to another registrar.
|
|
|
388
395
|
};
|
|
389
396
|
|
|
390
397
|
/**
|
|
391
|
-
* This endpoint allows you to buy (purchase) and register a new domain name.
|
|
398
|
+
* This endpoint allows you to buy (purchase) and register a new domain name.
|
|
399
|
+
|
|
400
|
+
If registration fails, login to [hPanel](https://hpanel.hostinger.com/) and check the domain registration status.
|
|
392
401
|
|
|
393
402
|
If no payment method is provided, your default payment method will be used automatically.
|
|
394
403
|
|
|
@@ -408,7 +417,7 @@ Some TLDs require `additional_details` to be provided and these will be validate
|
|
|
408
417
|
*/
|
|
409
418
|
item_id: string;
|
|
410
419
|
/**
|
|
411
|
-
* Payment method ID
|
|
420
|
+
* Payment method ID, default will be used if not provided
|
|
412
421
|
*/
|
|
413
422
|
payment_method_id?: number;
|
|
414
423
|
/**
|
|
@@ -1109,6 +1118,35 @@ you need to point your domain A/AAAA records to virtual machine IP as well.
|
|
|
1109
1118
|
response: any; // Response structure will depend on the API
|
|
1110
1119
|
};
|
|
1111
1120
|
|
|
1121
|
+
/**
|
|
1122
|
+
* This endpoint allows you to buy (purchase) and setup a new virtual machine.
|
|
1123
|
+
|
|
1124
|
+
If virtual machine setup fails for any reason, login to [hPanel](https://hpanel.hostinger.com/) and complete the setup manually.
|
|
1125
|
+
|
|
1126
|
+
If no payment method is provided, your default payment method will be used automatically.
|
|
1127
|
+
*/
|
|
1128
|
+
"undefined": {
|
|
1129
|
+
params: {
|
|
1130
|
+
/**
|
|
1131
|
+
* Catalog price item ID
|
|
1132
|
+
*/
|
|
1133
|
+
item_id: string;
|
|
1134
|
+
/**
|
|
1135
|
+
* Payment method ID, default will be used if not provided
|
|
1136
|
+
*/
|
|
1137
|
+
payment_method_id?: number;
|
|
1138
|
+
/**
|
|
1139
|
+
* setup parameter
|
|
1140
|
+
*/
|
|
1141
|
+
setup: string;
|
|
1142
|
+
/**
|
|
1143
|
+
* Discount coupon codes
|
|
1144
|
+
*/
|
|
1145
|
+
coupons?: array;
|
|
1146
|
+
};
|
|
1147
|
+
response: any; // Response structure will depend on the API
|
|
1148
|
+
};
|
|
1149
|
+
|
|
1112
1150
|
/**
|
|
1113
1151
|
* This endpoint retrieves the scan metrics for the [Monarx](https://www.monarx.com/) malware scanner installed on a specified virtual machine.
|
|
1114
1152
|
The scan metrics provide detailed information about the malware scans performed by Monarx, including the number of scans,
|
|
@@ -1171,11 +1209,11 @@ It includes the following metrics:
|
|
|
1171
1209
|
*/
|
|
1172
1210
|
virtualMachineId: number;
|
|
1173
1211
|
/**
|
|
1174
|
-
*
|
|
1212
|
+
* date_from parameter
|
|
1175
1213
|
*/
|
|
1176
1214
|
date_from: string;
|
|
1177
1215
|
/**
|
|
1178
|
-
*
|
|
1216
|
+
* date_to parameter
|
|
1179
1217
|
*/
|
|
1180
1218
|
date_to: string;
|
|
1181
1219
|
};
|
|
@@ -1358,8 +1396,7 @@ Requirements for the password is the same as in the [recreate virtual machine en
|
|
|
1358
1396
|
};
|
|
1359
1397
|
|
|
1360
1398
|
/**
|
|
1361
|
-
* This endpoint will setup newly purchased virtual machine
|
|
1362
|
-
New virtual machine can be purchased using [`/api/billing/v1/orders`](/#tag/billing-orders/POST/api/billing/v1/orders) endpoint.
|
|
1399
|
+
* This endpoint will setup newly purchased virtual machine with `initial` state.
|
|
1363
1400
|
*/
|
|
1364
1401
|
"undefined": {
|
|
1365
1402
|
params: {
|
|
@@ -1396,15 +1433,15 @@ New virtual machine can be purchased using [`/api/billing/v1/orders`](/#tag/bill
|
|
|
1396
1433
|
*/
|
|
1397
1434
|
enable_backups?: boolean;
|
|
1398
1435
|
/**
|
|
1399
|
-
*
|
|
1436
|
+
* Name server 1
|
|
1400
1437
|
*/
|
|
1401
1438
|
ns1?: string;
|
|
1402
1439
|
/**
|
|
1403
|
-
*
|
|
1440
|
+
* Name server 2
|
|
1404
1441
|
*/
|
|
1405
1442
|
ns2?: string;
|
|
1406
1443
|
/**
|
|
1407
|
-
*
|
|
1444
|
+
* Use SSH key
|
|
1408
1445
|
*/
|
|
1409
1446
|
public_key?: object;
|
|
1410
1447
|
};
|