跳过安装。2 分钟内即可运行。
在 cloud.anythingmcp.com 开始免费试用,一键添加 DigitalOcean,然后将你的 AI 客户端(Claude、ChatGPT、Copilot 或 Cursor)指向生成的 MCP 端点。无需 Docker,无需 git clone,无需任何工程经验。
摘要
让你的 AI 帮你照看 DigitalOcean:带 CPU 和带宽指标的 Droplet、App Platform 部署和日志、托管数据库、Kubernetes 集群、卷、DNS、防火墙、负载均衡器、余额和发票。在与你确认后,它可以开启或关闭 Droplet、创建快照、重新部署应用以及编辑 DNS 记录。
试试这样问
DigitalOcean 的示例提示
点击任意提示即可复制,然后粘贴到 Claude、ChatGPT、Cursor、Gemini、Copilot 或 OpenClaw 中,在该连接器上运行。
Claude 是 AI,可能会出错。请核对回答。
💡 无需安装? 直接使用 cloud.anythingmcp.com。 登录、点击 Connectors → DigitalOcean、粘贴凭证、生成 MCP API key,即可完成。无 Docker、无
git clone、无本地服务器。
DigitalOcean + Cursor
让你的 AI 帮你照看 DigitalOcean:带 CPU 和带宽指标的 Droplet、App Platform 部署和日志、托管数据库、Kubernetes 集群、卷、DNS、防火墙、负载均衡器、余额和发票。在与你确认后,它可以开启或关闭 Droplet、创建快照、重新部署应用以及编辑 DNS 记录。
前提条件
完整的设置说明已内置在连接器中 (在 store 中选择连接器时可见)。所需环境变量:
DIGITALOCEAN_TOKEN
步骤 1 — 获取凭证
- 在 DigitalOcean 控制面板中打开 API → Tokens(
https://cloud.digitalocean.com/account/api/tokens),点击 Generate New Token。令牌属于控制面板顶部当前所选的团队。 - 选择有效期和权限范围(scope)。Custom Scopes 是最安全的选择:为 account、billing、droplet、app、database、kubernetes、block_storage、domain、firewall、load_balancer、monitoring、snapshot 和 actions 授予 read 权限;电源操作和快照另需 droplet update,重新部署需要 app update,修改 DNS 需要 domain create 和 update。Read Only 涵盖所有读取操作,并拒绝一切修改。避免使用 Full Access:它还可能销毁资源。
- 复制令牌(以
dop_v1_开头,只显示一次),粘贴到DIGITALOCEAN_TOKEN,不要加 Bearer 一词,然后安装连接器。 - 用
digitalocean_get_account检查设置。
它能做什么:账户、余额和发票;Droplet 及其快照和 CPU、带宽指标;App Platform 应用及其部署、失败的步骤和日志链接;托管数据库及其副本;Kubernetes 集群及其节点池;卷;DNS 域名和记录;防火墙和负载均衡器。
修改会先问你:开启、关闭或重启 Droplet(digitalocean_power_droplet),创建快照(digitalocean_snapshot_droplet,按每 GB 每月计费),重新部署应用(digitalocean_create_app_deployment),以及添加或修改 DNS 记录(digitalocean_create_domain_record、digitalocean_update_domain_record),都会影响别人所依赖的东西。每次操作前,AI 都会给你看相关资源和改动,并等你同意,然后用 digitalocean_get_action 跟踪该操作直到完成。
不会销毁任何资源:连接器根本不提供删除 Droplet、应用、数据库、集群或卷的功能。digitalocean_delete_domain_record 安装时默认关闭;管理员需要有意识地开启它。
机密信息留在 DigitalOcean 中:数据库工具返回主机和端口,但绝不返回密码、连接字符串或证书;应用工具不包含环境变量;Kubernetes 工具不返回 kubeconfig。digitalocean_get_app_logs_url 返回的日志链接是临时的,但任何拿到链接的人都能读取日志。
指标:CPU 和带宽指标需要 Droplet 上安装了监控代理。CPU 值是按模式累计的秒数,因此 AI 会根据两个时间点之间的变化算出 Droplet 有多繁忙。
常见错误:401 Unable to authenticate you:令牌错误、已过期或已撤销。403:令牌缺少此调用所需的权限范围(例如查看余额需要 billing:read,修改需要相应的 update 权限);请生成一个带有该权限的令牌。404:此团队中没有该资源。422:某个值无效,例如 Droplet 已经关机,或者 DNS 记录与另一条记录冲突。429:每小时超过 5,000 次请求或每分钟超过 250 次;请稍候。
该连接器不会创建、调整规格或销毁 Droplet、应用、数据库、集群、卷、防火墙或负载均衡器,不会修改应用设置、环境变量或数据库用户,也不涉及 Spaces、容器镜像仓库、Functions、GenAI 或保留 IP。
步骤 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 — 在 Cursor 中添加连接器
你的服务器 URL: 在 AnythingMCP 中打开 MCP Servers → 此连接器所在的服务器,复制它的 URL(
https://cloud.anythingmcp.com/mcp/…)。本指南中出现YOUR_SERVER_ID的地方都用它替换。
Cursor 从 ~/.cursor/mcp.json 读取 MCP 服务器。添加以下条目:
{
"mcpServers": {
"anythingmcp": {
"url": "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。 - 保存文件并重启 Cursor。
- 打开 Cursor → Settings → MCP,确认
anythingmcp已列出并处于已连接状态。 - 开始对话,智能体现在可以调用
DigitalOcean的工具。
可用工具
| Tool | What it does |
|---|---|
digitalocean_get_account | Read the DigitalOcean account behind the token: email, name, uuid, status, whether the email is verified, the Droplet and reserved IP… |
digitalocean_get_balance | Read the billing balance: the balance at the start of the month, usage so far this month, month-to-date balance (what is owed now) and when… |
digitalocean_list_invoices | List past invoices, newest first, with uuid, amount in US dollars, billing period (YYYY-MM) and date, plus a preview of the current month |
digitalocean_list_droplets | List Droplets (virtual machines): id, name, status (new, active, off, archive), region, size, vCPUs, memory, disk, image, public and… |
digitalocean_get_droplet | Read one Droplet: status, region, size, vCPUs, memory, disk, image, IP addresses, tags, attached volumes, enabled features (backups… |
digitalocean_power_droplet | Change a Droplet's power state. power_on starts it; shutdown asks the operating system to shut down cleanly; power_off cuts the power at… |
digitalocean_snapshot_droplet | Take a snapshot (a full disk image) of a Droplet |
digitalocean_get_action | Read the progress of an action (power change, snapshot and so on): status (in-progress, completed, errored), type, start and end time and… |
digitalocean_list_droplet_snapshots | List the snapshots of a Droplet: id, name, size in GB, minimum disk size, regions and creation date |
digitalocean_list_apps | List App Platform apps: id, name, region, live URL, tier, project, the active deployment (id, phase, cause) and any deployment in progress |
digitalocean_get_app | Read one App Platform app: name, region, live URL and domains, the active, in-progress and pending deployments, and its components… |
digitalocean_list_app_deployments | List the deployments of an app, newest first: id, phase (PENDING_BUILD, BUILDING, PENDING_DEPLOY, DEPLOYING, ACTIVE, SUPERSEDED, ERROR… |
digitalocean_get_app_deployment | Read one app deployment: phase, cause, progress and each step with its status and the reason it failed, for finding out why a build or… |
digitalocean_create_app_deployment | Deploy an app again from its current settings and source: App Platform builds (with force_build even when nothing changed) and replaces the… |
digitalocean_get_app_logs_url | Get links to the logs of an app's active deployment: historic_urls are files with past log lines, live_url streams new lines |
digitalocean_get_app_deployment_logs_url | Get links to the build, deploy or run logs of one deployment of an app (for example a failed one): historic_urls are files with the log… |
digitalocean_list_databases | List managed database clusters: id, name, engine (pg, mysql, valkey, mongodb, kafka, opensearch), version, status, region, size, nodes… |
digitalocean_get_database | Read one managed database cluster: engine, version, status, region, size, nodes, storage, database names, host and port, the database users… |
digitalocean_list_database_replicas | List the read-only replicas of a database cluster: id, name, region, size, status, storage, host and creation date |
digitalocean_list_kubernetes_clusters | List Kubernetes (DOKS) clusters: id, name, region, Kubernetes version, state (running, provisioning, degraded, error...), API endpoint… |
digitalocean_get_kubernetes_cluster | Read one Kubernetes cluster: version, state and message, endpoint, node pools with each node's name and status, maintenance window, high… |
digitalocean_list_volumes | List block storage volumes: id, name, size in GB, region, the Droplets they are attached to, filesystem, tags and creation date |
digitalocean_list_domains | List the domains managed in DigitalOcean DNS: name and default TTL |
digitalocean_list_domain_records | List the DNS records of a domain: id, type (A, AAAA, CNAME, MX, TXT, NS, SRV, CAA), name (@ for the domain itself), data, priority, port… |
digitalocean_create_domain_record | Add a DNS record to a domain |
digitalocean_update_domain_record | Change an existing DNS record: only the fields you pass change, and the record type must be given and stay the same |
digitalocean_delete_domain_record | Delete a DNS record |
digitalocean_list_firewalls | List cloud firewalls: id, name, status, inbound rules (protocol, ports, allowed sources), outbound rules, the Droplets and tags they apply… |
digitalocean_get_firewall | Read one cloud firewall: its inbound and outbound rules, the Droplets and tags it applies to, status and pending changes |
digitalocean_list_load_balancers | List load balancers: id, name, public IP, status, region, size, forwarding rules (ports and protocols), health check, target Droplets or… |
digitalocean_get_load_balancer | Read one load balancer: IP, status, region, size, forwarding rules, health check, sticky sessions, target Droplets or tag and HTTPS redirect |
digitalocean_get_droplet_cpu_metrics | Read CPU metrics of a Droplet for a time window: one series per CPU mode (user, system, idle, iowait...) with [unix time, value] pairs |
digitalocean_get_droplet_bandwidth_metrics | Read network bandwidth of a Droplet for a time window, in megabits per second, as [unix time, value] pairs, for the public or private… |
示例提示
- “列出我的 Droplet 及其区域、规格和状态,并告诉我哪些已经关机但仍在计费。”
- “我的 App Platform 应用最近一次部署为什么失败?给我看失败的步骤和原因。”
- “web-01 在过去 24 小时内 CPU 有多繁忙,向外发送了多少带宽流量?”
- “我本月的 DigitalOcean 余额是多少,最近三张发票相比如何?”
- “把 staging.example.com 的 A 记录指向 203.0.113.10。修改前先给我看当前记录和新值。”
FAQ
Cursor 免费套餐支持自定义 MCP 服务器吗? 支持,Hobby、Pro 和 Business 套餐均可使用 MCP。
下一步
这份指南对你有帮助吗?