mcpField
H
hostinger-tools

hostinger-tools

github.com/bsamieeクラウド・DevOps298 回インストール6 日前に更新
リポジトリ

hostinger-tools について

hostinger-toolsは、Pythonラッパー経由でHostinger APIを操作するスキルです。VPS、ホスティング、ドメイン、DNS、請求をコマンドラインから管理する運用担当者向けです。

主な機能

  1. 01VPSの状態と設定の管理
  2. 02Dockerプロジェクトの確認と操作
  3. 03ファイアウォールとSSHキーの設定
  4. 04スナップショットとバックアップの管理
  5. 05ドメイン、DNS、請求の管理

活用シーン

  1. 01VPSを再起動してメトリクスを確認
  2. 02ファイアウォールルールを作成してSSHキーを関連付け
  3. 03DNSレコードの確認やドメイン転送の設定
  4. 04サブスクリプションの確認と支払い方法の設定

MCP 対応

READMEではHostingerが別途MCPサーバーを提供すると記載されています。このスキル自体はPythonラッパーを通じてHostinger APIを呼び出します。

インストール

コマンドをコピーしてターミナルで実行します。

$npx skills add https://github.com/bsamiee/parametric_forge --skill hostinger-tools

インストール後、Claude Code で/hostinger-toolsを入力して読み込まれたか確認します。

同梱ファイル

SKILL.md と一緒にインストールされる参考資料やスクリプト。

scripts/
_billing_dispatch.py
_dns_dispatch.py
_docker_dispatch.py
_vps_dispatch.py
hostinger.py

詳細

[H1][HOSTINGER-TOOLS]

HOSTINGER_TOKEN 環境変数を使用し、Python ラッパー経由で Hostinger API を呼び出します。ベース URL:https://developers.hostinger.com。

[IMPORTANT] 引数なしのコマンドは、デフォルトで page=1、limit=30 を使用します。フラグには --key value 構文を使用します。Hostinger は自動化用の MCP サーバーと n8n ノードも提供しています。

[01]-[VPS_CORE]

uv run $CLAUDE_HOME/skills/hostinger-tools/scripts/hostinger.py vps-list
uv run $CLAUDE_HOME/skills/hostinger-tools/scripts/hostinger.py vps-view --id 1196440
uv run $CLAUDE_HOME/skills/hostinger-tools/scripts/hostinger.py vps-start --id 1196440
uv run $CLAUDE_HOME/skills/hostinger-tools/scripts/hostinger.py vps-stop --id 1196440
uv run $CLAUDE_HOME/skills/hostinger-tools/scripts/hostinger.py vps-restart --id 1196440
uv run $CLAUDE_HOME/skills/hostinger-tools/scripts/hostinger.py vps-metrics --id 1196440 --from 2025-01-01 --to 2025-01-07
uv run $CLAUDE_HOME/skills/hostinger-tools/scripts/hostinger.py vps-actions --id 1196440
uv run $CLAUDE_HOME/skills/hostinger-tools/scripts/hostinger.py vps-action-view --id 1196440 --action-id 71183700

[02]-[VPS_CONFIG]

uv run $CLAUDE_HOME/skills/hostinger-tools/scripts/hostinger.py vps-hostname-set --id 1196440 --hostname myserver.example.com
uv run $CLAUDE_HOME/skills/hostinger-tools/scripts/hostinger.py vps-hostname-reset --id 1196440
uv run $CLAUDE_HOME/skills/hostinger-tools/scripts/hostinger.py vps-nameservers-set --id 1196440 --ns1 8.8.8.8 --ns2 8.8.4.4
uv run $CLAUDE_HOME/skills/hostinger-tools/scripts/hostinger.py vps-password-set --id 1196440 --password "SecurePass123!"
uv run $CLAUDE_HOME/skills/hostinger-tools/scripts/hostinger.py vps-panel-password-set --id 1196440 --password "PanelPass123!"
uv run $CLAUDE_HOME/skills/hostinger-tools/scripts/hostinger.py vps-ptr-create --id 1196440 --ip-id 1154886 --domain mail.example.com
uv run $CLAUDE_HOME/skills/hostinger-tools/scripts/hostinger.py vps-ptr-delete --id 1196440 --ip-id 1154886

[03]-[VPS_RECOVERY]

uv run $CLAUDE_HOME/skills/hostinger-tools/scripts/hostinger.py vps-recovery-start --id 1196440 --root-password "TempPass123!"
uv run $CLAUDE_HOME/skills/hostinger-tools/scripts/hostinger.py vps-recovery-stop --id 1196440
uv run $CLAUDE_HOME/skills/hostinger-tools/scripts/hostinger.py vps-recreate --id 1196440 --template-id 1007 --password "NewPass123!"

[04]-[DOCKER]

uv run $CLAUDE_HOME/skills/hostinger-tools/scripts/hostinger.py docker-list --id 1196440
uv run $CLAUDE_HOME/skills/hostinger-tools/scripts/hostinger.py docker-view --id 1196440 --project myapp
uv run $CLAUDE_HOME/skills/hostinger-tools/scripts/hostinger.py docker-containers --id 1196440 --project myapp
uv run $CLAUDE_HOME/skills/hostinger-tools/scripts/hostinger.py docker-logs --id 1196440 --project myapp
uv run $CLAUDE_HOME/skills/hostinger-tools/scripts/hostinger.py docker-create --id 1196440 --project myapp --content "version: '3'..."
uv run $CLAUDE_HOME/skills/hostinger-tools/scripts/hostinger.py docker-start --id 1196440 --project myapp
uv run $CLAUDE_HOME/skills/hostinger-tools/scripts/hostinger.py docker-stop --id 1196440 --project myapp
uv run $CLAUDE_HOME/skills/hostinger-tools/scripts/hostinger.py docker-restart --id 1196440 --project myapp
uv run $CLAUDE_HOME/skills/hostinger-tools/scripts/hostinger.py docker-update --id 1196440 --project myapp
uv run $CLAUDE_HOME/skills/hostinger-tools/scripts/hostinger.py docker-delete --id 1196440 --project myapp

[05]-[FIREWALL]

uv run $CLAUDE_HOME/skills/hostinger-tools/scripts/hostinger.py firewall-list
uv run $CLAUDE_HOME/skills/hostinger-tools/scripts/hostinger.py firewall-view --id 12345
uv run $CLAUDE_HOME/skills/hostinger-tools/scripts/hostinger.py firewall-create --name "Web Server"
uv run $CLAUDE_HOME/skills/hostinger-tools/scripts/hostinger.py firewall-delete --id 12345
uv run $CLAUDE_HOME/skills/hostinger-tools/scripts/hostinger.py firewall-activate --firewall-id 12345 --vps-id 1196440
uv run $CLAUDE_HOME/skills/hostinger-tools/scripts/hostinger.py firewall-deactivate --firewall-id 12345 --vps-id 1196440
uv run $CLAUDE_HOME/skills/hostinger-tools/scripts/hostinger.py firewall-sync --firewall-id 12345 --vps-id 1196440
uv run $CLAUDE_HOME/skills/hostinger-tools/scripts/hostinger.py firewall-rule-create --id 12345 --protocol SSH --port 22 --source any --source-detail any
uv run $CLAUDE_HOME/skills/hostinger-tools/scripts/hostinger.py firewall-rule-update --id 12345 --rule-id 67890 --protocol TCP --port 443 --source any --source-detail any
uv run $CLAUDE_HOME/skills/hostinger-tools/scripts/hostinger.py firewall-rule-delete --id 12345 --rule-id 67890

[06]-[SSH_KEYS]

uv run $CLAUDE_HOME/skills/hostinger-tools/scripts/hostinger.py ssh-key-list
uv run $CLAUDE_HOME/skills/hostinger-tools/scripts/hostinger.py ssh-key-create --name "MacBook" --key "ssh-ed25519 AAAA..."
uv run $CLAUDE_HOME/skills/hostinger-tools/scripts/hostinger.py ssh-key-delete --id 380228
uv run $CLAUDE_HOME/skills/hostinger-tools/scripts/hostinger.py ssh-key-attach --key-ids 380228 --vps-id 1196440
uv run $CLAUDE_HOME/skills/hostinger-tools/scripts/hostinger.py ssh-key-attached --vps-id 1196440

[07]-[SCRIPTS]

uv run $CLAUDE_HOME/skills/hostinger-tools/scripts/hostinger.py script-list
uv run $CLAUDE_HOME/skills/hostinger-tools/scripts/hostinger.py script-view --id 12345
uv run $CLAUDE_HOME/skills/hostinger-tools/scripts/hostinger.py script-create --name "Setup" --content "#!/bin/bash\napt update"
uv run $CLAUDE_HOME/skills/hostinger-tools/scripts/hostinger.py script-update --id 12345 --name "Setup v2" --content "#!/bin/bash\napt upgrade"
uv run $CLAUDE_HOME/skills/hostinger-tools/scripts/hostinger.py script-delete --id 12345

[08]-[SNAPSHOTS]

uv run $CLAUDE_HOME/skills/hostinger-tools/scripts/hostinger.py snapshot-view --id 1196440
uv run $CLAUDE_HOME/skills/hostinger-tools/scripts/hostinger.py snapshot-create --id 1196440
uv run $CLAUDE_HOME/skills/hostinger-tools/scripts/hostinger.py snapshot-delete --id 1196440
uv run $CLAUDE_HOME/skills/hostinger-tools/scripts/hostinger.py snapshot-restore --id 1196440
uv run $CLAUDE_HOME/skills/hostinger-tools/scripts/hostinger.py backup-list --id 1196440
uv run $CLAUDE_HOME/skills/hostinger-tools/scripts/hostinger.py backup-restore --id 1196440 --backup-id 67890

[09]-[DNS]

uv run $CLAUDE_HOME/skills/hostinger-tools/scripts/hostinger.py dns-records --domain example.com
uv run $CLAUDE_HOME/skills/hostinger-tools/scripts/hostinger.py dns-snapshots --domain example.com

[10]-[DOMAINS]

uv run $CLAUDE_HOME/skills/hostinger-tools/scripts/hostinger.py domain-list
uv run $CLAUDE_HOME/skills/hostinger-tools/scripts/hostinger.py domain-view --domain example.com
uv run $CLAUDE_HOME/skills/hostinger-tools/scripts/hostinger.py domain-check --domain example --tlds com,net,io

[11]-[DOMAIN_EXTENDED]

uv run $CLAUDE_HOME/skills/hostinger-tools/scripts/hostinger.py domain-lock-enable --domain example.com
uv run $CLAUDE_HOME/skills/hostinger-tools/scripts/hostinger.py domain-lock-disable --domain example.com
uv run $CLAUDE_HOME/skills/hostinger-tools/scripts/hostinger.py domain-privacy-enable --domain example.com
uv run $CLAUDE_HOME/skills/hostinger-tools/scripts/hostinger.py domain-privacy-disable --domain example.com
uv run $CLAUDE_HOME/skills/hostinger-tools/scripts/hostinger.py domain-forwarding-view --domain example.com
uv run $CLAUDE_HOME/skills/hostinger-tools/scripts/hostinger.py domain-forwarding-create --domain example.com --redirect-url https://target.com --redirect-type 301
uv run $CLAUDE_HOME/skills/hostinger-tools/scripts/hostinger.py domain-forwarding-delete --domain example.com
uv run $CLAUDE_HOME/skills/hostinger-tools/scripts/hostinger.py domain-nameservers-set --domain example.com --ns1 ns1.hostinger.com --ns2 ns2.hostinger.com

[12]-[WHOIS]

uv run $CLAUDE_HOME/skills/hostinger-tools/scripts/hostinger.py whois-list
uv run $CLAUDE_HOME/skills/hostinger-tools/scripts/hostinger.py whois-list --tld com
uv run $CLAUDE_HOME/skills/hostinger-tools/scripts/hostinger.py whois-view --id 12345
uv run $CLAUDE_HOME/skills/hostinger-tools/scripts/hostinger.py whois-create --tld com --entity-type individual --country US --whois-details '{"first_name":"John"}'
uv run $CLAUDE_HOME/skills/hostinger-tools/scripts/hostinger.py whois-delete --id 12345
uv run $CLAUDE_HOME/skills/hostinger-tools/scripts/hostinger.py whois-usage --id 12345

[13]-[BILLING]

uv run $CLAUDE_HOME/skills/hostinger-tools/scripts/hostinger.py billing-catalog
uv run $CLAUDE_HOME/skills/hostinger-tools/scripts/hostinger.py billing-catalog --category VPS
uv run $CLAUDE_HOME/skills/hostinger-tools/scripts/hostinger.py billing-payment-methods
uv run $CLAUDE_HOME/skills/hostinger-tools/scripts/hostinger.py billing-payment-method-set-default --id 40404360
uv run $CLAUDE_HOME/skills/hostinger-tools/scripts/hostinger.py billing-payment-method-delete --id 40404360
uv run $CLAUDE_HOME/skills/hostinger-tools/scripts/hostinger.py billing-subscriptions
uv run $CLAUDE_HOME/skills/hostinger-tools/scripts/hostinger.py billing-subscription-cancel --id AzqaEWV5FiDYT4Ka3
uv run $CLAUDE_HOME/skills/hostinger-tools/scripts/hostinger.py billing-auto-renewal-enable --id AzqaEWV5FiDYT4Ka3
uv run $CLAUDE_HOME/skills/hostinger-tools/scripts/hostinger.py billing-auto-renewal-disable --id AzqaEWV5FiDYT4Ka3

[14]-[HOSTING]

uv run $CLAUDE_HOME/skills/hostinger-tools/scripts/hostinger.py hosting-orders-list
uv run $CLAUDE_HOME/skills/hostinger-tools/scripts/hostinger.py hosting-websites-list
uv run $CLAUDE_HOME/skills/hostinger-tools/scripts/hostinger.py hosting-website-create --domain mysite.com --order-id 12345
uv run $CLAUDE_HOME/skills/hostinger-tools/scripts/hostinger.py hosting-website-create --domain mysite.com --order-id 12345 --datacenter us
uv run $CLAUDE_HOME/skills/hostinger-tools/scripts/hostinger.py hosting-datacenters-list --order-id 12345

[15]-[REFERENCE]

uv run $CLAUDE_HOME/skills/hostinger-tools/scripts/hostinger.py datacenter-list
uv run $CLAUDE_HOME/skills/hostinger-tools/scripts/hostinger.py template-list
uv run $CLAUDE_HOME/skills/hostinger-tools/scripts/hostinger.py template-view --id 1007

[16]-[OUTPUT]

コマンドは {"status": "success|error", ...} を返します。

[INDEX][PATTERN][RESPONSE]
[01]一覧表示コマンド{items: object[]}
[02]表示コマンド{id: int, item: object}
[03]アクションコマンド{id: int, action: bool}
[04]作成コマンド{id: int, created: bool}

[17]-[ENVIRONMENT]

[VAR][REQUIRED][DESCRIPTION]
HOSTINGER_TOKENYesHostinger API のベアラートークン

[18]-[ERROR_HANDLING]

  • HTTP エラーは [ERROR] <status>: <body> を出力して終了コード 1 で終了します
  • トークンがない場合:[ERROR] HOSTINGER_TOKEN environment variable not set
  • VPS が見つからない場合:[ERROR] 404: Virtual machine not found
  • アクションが処理中の場合:[ERROR] 409: Action already in progress。完了するまで待機してください

コメント