跳过安装。2 分钟内即可运行。
在 cloud.anythingmcp.com 开始免费试用,一键添加 Hostinger,然后将你的 AI 客户端(Claude、ChatGPT、Copilot 或 Cursor)指向生成的 MCP 端点。无需 Docker,无需 git clone,无需任何工程经验。
摘要
通过公开 API 管理 Hostinger 账户:VPS 电源、指标、备份、快照、Docker 项目和防火墙,域名、域名服务器和带快照的 DNS 区域,订阅和价格目录,以及网站托管中的网站、WordPress 站点、数据库和缓存。
试试这样问
Hostinger 的示例提示
点击任意提示即可复制,然后粘贴到 Claude、ChatGPT、Cursor、Gemini、Copilot 或 OpenClaw 中,在该连接器上运行。
Claude 是 AI,可能会出错。请核对回答。
💡 无需安装? 直接使用 cloud.anythingmcp.com。 登录、点击 Connectors → Hostinger、粘贴凭证、生成 MCP API key,即可完成。无 Docker、无
git clone、无本地服务器。
Hostinger + Gemini
通过公开 API 管理 Hostinger 账户:VPS 电源、指标、备份、快照、Docker 项目和防火墙,域名、域名服务器和带快照的 DNS 区域,订阅和价格目录,以及网站托管中的网站、WordPress 站点、数据库和缓存。
前提条件
完整的设置说明已内置在连接器中 (在 store 中选择连接器时可见)。所需环境变量:
HOSTINGER_API_TOKEN
步骤 1 — 获取凭证
设置大约需要 2 分钟。你需要一个可以访问 hPanel 的 Hostinger 账户。
- 登录 hPanel,打开 Account,再打开 API(https://hpanel.hostinger.com/profile/api),创建一个新令牌。选择有效期;该令牌拥有与你的 hPanel 用户相同的权限。
- 把它粘贴到
HOSTINGER_API_TOKEN。它作为 Bearer 令牌发送。 - 安装连接器并运行
hostinger_list_subscriptions检查令牌。
这里不会购买任何东西:订购 VPS 套餐或域名、更改支付方式和续订订阅仍在 hPanel 中完成。
VPS:AI 列出所有机器并读取某台机器的详情,包括某个时段的使用指标(CPU、内存、磁盘、流量和在线时长)。它可以启动、停止和重启 VPS,并修改其主机名;这些操作都会返回一个操作(action),AI 会持续跟踪,直到它成功或失败。VPS 正在执行某个操作时,新的操作会被拒绝。用于恢复时,它可以列出和还原备份,并读取、创建或还原 VPS 唯一的快照。它还可以读取 root SSH 密钥、操作系统模板和数据中心,并处理 Hostinger Docker 管理器中的项目:容器、最新日志和重启。
防火墙:AI 列出防火墙、创建防火墙、添加、修改和删除规则,然后同步防火墙,让机器获得新规则,并在某台 VPS 上启用或停用它。防火墙会丢弃所有未被规则允许的流量,因此 AI 在启用或同步之前会确保 SSH(端口 22)仍然被允许。
域名和 DNS:域名列表,包括状态、到期时间、续费、转发和 WHOIS 资料,可用性检查及推荐,以及域名服务器更改。对于使用 Hostinger 域名服务器的域名,AI 会读取 DNS 区域,用 hostinger_validate_dns_records 测试更改,然后应用更改,还可以删除整个记录集。每次更改都会留下一个快照,还原快照即可撤销该更改。在区域中,name 相对于域名(@ 表示域名本身,以及 www),CNAME 和 NS 的目标以点结尾,MX 的内容是优先级后跟主机名。
账单和网站托管:订阅、已保存的支付方式和价格目录,只读。在网站托管和云托管上:托管订单、网站、WordPress 安装、MySQL 数据库、cron 任务,以及清除网站缓存。
写入前确认:电源操作、还原、快照、防火墙、域名服务器和 DNS 更改都可能让网站、邮件或 SSH 访问中断。AI 会说明是哪台机器或哪个域名以及会产生什么影响,展示记录或规则,并等你同意。还原备份或快照会覆盖 VPS 上的所有数据,且无法撤销。
格式:VPS、操作、备份、防火墙和规则的 ID 都是整数。时间为 UTC 的 ISO 8601,指标以 Unix 时间戳为键。价格以 currency_code 的分为单位(1799 即 17.99)。VPS 的内存、磁盘和带宽以 MB 为单位。域名联系人和 WHOIS 资料包含个人数据,AI 只展示任务需要的部分。
限制:每个令牌每分钟约 90 次请求。遇到 429 时,AI 会等待 Retry-After 秒,因为反复超限可能会让 IP 被封禁一段时间。分页列表会返回 meta,其中包含 current_page、per_page 和 total;VPS、域名、DNS 和账单列表一次性返回全部内容。
常见错误:401 表示令牌错误、已撤销或已过期,404 表示 ID 或域名不在此账户中,422 表示输入无效(响应会指出字段),409 或被锁定的操作表示 VPS 仍在执行另一个操作。错误响应附带一个 correlation_id,供 Hostinger 支持使用。
步骤 2 — 安装 adapter
curl -fsSL https://raw.githubusercontent.com/HelpCode-ai/anythingmcp/main/docker-compose.quickstart.yml -o docker-compose.yml
printf 'JWT_SECRET=%s\nENCRYPTION_KEY=%s\n' "$(openssl rand -hex 32)" "$(openssl rand -hex 32)" > .env
docker compose up -d
步骤 3 — 在 Gemini 中添加连接器
你的服务器 URL: 在 AnythingMCP 中打开 MCP Servers → 此连接器所在的服务器,复制它的 URL(
https://cloud.anythingmcp.com/mcp/…)。本指南中出现YOUR_SERVER_ID的地方都用它替换。
Gemini CLI 从 ~/.gemini/settings.json(Windows 上为 %USERPROFILE%\.gemini\settings.json)读取 MCP 服务器。添加:
{
"mcpServers": {
"anythingmcp": {
"httpUrl": "https://cloud.anythingmcp.com/mcp/YOUR_SERVER_ID",
"headers": { "X-API-Key": "YOUR_MCP_API_KEY" }
}
}
}
- 在 AnythingMCP 的 MCP Servers → 你的服务器 → API keys 中创建 MCP API 密钥,并用它替换
YOUR_MCP_API_KEY。 - 保存文件并重启
gemini。 - 在 Gemini CLI 中运行
/mcp(或在终端运行gemini mcp list),anythingmcp应显示为已连接。 - 开始输入提示,Gemini CLI 现在可以调用
Hostinger的工具。
可用工具
| Tool | What it does |
|---|---|
hostinger_list_virtual_machines | List every VPS (virtual machine) of the account: id, hostname, state (running, stopped, ...), plan, CPU count, memory and disk in MB… |
hostinger_get_virtual_machine | Read one VPS in detail: state, plan and resources, IP addresses, OS template, hostname, nameservers, data center, active firewall… |
hostinger_get_vm_metrics | Usage history of a VPS between two times: CPU, memory and disk usage, incoming and outgoing traffic, and uptime, as time series keyed by… |
hostinger_list_vm_actions | History of operations run on a VPS (start, stop, restart, backup restore, snapshot, OS change, ...), newest first, with name, state… |
hostinger_get_vm_action | Read one VPS action by id to see whether it is still running, succeeded or failed |
hostinger_start_vm | Power on a stopped VPS |
hostinger_stop_vm | Power off a VPS |
hostinger_restart_vm | Reboot a VPS (full stop and start; a stopped VPS is started) |
hostinger_set_vm_hostname | Change the hostname of a VPS |
hostinger_list_vm_backups | List the automatic backups of a VPS with their id, size, location and creation time |
hostinger_restore_vm_backup | Restore a VPS from one of its backups |
hostinger_get_vm_snapshot | Read the snapshot of a VPS (a VPS has at most one): id, creation time, expiry time and restore time |
hostinger_create_vm_snapshot | Take a snapshot of a VPS's current state |
hostinger_restore_vm_snapshot | Revert a VPS to its snapshot |
hostinger_list_vm_ssh_keys | List the SSH public keys of the root user on a VPS: key type, fingerprint data and comment name |
hostinger_list_vps_templates | List the OS templates a VPS can be installed with (Ubuntu, Debian, AlmaLinux, panels and app stacks): id, name and description |
hostinger_list_vps_data_centers | List Hostinger's VPS data centers: id, name, location code, city and continent |
hostinger_list_docker_projects | List the Docker Compose projects on a VPS that uses Hostinger's Docker manager: name, status, compose file path and containers with image… |
hostinger_get_docker_project_containers | List the containers of one Docker Compose project on a VPS with status, health, port mappings and CPU and memory stats |
hostinger_get_docker_project_logs | Read the latest log lines (up to 300 in total) of every service of a Docker Compose project on a VPS, grouped by service with timestamps |
hostinger_restart_docker_project | Restart all services of a Docker Compose project on a VPS (stop and start in dependency order; volumes are kept) |
hostinger_list_firewalls | List the VPS firewalls of the account: id, name, whether they are in sync with their machines, and their rules |
hostinger_get_firewall | Read one firewall with all its rules (protocol, port, source) and its sync state |
hostinger_create_firewall | Create an empty firewall |
hostinger_create_firewall_rule | Add an accept rule to a firewall |
hostinger_update_firewall_rule | Change a firewall rule |
hostinger_delete_firewall_rule | Delete a firewall rule |
hostinger_sync_firewall | Apply a firewall's current rules to every VPS it is activated on |
hostinger_activate_firewall | Activate a firewall on a VPS |
hostinger_deactivate_firewall | Deactivate a firewall on a VPS: all its ports are reachable again from everywhere |
hostinger_list_domains | List the domains in the account's portfolio: id, domain name, type (domain or free subdomain), status and creation and expiry dates |
hostinger_get_domain | Read one domain: status, nameservers, child nameservers, lock and privacy protection state, WHOIS contact profile ids and dates |
hostinger_get_domain_renewal | Read a domain's renewal information: status and current expiry date |
hostinger_check_domain_availability | Check whether a domain name is free to register in one or more TLDs |
hostinger_update_domain_nameservers | Point a domain to other nameservers (two to four) |
hostinger_get_domain_forwarding | Read the forwarding (redirect) of a domain: target URL, redirect type (301 or 302) and dates |
hostinger_list_whois_profiles | List the WHOIS contact profiles used to register domains: id, TLD, country, entity type and contact details |
hostinger_get_dns_records | Read the DNS zone of a domain managed by Hostinger nameservers: every record set with name, type, TTL and values |
hostinger_validate_dns_records | Check DNS record changes without applying them: answers success when hostinger_update_dns_records would accept them, or 422 with the… |
hostinger_update_dns_records | Add or change DNS records of a domain |
hostinger_delete_dns_records | Delete whole DNS record sets of a domain, selected by name and type |
hostinger_list_dns_snapshots | List the saved versions (snapshots) of a domain's DNS zone, taken before each change: id, reason and time |
hostinger_get_dns_snapshot | Read one DNS zone snapshot with all the records it contained, e.g. to compare with the current zone before restoring |
hostinger_restore_dns_snapshot | Restore a domain's DNS zone to a snapshot |
hostinger_list_subscriptions | List the account's subscriptions: id, name, status, billing period, currency, total and renewal price in cents, auto-renewal flag… |
hostinger_list_payment_methods | List the payment methods saved in the account: id, name, masked identifier, type, default, expired and suspended flags |
hostinger_get_catalog | List what can be ordered with prices: catalog items (VPS plans, domain TLDs, hosting, email) with their price items per billing period… |
hostinger_list_hosting_orders | List the web and cloud hosting orders (plans) the token can see, own and shared: order id, plan name, status, subscription id and creation… |
hostinger_list_websites | List the websites on web and cloud hosting: domain, hosting account user name, order id, root directory, whether it is enabled, and the… |
hostinger_list_wordpress_installations | List the WordPress installations on web and cloud hosting: id, user name, domain, title, URL, directory, admin login and email, and whether… |
hostinger_list_databases | List the MySQL databases of a hosting account: name, user, host and port, assigned domain, disk usage and size limit in MB, and dates |
hostinger_list_cron_jobs | List the cron jobs of a hosting account with their schedule and command |
hostinger_clear_website_cache | Clear the server-side cache of a website (and the Hostinger CDN cache when CDN is on), so updated content shows at once |
示例提示
- “列出我的 VPS 机器及其状态、套餐和 IP 地址。”
- “我的 VPS 在过去 7 天用了多少 CPU 和内存?”
- “显示 example.com 的 DNS 记录,在我确认后把 www 的 A 记录指向 203.0.113.10。”
- “我的哪些域名会在未来 60 天内到期?它们开启了自动续费吗?”
- “显示我 VPS 上 Docker 项目的最新日志,如果有容器状态不健康就重启它。”
FAQ
Gemini CLI 从哪里读取 MCP 服务器? 用户级配置位于 ~/.gemini/settings.json,项目级配置位于项目内的 .gemini/settings.json。gemini mcp list 会列出每个服务器及其连接状态。
下一步
这份指南对你有帮助吗?