Skip to content

Commit 7580082

Browse files
committed
chore: mcp server update
1 parent 79146e1 commit 7580082

File tree

5 files changed

+188
-45
lines changed

5 files changed

+188
-45
lines changed

README.md

Lines changed: 35 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -136,6 +136,13 @@ Prices in catalog items is displayed as cents (without floating point), e.g: flo
136136

137137
This endpoint creates a new service order.
138138

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+
139146
To place order, you need to provide payment method ID and list of price items from the catalog endpoint together with quantity.
140147
Coupons also can be provided during order creation.
141148

@@ -412,7 +419,9 @@ This endpoint retrieves a list of all domains associated with your account.
412419

413420
### domains_purchaseNewDomainV1
414421

415-
This endpoint allows you to buy (purchase) and register a new domain name. If registration fails, login to hPanel and check the domain registration status.
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.
416425

417426
If no payment method is provided, your default payment method will be used automatically.
418427

@@ -428,7 +437,7 @@ Some TLDs require `additional_details` to be provided and these will be validate
428437

429438
- `domain`: Domain name (required)
430439
- `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
432441
- `domain_contacts`: Domain contact information
433442
- `additional_details`: Additional registration data, possible values depends on TLD
434443
- `coupons`: Discount coupon codes
@@ -939,6 +948,24 @@ This endpoint retrieves a list of all available virtual machines.
939948

940949

941950

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+
942969
### VPS_getScanMetricsV1
943970

944971
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:
9951022
**Parameters**:
9961023

9971024
- `virtualMachineId`: Virtual Machine ID (required)
998-
- `date_from`: the date-time notation as defined by RFC 3339, section 5.6 (required)
999-
- `date_to`: the date-time notation as defined by RFC 3339, section 5.6 (required)
1025+
- `date_from`: date_from parameter (required)
1026+
- `date_to`: date_to parameter (required)
10001027

10011028
### VPS_setNameserversV1
10021029

@@ -1133,8 +1160,7 @@ Requirements for the password is the same as in the [recreate virtual machine en
11331160

11341161
### VPS_setupNewVirtualMachineV1
11351162

1136-
This endpoint will setup newly purchased virtual machine. Such virtual machines has `initial` state.
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.
11381164

11391165
- **Method**: `POST`
11401166
- **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
11491175
- `hostname`: Override default hostname of the virtual machine
11501176
- `install_monarx`: Install Monarx malware scanner (if supported)
11511177
- `enable_backups`: Enable weekly backup schedule
1152-
- `ns1`: ns1 parameter
1153-
- `ns2`: ns2 parameter
1154-
- `public_key`: public_key parameter
1178+
- `ns1`: Name server 1
1179+
- `ns2`: Name server 2
1180+
- `public_key`: Use SSH key
11551181

11561182
### VPS_getSnapshotV1
11571183

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "hostinger-api-mcp",
3-
"version": "0.0.21",
3+
"version": "0.0.22",
44
"description": "MCP server for Hostinger API",
55
"repository": {
66
"type": "git",

server.js

Lines changed: 53 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ const TOOLS = [
4848
},
4949
{
5050
"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.",
5252
"method": "POST",
5353
"path": "/api/billing/v1/orders",
5454
"inputSchema": {
@@ -739,7 +739,7 @@ const TOOLS = [
739739
},
740740
{
741741
"name": "domains_purchaseNewDomainV1",
742-
"description": "This endpoint allows you to buy (purchase) and register a new domain name. If registration fails, login to hPanel 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.",
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.",
743743
"method": "POST",
744744
"path": "/api/domains/v1/portfolio",
745745
"inputSchema": {
@@ -755,7 +755,7 @@ const TOOLS = [
755755
},
756756
"payment_method_id": {
757757
"type": "integer",
758-
"description": "Payment method ID"
758+
"description": "Payment method ID, default will be used if not provided"
759759
},
760760
"domain_contacts": {
761761
"type": "object",
@@ -1902,6 +1902,46 @@ const TOOLS = [
19021902
}
19031903
]
19041904
},
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+
},
19051945
{
19061946
"name": "VPS_getScanMetricsV1",
19071947
"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 = [
19852025
},
19862026
"date_from": {
19872027
"type": "string",
1988-
"description": "the date-time notation as defined by RFC 3339, section 5.6"
2028+
"description": "date_from parameter"
19892029
},
19902030
"date_to": {
19912031
"type": "string",
1992-
"description": "the date-time notation as defined by RFC 3339, section 5.6"
2032+
"description": "date_to parameter"
19932033
}
19942034
},
19952035
"required": [
@@ -2250,7 +2290,7 @@ const TOOLS = [
22502290
},
22512291
{
22522292
"name": "VPS_setupNewVirtualMachineV1",
2253-
"description": "This endpoint will setup newly purchased virtual machine. Such virtual machines has `initial` state. \nNew virtual machine can be purchased using [`/api/billing/v1/orders`](/#tag/billing-orders/POST/api/billing/v1/orders) endpoint. ",
2293+
"description": "This endpoint will setup newly purchased virtual machine with `initial` state. ",
22542294
"method": "POST",
22552295
"path": "/api/vps/v1/virtual-machines/{virtualMachineId}/setup",
22562296
"inputSchema": {
@@ -2290,23 +2330,23 @@ const TOOLS = [
22902330
},
22912331
"ns1": {
22922332
"type": "string",
2293-
"description": "ns1 parameter"
2333+
"description": "Name server 1"
22942334
},
22952335
"ns2": {
22962336
"type": "string",
2297-
"description": "ns2 parameter"
2337+
"description": "Name server 2"
22982338
},
22992339
"public_key": {
23002340
"type": "object",
2301-
"description": "public_key parameter",
2341+
"description": "Use SSH key",
23022342
"properties": {
23032343
"name": {
23042344
"type": "string",
23052345
"description": "Name of the SSH key"
23062346
},
23072347
"key": {
23082348
"type": "string",
2309-
"description": "SSH public key"
2349+
"description": "Contents of the SSH key"
23102350
}
23112351
}
23122352
}
@@ -2472,7 +2512,7 @@ const SECURITY_SCHEMES = {
24722512

24732513
/**
24742514
* MCP Server for Hostinger API
2475-
* Generated from OpenAPI spec version 0.0.46
2515+
* Generated from OpenAPI spec version 0.0.60
24762516
*/
24772517
class MCPServer {
24782518
constructor() {
@@ -2490,7 +2530,7 @@ class MCPServer {
24902530
this.server = new Server(
24912531
{
24922532
name: "hostinger-api-mcp",
2493-
version: "0.0.21",
2533+
version: "0.0.22",
24942534
},
24952535
{
24962536
capabilities: {
@@ -2515,7 +2555,7 @@ class MCPServer {
25152555
});
25162556
}
25172557

2518-
headers['User-Agent'] = 'hostinger-mcp-server/0.0.21';
2558+
headers['User-Agent'] = 'hostinger-mcp-server/0.0.22';
25192559

25202560
return headers;
25212561
}

0 commit comments

Comments
 (0)