连接器指南阅读约 5 分钟31 个 MCP 工具7 种语言

如何将 Hetzner Cloud 连接到 Gemini — 通过 MCP

Hetzner Cloud:带指标和操作记录的服务器、镜像和快照、卷、网络、防火墙、负载均衡器、IP、SSH 密钥、证书、DNS 区域、服务器类型和价格。电源操作工具安装时默认关闭。使用项目 token 访问 Hetzner Cloud API v1。

HC作者:HelpCode 团队更新于 5 分钟阅读 在 GitHub 开源

无需信用卡 · 7 天试用 · 提供自托管方案

Hetzner Cloud

Hetzner Cloud

Hetzner Cloud: servers with metrics and actions, images and snapshots, volumes, networks, firewalls, load balancers, IPs, SSH keys, certificates, DNS zones, server types and pricing. Power tools are installed disabled. Hetzner Cloud API v1 with a project token.

个工具

31

区域

INTL

类别

基础设施

身份验证

Bearer Token

所需环境变量

HETZNER_CLOUD_API_TOKEN
在 Cloud 上一键安装

7 天免费试用 · 无需信用卡

  • 7 天免费试用
    无需信用卡
  • 符合 GDPR,SOC 2 就绪
    数据驻留欧盟,审计日志
  • 在 GitHub 开源
    开源 · AGPL-3.0
  • 支持 ChatGPT、Claude、Gemini
    任何兼容 MCP 的客户端

跳过安装。2 分钟内即可运行。

在 cloud.anythingmcp.com 开始免费试用,一键添加 Hetzner Cloud,然后将你的 AI 客户端(Claude、ChatGPT、Copilot 或 Cursor)指向生成的 MCP 端点。无需 Docker,无需 git clone,无需任何工程经验。

开始免费试用

摘要

Hetzner Cloud:带指标和操作记录的服务器、镜像和快照、卷、网络、防火墙、负载均衡器、IP、SSH 密钥、证书、DNS 区域、服务器类型和价格。电源操作工具安装时默认关闭。使用项目 token 访问 Hetzner Cloud API v1。

试试这样问

Hetzner Cloud 的示例提示

点击任意提示即可复制,然后粘贴到 Claude、ChatGPT、Cursor、Gemini、Copilot 或 OpenClaw 中,在该连接器上运行。

Hetzner Cloud · 通过 MCP 实时
分享
Opus 4.7

Claude 是 AI,可能会出错。请核对回答。

💡 无需安装? 直接使用 cloud.anythingmcp.com。 登录、点击 Connectors → Hetzner Cloud、粘贴凭证、生成 MCP API key — 完成。无 Docker、无 git clone、无本地服务器。

Hetzner Cloud + Gemini

Hetzner Cloud:带指标和操作记录的服务器、镜像和快照、卷、网络、防火墙、负载均衡器、IP、SSH 密钥、证书、DNS 区域、服务器类型和价格。电源操作工具安装时默认关闭。使用项目 token 访问 Hetzner Cloud API v1。

前提条件

完整的设置说明已内置在连接器中 (在 store 中选择连接器时可见)。所需环境变量:

HETZNER_CLOUD_API_TOKEN

步骤 1 — 获取凭证

  1. 在 Hetzner Console 中打开你的项目,然后进入 Security → API tokens → Generate API token。
  2. 只读连接器选择 Read;只有打算启用电源操作工具时才选择 Read & Write。将 token 复制到 HETZNER_CLOUD_API_TOKEN;Hetzner 只显示一次。它以 Authorization: Bearer 发送。
  3. 一个 token 只属于一个项目,因此每个项目创建一个连接器。
  4. 先用 hetzner_cloud_list_servers,再用 hetzner_cloud_get_server_metrics 查看服务器负载,用 hetzner_cloud_get_pricing 或 hetzner_cloud_list_server_types 查看费用。

电源操作工具(hetzner_cloud_power_on_server、hetzner_cloud_power_off_server、hetzner_cloud_shutdown_server、hetzner_cloud_reboot_server、hetzner_cloud_reset_server)安装时默认关闭,请有意识地启用。power off 和 reset 会像拔掉电源一样切断服务器,因此优先使用 shutdown 或 reboot。每个工具都返回一个操作,用 hetzner_cloud_get_action 轮询其状态;关机的服务器仍会计费。没有任何工具会创建、重建或删除资源。API 每个项目每小时最多 3600 个请求。不包括 Hetzner Robot(独立服务器)和 Storage Box。

步骤 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" }
    }
  }
}
  1. 在 AnythingMCP 的 MCP Servers → 你的服务器 → API keys 中创建 MCP API 密钥,并用它替换 YOUR_MCP_API_KEY。
  2. 保存文件并重启 gemini。
  3. 在 Gemini CLI 中运行 /mcp(或在终端运行 gemini mcp list)— anythingmcp 应显示为已连接。
  4. 开始输入提示 — Gemini CLI 现在可以调用 Hetzner Cloud 的工具。

可用工具

ToolWhat it does
hetzner_cloud_list_serversList the servers of the project with status, server type, location, public and private IPs, image, labels, protection and traffic
hetzner_cloud_get_serverGet one server with status, type (cores, memory, disk), datacenter, public IPv4/IPv6, private networks, attached volumes, image, backup…
hetzner_cloud_get_server_metricsGet time series for one server: cpu usage, disk IOPS and bandwidth, or network packets and bandwidth, between two RFC 3339 times
hetzner_cloud_list_server_actionsList the actions run on one server (power, rebuild, backup, attach, ...) with command, status, progress, start and finish times and errors
hetzner_cloud_get_actionGet one action by id: command, status (running, success, error), progress in percent, affected resources and the error if it failed
hetzner_cloud_list_imagesList images: system images (OS), app images, snapshots and backups, with type, OS flavor and version, architecture, size and the server it…
hetzner_cloud_get_imageGet one image: type, status, description, OS flavor and version, architecture, disk size, creation source, protection, labels and…
hetzner_cloud_list_volumesList block storage volumes with size in GB, location, the server they are attached to, Linux device path, format, protection and labels
hetzner_cloud_get_volumeGet one volume: size, location, attached server, Linux device path, filesystem format, protection, labels and creation time
hetzner_cloud_list_networksList private networks with IP range, subnets, routes, attached servers and load balancers, and protection
hetzner_cloud_get_networkGet one private network with its IP range, subnets (zone, type, gateway), routes, attached servers and load balancers
hetzner_cloud_list_firewallsList firewalls with their inbound and outbound rules (protocol, port, source and destination IPs) and the servers or label selectors they…
hetzner_cloud_get_firewallGet one firewall with every rule and the resources it is applied to
hetzner_cloud_list_load_balancersList load balancers with type, location, public and private IPs, algorithm, services (ports, protocol, health check) and targets
hetzner_cloud_get_load_balancerGet one load balancer with services, health checks, targets and their health status, algorithm, network attachments and included traffic
hetzner_cloud_get_load_balancer_metricsGet time series for one load balancer: open connections, connections per second, requests per second or bandwidth, between two RFC 3339…
hetzner_cloud_list_primary_ipsList primary IPs (the main public IPv4/IPv6 of servers) with address, type, datacenter, assignee, auto-delete flag and reverse DNS
hetzner_cloud_list_floating_ipsList floating IPs with address, type, home location, the server they point to, reverse DNS entries and protection
hetzner_cloud_list_ssh_keysList the SSH public keys stored in the project with name, fingerprint and labels
hetzner_cloud_list_certificatesList TLS certificates for load balancers (uploaded or managed by Let's Encrypt) with domains, validity dates and managed status
hetzner_cloud_list_server_typesList server types (for example cx22, cpx31, cax21) with cores, CPU type, architecture, memory, disk, included traffic and prices per…
hetzner_cloud_list_locationsList the locations (fsn1, nbg1, hel1, ash, hil, sin) with city, country, network zone and coordinates
hetzner_cloud_list_datacentersList datacenters with their location and which server types are supported and currently available there
hetzner_cloud_get_pricingGet the full price list of the project: per server type and location (hourly and monthly, net and gross), volumes per GB, primary and…
hetzner_cloud_list_zonesList DNS zones hosted in Hetzner DNS (Cloud API) with name, mode (primary or secondary), TTL, record count, nameservers and protection
hetzner_cloud_list_zone_rrsetsList the DNS record sets of one zone (A, AAAA, CNAME, MX, TXT, ...) with name, type, TTL and values
hetzner_cloud_power_on_serverStart a server that is off
hetzner_cloud_power_off_serverCut the power of a server immediately, like pulling the plug
hetzner_cloud_shutdown_serverAsk the guest operating system to shut down gracefully (ACPI)
hetzner_cloud_reboot_serverAsk the guest operating system to reboot gracefully (ACPI soft reboot)

(showing 30 of 31 tools — install the connector to see them all)

FAQ

Gemini CLI 从哪里读取 MCP 服务器? 用户级配置位于 ~/.gemini/settings.json,项目级配置位于项目内的 .gemini/settings.json。gemini mcp list 会列出每个服务器及其连接状态。

下一步

这份指南对你有帮助吗?

你的 Hetzner Cloud 智能体只差一次点击。

安装连接器,粘贴密钥,向 Gemini 提问。免费试用 7 天,无需信用卡。

相关指南

连接器

如何将 Hetzner Cloud 连接到 ChatGPT — 通过 MCP

Hetzner Cloud:带指标和操作记录的服务器、镜像和快照、卷、网络、防火墙、负载均衡器、IP、SSH 密钥、证书、DNS 区域、服务器类型和价格。电源操作工具安装时默认关闭。使用项目 token 访问 Hetzner Cloud API v1。

连接器

如何将 Hetzner Cloud 连接到 Claude — 通过 MCP

Hetzner Cloud:带指标和操作记录的服务器、镜像和快照、卷、网络、防火墙、负载均衡器、IP、SSH 密钥、证书、DNS 区域、服务器类型和价格。电源操作工具安装时默认关闭。使用项目 token 访问 Hetzner Cloud API v1。

连接器

如何将 Hetzner Cloud 连接到 Cursor — 通过 MCP

Hetzner Cloud:带指标和操作记录的服务器、镜像和快照、卷、网络、防火墙、负载均衡器、IP、SSH 密钥、证书、DNS 区域、服务器类型和价格。电源操作工具安装时默认关闭。使用项目 token 访问 Hetzner Cloud API v1。

连接器

如何将 Hetzner Cloud 连接到 Meta Muse — 通过 MCP

Hetzner Cloud:带指标和操作记录的服务器、镜像和快照、卷、网络、防火墙、负载均衡器、IP、SSH 密钥、证书、DNS 区域、服务器类型和价格。电源操作工具安装时默认关闭。使用项目 token 访问 Hetzner Cloud API v1。

连接器

Hetzner Cloud 接入 MCP — 从任意 AI 代理驱动 Hetzner Cloud

Hetzner Cloud:带指标和操作记录的服务器、镜像和快照、卷、网络、防火墙、负载均衡器、IP、SSH 密钥、证书、DNS 区域、服务器类型和价格。电源操作工具安装时默认关闭。使用项目 token 访问 Hetzner Cloud API v1。

连接器

如何将 Outlook (Microsoft 365 Mail and Calendar) 连接到 Gemini — 通过 MCP

让你的 AI 在 Outlook 中工作:搜索和阅读邮件、将邮件归入文件夹、起草、发送和回复邮件、查看日历、创建和改期会议,以及查找同事的空闲时间。通过 Microsoft Graph 支持 Microsoft 365 和 Outlook.com,使用你的 Microsoft 账户登录。