hostinger-api-mcp 0.0.13 → 0.0.15

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 (5) hide show
  1. package/README.md +198 -5
  2. package/package.json +1 -1
  3. package/server.js +430 -11
  4. package/server.ts +430 -11
  5. package/types.d.ts +276 -8
package/server.ts CHANGED
@@ -67,7 +67,7 @@ const TOOLS: OpenApiTool[] = [
67
67
  },
68
68
  "coupons": {
69
69
  "type": "array",
70
- "description": "coupons property"
70
+ "description": "Discount coupon codes"
71
71
  }
72
72
  },
73
73
  "required": [
@@ -416,15 +416,15 @@ const TOOLS: OpenApiTool[] = [
416
416
  "properties": {
417
417
  "domain": {
418
418
  "type": "string",
419
- "description": "domain property"
419
+ "description": "Domain name without TLD"
420
420
  },
421
421
  "tlds": {
422
422
  "type": "array",
423
- "description": "tlds property"
423
+ "description": "TLDs to check (without trailing dot)"
424
424
  },
425
425
  "with_alternatives": {
426
426
  "type": "boolean",
427
- "description": "with_alternatives property"
427
+ "description": "Should response include alternatives"
428
428
  }
429
429
  },
430
430
  "required": [
@@ -438,6 +438,158 @@ const TOOLS: OpenApiTool[] = [
438
438
  }
439
439
  ]
440
440
  },
441
+ {
442
+ "name": "domains_getForwardingDataV1",
443
+ "description": "This endpoint retrieves domain forwarding data.",
444
+ "method": "GET",
445
+ "path": "/api/domains/v1/forwarding/{domain}",
446
+ "inputSchema": {
447
+ "type": "object",
448
+ "properties": {
449
+ "domain": {
450
+ "type": "string",
451
+ "description": "Domain name"
452
+ }
453
+ },
454
+ "required": [
455
+ "domain"
456
+ ]
457
+ },
458
+ "security": [
459
+ {
460
+ "apiToken": []
461
+ }
462
+ ]
463
+ },
464
+ {
465
+ "name": "domains_deleteForwardingDataV1",
466
+ "description": "This endpoint deletes domain forwarding data.",
467
+ "method": "DELETE",
468
+ "path": "/api/domains/v1/forwarding/{domain}",
469
+ "inputSchema": {
470
+ "type": "object",
471
+ "properties": {
472
+ "domain": {
473
+ "type": "string",
474
+ "description": "Domain name"
475
+ }
476
+ },
477
+ "required": [
478
+ "domain"
479
+ ]
480
+ },
481
+ "security": [
482
+ {
483
+ "apiToken": []
484
+ }
485
+ ]
486
+ },
487
+ {
488
+ "name": "domains_createForwardingDataV1",
489
+ "description": "This endpoint creates domain forwarding data.",
490
+ "method": "POST",
491
+ "path": "/api/domains/v1/forwarding",
492
+ "inputSchema": {
493
+ "type": "object",
494
+ "properties": {
495
+ "domain": {
496
+ "type": "string",
497
+ "description": "Domain name"
498
+ },
499
+ "redirect_type": {
500
+ "type": "string",
501
+ "description": "Redirect type",
502
+ "enum": [
503
+ "301",
504
+ "302"
505
+ ]
506
+ },
507
+ "redirect_url": {
508
+ "type": "string",
509
+ "description": "URL to forward domain to"
510
+ }
511
+ },
512
+ "required": [
513
+ "domain",
514
+ "redirect_type",
515
+ "redirect_url"
516
+ ]
517
+ },
518
+ "security": [
519
+ {
520
+ "apiToken": []
521
+ }
522
+ ]
523
+ },
524
+ {
525
+ "name": "domains_enableDomainLockV1",
526
+ "description": "This endpoint enables domain lock for the domain. When domain lock is enabled, \nthe domain cannot be transferred to another registrar without first disabling the lock.",
527
+ "method": "PUT",
528
+ "path": "/api/domains/v1/portfolio/{domain}/domain-lock",
529
+ "inputSchema": {
530
+ "type": "object",
531
+ "properties": {
532
+ "domain": {
533
+ "type": "string",
534
+ "description": "Domain name"
535
+ }
536
+ },
537
+ "required": [
538
+ "domain"
539
+ ]
540
+ },
541
+ "security": [
542
+ {
543
+ "apiToken": []
544
+ }
545
+ ]
546
+ },
547
+ {
548
+ "name": "domains_disableDomainLockV1",
549
+ "description": "This endpoint disables domain lock for the domain. Domain lock needs to be disabled \nbefore transferring the domain to another registrar.",
550
+ "method": "DELETE",
551
+ "path": "/api/domains/v1/portfolio/{domain}/domain-lock",
552
+ "inputSchema": {
553
+ "type": "object",
554
+ "properties": {
555
+ "domain": {
556
+ "type": "string",
557
+ "description": "Domain name"
558
+ }
559
+ },
560
+ "required": [
561
+ "domain"
562
+ ]
563
+ },
564
+ "security": [
565
+ {
566
+ "apiToken": []
567
+ }
568
+ ]
569
+ },
570
+ {
571
+ "name": "domains_getDomainV1",
572
+ "description": "This endpoint retrieves details for specified domain.",
573
+ "method": "GET",
574
+ "path": "/api/domains/v1/portfolio/{domain}",
575
+ "inputSchema": {
576
+ "type": "object",
577
+ "properties": {
578
+ "domain": {
579
+ "type": "string",
580
+ "description": "Domain name"
581
+ }
582
+ },
583
+ "required": [
584
+ "domain"
585
+ ]
586
+ },
587
+ "security": [
588
+ {
589
+ "apiToken": []
590
+ }
591
+ ]
592
+ },
441
593
  {
442
594
  "name": "domains_getDomainListV1",
443
595
  "description": "This endpoint retrieves a list of all domains associated with your account.",
@@ -454,6 +606,273 @@ const TOOLS: OpenApiTool[] = [
454
606
  }
455
607
  ]
456
608
  },
609
+ {
610
+ "name": "domains_purchaseNewDomainV1",
611
+ "description": "This endpoint purchases and registers new domain. If registration fails, login to hPanel and check the domain registration status.\n\nIf no payment method is provided, default will be used.\n\nIf no WHOIS information is provided, default for that TLD will be used. \nBefore making request make sure that WHOIS information for TLD exists.\n\nSome TLDs require `additional_details` to be provided and will be validated before making purchase.",
612
+ "method": "POST",
613
+ "path": "/api/domains/v1/portfolio",
614
+ "inputSchema": {
615
+ "type": "object",
616
+ "properties": {
617
+ "domain": {
618
+ "type": "string",
619
+ "description": "Domain name"
620
+ },
621
+ "item_id": {
622
+ "type": "string",
623
+ "description": "Catalog price item ID"
624
+ },
625
+ "payment_method_id": {
626
+ "type": "integer",
627
+ "description": "Payment method ID"
628
+ },
629
+ "domain_contacts": {
630
+ "type": "object",
631
+ "description": "Domain contact information"
632
+ },
633
+ "additional_details": {
634
+ "type": "object",
635
+ "description": "Additional registration data, possible values depends on TLD"
636
+ },
637
+ "coupons": {
638
+ "type": "array",
639
+ "description": "Discount coupon codes"
640
+ }
641
+ },
642
+ "required": [
643
+ "domain",
644
+ "item_id"
645
+ ]
646
+ },
647
+ "security": [
648
+ {
649
+ "apiToken": []
650
+ }
651
+ ]
652
+ },
653
+ {
654
+ "name": "domains_enablePrivacyProtectionV1",
655
+ "description": "This endpoint enables privacy protection for the domain.\nWhen privacy protection is enabled, the domain owner's personal information is hidden from the public WHOIS database.",
656
+ "method": "PUT",
657
+ "path": "/api/domains/v1/portfolio/{domain}/privacy-protection",
658
+ "inputSchema": {
659
+ "type": "object",
660
+ "properties": {
661
+ "domain": {
662
+ "type": "string",
663
+ "description": "Domain name"
664
+ }
665
+ },
666
+ "required": [
667
+ "domain"
668
+ ]
669
+ },
670
+ "security": [
671
+ {
672
+ "apiToken": []
673
+ }
674
+ ]
675
+ },
676
+ {
677
+ "name": "domains_disablePrivacyProtectionV1",
678
+ "description": "This endpoint disables privacy protection for the domain.\nWhen privacy protection is disabled, the domain owner's personal information is visible in the public WHOIS database.",
679
+ "method": "DELETE",
680
+ "path": "/api/domains/v1/portfolio/{domain}/privacy-protection",
681
+ "inputSchema": {
682
+ "type": "object",
683
+ "properties": {
684
+ "domain": {
685
+ "type": "string",
686
+ "description": "Domain name"
687
+ }
688
+ },
689
+ "required": [
690
+ "domain"
691
+ ]
692
+ },
693
+ "security": [
694
+ {
695
+ "apiToken": []
696
+ }
697
+ ]
698
+ },
699
+ {
700
+ "name": "domains_updateNameserversV1",
701
+ "description": "This endpoint sets the nameservers for a specified domain.\n\nBe aware, that improper nameserver configuration can lead to the domain being unresolvable or unavailable. ",
702
+ "method": "PUT",
703
+ "path": "/api/domains/v1/portfolio/{domain}/nameservers",
704
+ "inputSchema": {
705
+ "type": "object",
706
+ "properties": {
707
+ "domain": {
708
+ "type": "string",
709
+ "description": "Domain name"
710
+ },
711
+ "ns1": {
712
+ "type": "string",
713
+ "description": "First name server"
714
+ },
715
+ "ns2": {
716
+ "type": "string",
717
+ "description": "Second name server"
718
+ },
719
+ "ns3": {
720
+ "type": "string",
721
+ "description": "Third name server"
722
+ },
723
+ "ns4": {
724
+ "type": "string",
725
+ "description": "Fourth name server"
726
+ }
727
+ },
728
+ "required": [
729
+ "domain",
730
+ "ns1",
731
+ "ns2"
732
+ ]
733
+ },
734
+ "security": [
735
+ {
736
+ "apiToken": []
737
+ }
738
+ ]
739
+ },
740
+ {
741
+ "name": "domains_getWHOISProfileV1",
742
+ "description": "This endpoint retrieves a WHOIS contact profile.",
743
+ "method": "GET",
744
+ "path": "/api/domains/v1/whois/{whoisId}",
745
+ "inputSchema": {
746
+ "type": "object",
747
+ "properties": {
748
+ "whoisId": {
749
+ "type": "integer",
750
+ "description": "WHOIS ID"
751
+ }
752
+ },
753
+ "required": [
754
+ "whoisId"
755
+ ]
756
+ },
757
+ "security": [
758
+ {
759
+ "apiToken": []
760
+ }
761
+ ]
762
+ },
763
+ {
764
+ "name": "domains_deleteWHOISProfileV1",
765
+ "description": "This endpoint deletes WHOIS contact profile.",
766
+ "method": "DELETE",
767
+ "path": "/api/domains/v1/whois/{whoisId}",
768
+ "inputSchema": {
769
+ "type": "object",
770
+ "properties": {
771
+ "whoisId": {
772
+ "type": "integer",
773
+ "description": "WHOIS ID"
774
+ }
775
+ },
776
+ "required": [
777
+ "whoisId"
778
+ ]
779
+ },
780
+ "security": [
781
+ {
782
+ "apiToken": []
783
+ }
784
+ ]
785
+ },
786
+ {
787
+ "name": "domains_getWHOISProfileListV1",
788
+ "description": "This endpoint retrieves a list of WHOIS contact profiles.",
789
+ "method": "GET",
790
+ "path": "/api/domains/v1/whois",
791
+ "inputSchema": {
792
+ "type": "object",
793
+ "properties": {
794
+ "tld": {
795
+ "type": "string",
796
+ "description": "Filter by TLD (without trailing dot)"
797
+ }
798
+ },
799
+ "required": []
800
+ },
801
+ "security": [
802
+ {
803
+ "apiToken": []
804
+ }
805
+ ]
806
+ },
807
+ {
808
+ "name": "domains_createWHOISProfileV1",
809
+ "description": "This endpoint creates WHOIS contact profile.",
810
+ "method": "POST",
811
+ "path": "/api/domains/v1/whois",
812
+ "inputSchema": {
813
+ "type": "object",
814
+ "properties": {
815
+ "tld": {
816
+ "type": "string",
817
+ "description": "TLD of the domain (without trailing dot)"
818
+ },
819
+ "country": {
820
+ "type": "string",
821
+ "description": "ISO 3166 2-letter country code"
822
+ },
823
+ "entity_type": {
824
+ "type": "string",
825
+ "description": "Legal entity type",
826
+ "enum": [
827
+ "individual",
828
+ "organization"
829
+ ]
830
+ },
831
+ "tld_details": {
832
+ "type": "object",
833
+ "description": "TLD details"
834
+ },
835
+ "whois_details": {
836
+ "type": "object",
837
+ "description": "WHOIS details"
838
+ }
839
+ },
840
+ "required": [
841
+ "tld",
842
+ "entity_type",
843
+ "country",
844
+ "whois_details"
845
+ ]
846
+ },
847
+ "security": [
848
+ {
849
+ "apiToken": []
850
+ }
851
+ ]
852
+ },
853
+ {
854
+ "name": "domains_getWHOISProfileUsageV1",
855
+ "description": "This endpoint retrieves a domain list where provided WHOIS contact profile is used.",
856
+ "method": "GET",
857
+ "path": "/api/domains/v1/whois/{whoisId}/usage",
858
+ "inputSchema": {
859
+ "type": "object",
860
+ "properties": {
861
+ "whoisId": {
862
+ "type": "integer",
863
+ "description": "WHOIS ID"
864
+ }
865
+ },
866
+ "required": [
867
+ "whoisId"
868
+ ]
869
+ },
870
+ "security": [
871
+ {
872
+ "apiToken": []
873
+ }
874
+ ]
875
+ },
457
876
  {
458
877
  "name": "VPS_getDataCentersListV1",
459
878
  "description": "This endpoint retrieves a list of all data centers available.",
@@ -1186,13 +1605,13 @@ const TOOLS: OpenApiTool[] = [
1186
1605
  "inputSchema": {
1187
1606
  "type": "object",
1188
1607
  "properties": {
1189
- "page": {
1190
- "type": "integer",
1191
- "description": "Page number"
1192
- },
1193
1608
  "virtualMachineId": {
1194
1609
  "type": "integer",
1195
1610
  "description": "Virtual Machine ID"
1611
+ },
1612
+ "page": {
1613
+ "type": "integer",
1614
+ "description": "Page number"
1196
1615
  }
1197
1616
  },
1198
1617
  "required": [
@@ -1883,7 +2302,7 @@ const SECURITY_SCHEMES: Record<string, SecurityScheme> = {
1883
2302
 
1884
2303
  /**
1885
2304
  * MCP Server for Hostinger API
1886
- * Generated from OpenAPI spec version 0.0.27
2305
+ * Generated from OpenAPI spec version 0.0.37
1887
2306
  */
1888
2307
  class MCPServer {
1889
2308
  private server: Server;
@@ -1905,7 +2324,7 @@ class MCPServer {
1905
2324
  this.server = new Server(
1906
2325
  {
1907
2326
  name: "hostinger-api-mcp",
1908
- version: "0.0.13",
2327
+ version: "0.0.15",
1909
2328
  },
1910
2329
  {
1911
2330
  capabilities: {
@@ -1930,7 +2349,7 @@ class MCPServer {
1930
2349
  });
1931
2350
  }
1932
2351
 
1933
- headers['User-Agent'] = 'hostinger-mcp-server/0.0.13';
2352
+ headers['User-Agent'] = 'hostinger-mcp-server/0.0.15';
1934
2353
 
1935
2354
  return headers;
1936
2355
  }