DL

digitalocean-labs/mcp-digitalocean

开发工具官方

本页由 AI 翻译,技术细节请以原文为准。 查看原文

138 stars 96 forks 质量 90 趋势 36MIT

MCP 数字海洋集成

概览

MCP DigitalOcean 集成是一个开源项目,提供一个全面的接口,用于管理 DigitalOcean 资源并使用 DigitalOcean API 执行操作。该项目建立在 godo 库和 MCP 框架之上,展示了多种简化云基础设施管理的工具。 “使用MCP技术与您的DigitalOcean账户交互可能存在风险” 不要直接将你的 DigitalOcean API 令牌粘贴到任何配置文件中(例如 claude_desktop_config.json、~/.cursor/config.json、VS Code 设置)。如果你提交这些文件到 GitHub,你的令牌会被暴露,GitHub 会自动屏蔽或撤销令牌以保护你的账户。 安全的做法是将令牌存储在你的机器上,并从配置文件中引用。在安装任何客户端之前,请按照以下操作步骤操作你的操作系统。 2. 确定你使用的是哪个shell:- 如果输出/bin/zsh,→编辑~/。

概述(AI 翻译)

MCP DigitalOcean 集成是一个开源项目,提供一个全面的接口,用于管理 DigitalOcean 资源并使用 DigitalOcean API 执行操作。该项目建立在 godo 库和 MCP 框架之上,展示了多种简化云基础设施管理的工具。

免责声明: “使用MCP技术与您的DigitalOcean账户交互可能存在风险”


认证

托管(远程)MCP服务器支持两种认证方式:

  • OAuth 2.0(推荐)。 只需添加服务器 URL ——无 Authorization 头部。客户端首次使用时会打开浏览器登录 DigitalOcean,因此无需创建、存储或轮换令牌。支持的客户端(如近期的 Claude 和 Cursor)会自动处理此操作,您可以跳过下面的第 1 和第 2 步。
  • API 令牌。 对于本地安装或不支持 OAuth 的客户端,可以通过 Authorization: Bearer 头(远程)或 DIGITALOCEAN_API_TOKEN 环境变量(本地)使用 DigitalOcean 个人访问令牌。请参见下文步骤 1–2。

安全性:永远不要硬编码你的 API 令牌

本页由 AI 翻译,技术细节请以原文为准。

README

以下为原文 README 节选,完整内容请查看原文。

MCP DigitalOcean Integration

MCP DigitalOcean Integration is an open-source project that provides a comprehensive interface for managing DigitalOcean resources and performing actions using the DigitalOcean API. Built on top of the godo library and the MCP framework, this project exposes a wide range of tools to simplify cloud infrastructure management.

DISCLAIMER: “Use of MCP technology to interact with your DigitalOcean account can come with risks”


Authentication

The hosted (remote) MCP servers support two ways to authenticate:

  • OAuth 2.0 (recommended). Just add the server URL — no Authorization header. Your client opens a browser to sign in to DigitalOcean on first use, so there’s no token to create, store, or rotate. Supported clients (e.g. recent Claude and Cursor) handle this automatically, and you can skip Steps 1–2 below.
  • API token. For local installs or clients without OAuth support, use a DigitalOcean personal access token via an Authorization: Bearer header (remote) or the DIGITALOCEAN_API_TOKEN environment variable (local). See Steps 1–2 below.

Security: Never Hardcode Your API Token

WARNING: Do NOT paste your DigitalOcean API token directly into any config file (e.g., claude_desktop_config.json, ~/.cursor/config.json, VS Code settings). If you commit these files to GitHub, your token will be exposed and GitHub will automatically block or revoke it to protect your account.

The safe approach is to store your token in an environment variable on your machine and reference it from your config file. Follow the steps below for your operating system before proceeding with any client installation.


Step 1: Set Up Your API Token as an Environment Variable

macOS / Linux

  1. Open a terminal.

  2. Determine which shell you are using:

    echo $SHELL
    
    • If it outputs /bin/zsh → edit ~/.zshrc
    • If it outputs /bin/bash → edit ~/.bashrc or ~/.bash_profile
  3. Open the file in a text editor:

    # For zsh (default on macOS Monterey and later)
    nano ~/.zshrc
    
    # For bash
    nano ~/.bashrc
    
  4. Add the following line at the bottom of the file:

    export DIGITALOCEAN_API_TOKEN="your_actual_token_here"
    

    Replace your_actual_token_here with your real token from the DigitalOcean API Tokens page.

  5. Save and exit:

    • In nano: press Ctrl + O, then Enter to save, then Ctrl + X to exit.
  6. Reload your shell to apply the change:

    source ~/.zshrc    # or source ~/.bashrc
    
  7. Verify it is set correctly:

在 GitHub 查看完整 README

安装

npx mcp-remote https://apps.mcp.digitalocean.com/mcp
新手?先看 mcpskill.org 教程 →

配置

{ "mcpServers": { "digitalocean-apps": { "command": "npx", "args": ["mcp-remote", "https://apps.mcp.digitalocean.com/mcp"] } } }