Skip to content
Back to search

mcp-digitalocean

MCP DigitalOcean Integration

Safety scan

A static text scan, not a guarantee. Select the badge to see what was scanned and every finding.

Checked today

Check it deeper on your machine

It has changed since its scan on 11 Nov 2026.

As a Claude Code plugin, install it and then ask Claude Code:

/plugin marketplace add keithmackay/mackayi/plugin install scanskillsafety@mackayiDo a deep scan of https://github.com/digitalocean-labs/mcp-digitalocean with scanskillsafety

Or from a terminal, clone it and run it:

git clone https://github.com/keithmackay/scanskillsafety-skill ~/.claude/skills/scanskillsafetynode ~/.claude/skills/scanskillsafety/cli.cjs --deep 'https://github.com/digitalocean-labs/mcp-digitalocean'

It checks the exact commit: every file, its packages against OSV (api.osv.dev), how it compares with this page's scan (findsafeskills.com receives the repository's address), and, if you agree, Claude reading every file with your own Claude subscription. It never runs the code.

Badge for your README
findsafeskills safety rating

Markdown

[![findsafeskills safety rating](/api/listings/digitalocean-labs--mcp-digitalocean/badge.svg)](/listings/digitalocean-labs--mcp-digitalocean)

HTML

<a href="/listings/digitalocean-labs--mcp-digitalocean"><img src="/api/listings/digitalocean-labs--mcp-digitalocean/badge.svg" alt="findsafeskills safety rating" /></a>

Install

i

Install instructions from the README

As written by the repo's author. findsafeskills has not verified these steps.

macOS / Linux

Option A: Set it in your shell profile (Recommended — persists across reboots)

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](https://cloud.digitalocean.com/account/api/tokens).

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:

   echo $DIGITALOCEAN_API_TOKEN

You should see your token printed in the terminal.

Option B: Use a `.env` file (for project-level isolation)

1. In your project root folder, create a `.env` file:

   touch .env

2. Open it and add:

   DIGITALOCEAN_API_TOKEN=your_actual_token_here

3. **Immediately** add `.env` to your `.gitignore` so it is never committed:

   echo ".env" >> .gitignore

4. To load the `.env` file into your current terminal session:

   export $(grep -v '^#' .env | xargs)

5. Verify:

   echo $DIGITALOCEAN_API_TOKEN

> **Note:** Option B only sets the variable for the current terminal session. You need to run step 4 each time you open a new terminal. For a permanent solution, use Option A.

---

Windows

Option A: Set it as a System Environment Variable (Recommended — persists across reboots)

1. Open **Start Menu** and search for **"Environment Variables"**. 2. Click **"Edit the system environment variables"**. 3. In the System Properties dialog, click the **"Environment Variables..."** button. 4. Under **"User variables"**, click **"New..."**. 5. Fill in: - **Variable name:** `DIGITALOCEAN_API_TOKEN` - **Variable value:** `your_actual_token_here` 6. Click **OK** on all dialogs to save. 7. **Restart your terminal** (Command Prompt or PowerShell) for the change to take effect. 8. Verify in PowerShell:

   echo $env:DIGITALOCEAN_API_TOKEN

Or in Command Prompt:

   echo %DIGITALOCEAN_API_TOKEN%

Option B: Set it temporarily in PowerShell (current session only)

$env:DIGITALOCEAN_API_TOKEN = "your_actual_token_here"

Option C: Use a `.env` file on Windows

1. In your project folder, create a file named `.env` (no extension) with this content:

   DIGITALOCEAN_API_TOKEN=your_actual_token_here

2. Add `.env` to your `.gitignore`:

   .env

3. To load it in PowerShell:

   Get-Content .env | ForEach-Object {
     if ($_ -match "^\s*([^#][^=]*)=(.*)$") {
       [System.Environment]::SetEnvironmentVariable($matches[1].Trim(), $matches[2].Trim(), "Process")
     }
   }

4. Verify:

   echo $env:DIGITALOCEAN_API_TOKEN

---

What was scanned

The files the safety scan read, as written by the repository's author and shown as plain text. Lines with a finding are marked.

README.md · README · 791 lines

View this file on GitHub (read at the repository's current version: the scan did not record which commit it read)

This file has changed since it was scanned, so this is not exactly the text that was scanned, and no line is marked. The findings are listed with the safety scan above.

  1. # MCP DigitalOcean Integration
  2. MCP DigitalOcean Integration is an open-source project that provides a comprehensive interface for managing DigitalOcean resources and performing actions using the [DigitalOcean API](https://docs.digitalocean.com/reference/api/). Built on top of the [godo](https://github.com/digitalocean/godo) library and the [MCP framework](https://github.com/mark3labs/mcp-go), this project exposes a wide range of tools to simplify cloud infrastructure management.
  3. > **DISCLAIMER:** "Use of MCP technology to interact with your DigitalOcean account [can come with risks](https://www.wiz.io/blog/mcp-security-research-briefing)"
  4. **Quick start:** connect your MCP client to the [DigitalOcean MCP Router](#mcp-router-single-endpoint) at `https://mcp.digitalocean.com/mcp` and sign in with your DigitalOcean account. One endpoint gives you tools for Droplets, App Platform, Kubernetes, managed databases, networking, Spaces, GenAI, and more.
  5. ---
  6. ## Authentication
  7. The hosted (remote) MCP servers support two ways to authenticate:
  8. - **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.
  9. - **API token.** For local installs or clients without OAuth support, use a DigitalOcean [personal access token](https://cloud.digitalocean.com/account/api/tokens) via an `Authorization: Bearer` header (remote) or the `DIGITALOCEAN_API_TOKEN` environment variable (local). See Steps 1–2 below.
  10. ---
  11. ## Security: Never Hardcode Your API Token
  12. > **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.
  13. 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.
  14. ---
  15. ## Step 1: Set Up Your API Token as an Environment Variable
  16. ### macOS / Linux
  17. #### Option A: Set it in your shell profile (Recommended — persists across reboots)
  18. 1. Open a terminal.
  19. 2. Determine which shell you are using:
  20. ```bash
  21. echo $SHELL
  22. ```
  23. - If it outputs `/bin/zsh` → edit `~/.zshrc`
  24. - If it outputs `/bin/bash` → edit `~/.bashrc` or `~/.bash_profile`
  25. 3. Open the file in a text editor:
  26. ```bash
  27. # For zsh (default on macOS Monterey and later)
  28. nano ~/.zshrc
  29. # For bash
  30. nano ~/.bashrc
  31. ```
  32. 4. Add the following line at the bottom of the file:
  33. ```bash
  34. export DIGITALOCEAN_API_TOKEN="your_actual_token_here"
  35. ```
  36. Replace `your_actual_token_here` with your real token from the [DigitalOcean API Tokens page](https://cloud.digitalocean.com/account/api/tokens).
  37. 5. Save and exit:
  38. - In `nano`: press `Ctrl + O`, then `Enter` to save, then `Ctrl + X` to exit.
  39. 6. Reload your shell to apply the change:
  40. ```bash
  41. source ~/.zshrc # or source ~/.bashrc
  42. ```
  43. 7. Verify it is set correctly:
  44. ```bash
  45. echo $DIGITALOCEAN_API_TOKEN
  46. ```
  47. You should see your token printed in the terminal.
  48. #### Option B: Use a `.env` file (for project-level isolation)
  49. 1. In your project root folder, create a `.env` file:
  50. ```bash
  51. touch .env
  52. ```
  53. 2. Open it and add:
  54. ```
  55. DIGITALOCEAN_API_TOKEN=your_actual_token_here
  56. ```
  57. 3. **Immediately** add `.env` to your `.gitignore` so it is never committed:
  58. ```bash
  59. echo ".env" >> .gitignore
  60. ```
  61. 4. To load the `.env` file into your current terminal session:
  62. ```bash
  63. export $(grep -v '^#' .env | xargs)
  64. ```
  65. 5. Verify:
  66. ```bash
  67. echo $DIGITALOCEAN_API_TOKEN
  68. ```
  69. > **Note:** Option B only sets the variable for the current terminal session. You need to run step 4 each time you open a new terminal. For a permanent solution, use Option A.
  70. ---
  71. ### Windows
  72. #### Option A: Set it as a System Environment Variable (Recommended — persists across reboots)
  73. 1. Open **Start Menu** and search for **"Environment Variables"**.
  74. 2. Click **"Edit the system environment variables"**.
  75. 3. In the System Properties dialog, click the **"Environment Variables..."** button.
  76. 4. Under **"User variables"**, click **"New..."**.
  77. 5. Fill in:
  78. - **Variable name:** `DIGITALOCEAN_API_TOKEN`
  79. - **Variable value:** `your_actual_token_here`
  80. 6. Click **OK** on all dialogs to save.
  81. 7. **Restart your terminal** (Command Prompt or PowerShell) for the change to take effect.
  82. 8. Verify in PowerShell:
  83. ```powershell
  84. echo $env:DIGITALOCEAN_API_TOKEN
  85. ```
  86. Or in Command Prompt:
  87. ```cmd
  88. echo %DIGITALOCEAN_API_TOKEN%
  89. ```
  90. #### Option B: Set it temporarily in PowerShell (current session only)
  91. ```powershell
  92. $env:DIGITALOCEAN_API_TOKEN = "your_actual_token_here"
  93. ```
  94. #### Option C: Use a `.env` file on Windows
  95. 1. In your project folder, create a file named `.env` (no extension) with this content:
  96. ```
  97. DIGITALOCEAN_API_TOKEN=your_actual_token_here
  98. ```
  99. 2. Add `.env` to your `.gitignore`:
  100. ```
  101. .env
  102. ```
  103. 3. To load it in PowerShell:
  104. ```powershell
  105. Get-Content .env | ForEach-Object {
  106. if ($_ -match "^\s*([^#][^=]*)=(.*)$") {
  107. [System.Environment]::SetEnvironmentVariable($matches[1].Trim(), $matches[2].Trim(), "Process")
  108. }
  109. }
  110. ```
  111. 4. Verify:
  112. ```powershell
  113. echo $env:DIGITALOCEAN_API_TOKEN
  114. ```
  115. ---
  116. ## Step 2: Get Your DigitalOcean API Token
  117. 1. Log in to your DigitalOcean account.
  118. 2. Navigate to **API** → **Tokens** in the left sidebar, or go directly to: `https://cloud.digitalocean.com/account/api/tokens`
  119. 3. Click **"Generate New Token"**.
  120. 4. Give it a name (e.g., `mcp-local-dev`), set expiry, and choose the required scopes.
  121. 5. Copy the token immediately — it will only be shown once.
  122. 6. Store it using one of the methods described in Step 1 above.
  123. ---
  124. ## Installation
  125. ### Remote MCP (Recommended)
  126. The easiest way to get started is to use DigitalOcean's hosted MCP services, so you don't need to run a local server. You can connect in two ways:
  127. - **The MCP Router (recommended)** — a single endpoint that fronts all of DigitalOcean's first-party MCP services.
  128. - **Individual service endpoints** — one per service, added only for the services you need. See [Available Services](#available-services).
  129. These servers support **OAuth 2.0 (recommended)** and API-token auth — see [Authentication](#authentication). Each client section below shows both options.
  130. #### MCP Router (single endpoint)
  131. Connect once to `https://mcp.digitalocean.com/mcp` and your MCP client can discover and run tools across every service in the [Available Services](#available-services) table. The router forwards your credentials to the service that owns each tool, so you authenticate only once.
  132. The router exposes three tools that work together:
  133. | Tool | What it does |
  134. | ----------------- | --------------------------------------------------------------------------------------------------------------------------------------------- |
  135. | `find_tools` | Takes a natural-language query and returns a ranked shortlist of matching tools, each with a qualified name in `server/tool` form. Optional `limit` (default 5, max 25). |
  136. | `retrieve_schema` | Returns the input schema, and output schema when available, for one tool by its qualified name. |
  137. | `invoke_tool` | Runs a tool by its qualified name with arguments matching its input schema. Optional `projection` (dot-notation paths such as `droplet.id`) returns only selected fields of the structured result. |
  138. **Option A — OAuth (recommended).** Add just the URL; your client opens a browser to sign in to DigitalOcean on first use:
  139. ```json
  140. {
  141. "mcpServers": {
  142. "digitalocean": {
  143. "url": "https://mcp.digitalocean.com/mcp"
  144. }
  145. }
  146. }
  147. ```
  148. **Option B — API token.** Send a DigitalOcean [personal access token](https://cloud.digitalocean.com/account/api/tokens) as a Bearer header. Use your client's variable substitution to keep the token out of the file (see [Security](#security-never-hardcode-your-api-token)):
  149. ```json
  150. {
  151. "mcpServers": {
  152. "digitalocean": {
  153. "url": "https://mcp.digitalocean.com/mcp",
  154. "headers": {
  155. "Authorization": "Bearer ${DIGITALOCEAN_API_TOKEN}"
  156. }
  157. }
  158. }
  159. }
  160. ```
  161. In Claude Code:
  162. ```bash
  163. claude mcp add --transport http digitalocean --scope user https://mcp.digitalocean.com/mcp
  164. ```
  165. Then run `/mcp`, select `digitalocean`, and sign in.
  166. Once connected, ask your assistant things like:
  167. - "List my Droplets in `nyc3` and show which ones are powered off."
  168. - "Deploy this repo to App Platform and tell me when the deployment is live."
  169. - "Create a 3-node Kubernetes cluster in `sfo3` and give me the kubeconfig."
  170. - "Show the configuration of my managed Postgres cluster and list its recent backups."
  171. #### Available Services
  172. | Service | Remote MCP URL | Description |
  173. | ---------------------- | ------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------- |
  174. | apps | https://apps.mcp.digitalocean.com/mcp | Manage DigitalOcean App Platform applications, including deployments and configurations. |
  175. | accounts | https://accounts.mcp.digitalocean.com/mcp | Get information about your DigitalOcean account, billing, balance, invoices, and SSH keys. |
  176. | databases | https://databases.mcp.digitalocean.com/mcp | Provision, manage, and monitor managed database clusters (Postgres, MySQL, Redis, etc.). |
  177. | doks | https://doks.mcp.digitalocean.com/mcp | Manage DigitalOcean Kubernetes clusters and node pools. |
  178. | droplets | https://droplets.mcp.digitalocean.com/mcp | Create, manage, resize, snapshot, and monitor droplets (virtual machines) on DigitalOcean. |
  179. | microvms | https://microvms.mcp.digitalocean.com/mcp | Create, list, get, pause, resume, exec, read/write files, checkpoint, and delete DigitalOcean MicroVMs. See [MicroVM Service](pkg/registry/microdroplet/README.md). |
  180. | docr | https://docr.mcp.digitalocean.com/mcp | Manage DigitalOcean Container Registry repositories, tags, manifests, and garbage collection. |
  181. | genai-batchinference | https://genai-batchinference.mcp.digitalocean.com/mcp | Create, manage, and monitor batch inference jobs for asynchronous bulk AI processing. |
  182. | signals | https://signals.mcp.digitalocean.com/mcp | Investigate Gradient agent and serverless inference sessions, segments, and consent for DigitalOcean Signals. |
  183. | harness-runtime | https://harness-runtime.mcp.digitalocean.com/mcp | List and inspect hosted agent configs for DigitalOcean Harness Runtime. |
  184. | genai-custom-models | https://genai-custom-models.mcp.digitalocean.com/mcp | Import, list, update, and delete custom (bring-your-own) models on DigitalOcean's GenAI platform. |
  185. | genai-inferencerouter | https://genai-inferencerouter.mcp.digitalocean.com/mcp | Create, list, get, and delete GenAI model routers. |
  186. | dedicated-inference | https://dedicated-inference.mcp.digitalocean.com/mcp | Manage Dedicated Inference instances for GPU-accelerated model serving. |
  187. | inference-modelcatalog | https://inference-modelcatalog.mcp.digitalocean.com/mcp | Browse the DigitalOcean Inference model catalog, search for models, and get model cards. |
  188. | insights | https://insights.mcp.digitalocean.com/mcp | Monitors your resources, endpoints and alert you when they're slow, unavailable, or SSL certificates are expiring. |
  189. | marketplace | https://marketplace.mcp.digitalocean.com/mcp | Discover and manage DigitalOcean Marketplace applications. |
  190. | networking | https://networking.mcp.digitalocean.com/mcp | Manage domains, DNS records, certificates, firewalls, load balancers, reserved IPs, BYOIP Prefixes, VPCs, and CDNs. |
  191. | functions | https://functions.mcp.digitalocean.com/mcp | Manage serverless function namespaces, actions, packages, triggers, and activations. |
  192. | spaces | https://spaces.mcp.digitalocean.com/mcp | DigitalOcean Spaces object storage and Spaces access keys for S3-compatible storage. |
  193. | docs | https://docs.mcp.digitalocean.com/mcp | Search and retrieve DigitalOcean public documentation. No API token required. |
  194. | genai-evaluation | https://genai-evaluation.mcp.digitalocean.com/mcp | Manage and run evaluation workflows in DigitalOcean's GenAI platform. |
  195. | nfs | https://nfs.mcp.digitalocean.com/mcp | Manage DigitalOcean NFS file shares and file share snapshots. |
  196. | volumes | https://volumes.mcp.digitalocean.com/mcp | Manage DigitalOcean block storage volumes and volume snapshots. |
  197. | vector-databases | https://vector-databases.mcp.digitalocean.com/mcp | Create, list, resize, delete, and inspect managed Weaviate vector database clusters. |
  198. ---
  199. ### Claude Code
  200. #### Remote MCP (Recommended)
  201. **Option A — OAuth (recommended).** Add the server with no `Authorization` header; Claude prompts you to sign in on first use:
  202. ```bash
  203. claude mcp add --transport http digitalocean-apps https://apps.mcp.digitalocean.com/mcp
  204. ```
  205. **Option B — API token.** Make sure you have completed Step 1 and your `DIGITALOCEAN_API_TOKEN` environment variable is set. Then run:
  206. ```bash
  207. claude mcp add --transport http digitalocean-apps https://apps.mcp.digitalocean.com/mcp \
  208. --header "Authorization: Bearer $DIGITALOCEAN_API_TOKEN"
  209. ```
  210. > **How this works:** The `$DIGITALOCEAN_API_TOKEN` is expanded by your shell at the time you run the command. The actual token value is stored securely in Claude's config — you never paste the token into the command yourself.
  211. You can add multiple services the same way:
  212. ```bash
  213. claude mcp add --transport http digitalocean-databases https://databases.mcp.digitalocean.com/mcp \
  214. --header "Authorization: Bearer $DIGITALOCEAN_API_TOKEN"
  215. claude mcp add --transport http digitalocean-droplets https://droplets.mcp.digitalocean.com/mcp \
  216. --header "Authorization: Bearer $DIGITALOCEAN_API_TOKEN"
  217. ```
  218. See the [Available Services](#available-services) section for the complete list of available endpoints.
  219. #### Local Installation
  220. ```bash
  221. claude mcp add digitalocean-mcp \
  222. -e DIGITALOCEAN_API_TOKEN=$DIGITALOCEAN_API_TOKEN \
  223. -- npx @digitalocean/mcp --services apps,databases
  224. ```
  225. This will:
  226. - Add the MCP server under the default (local) scope — meaning it's only available inside the current folder.
  227. - Register it with the name `digitalocean-mcp`.
  228. - Enable the `apps` and `databases` services.
  229. - Pass your DigitalOcean API token securely to the server via environment variable.
  230. - Store the configuration in your global Claude config at `~/.claude.json`, scoped to the current folder.
  231. #### Verify Installation
  232. To confirm it's been added:
  233. ```bash
  234. claude mcp list
  235. ```
  236. #### Inspect Details
  237. To inspect details:
  238. ```bash
  239. claude mcp get digitalocean-mcp
  240. ```
  241. #### Remove Server
  242. To remove it:
  243. ```bash
  244. claude mcp remove digitalocean-mcp
  245. ```
  246. ##### User Scope
  247. Local scope is great when you're testing or only using the server in one project. User scope is better if you want it available everywhere.
  248. If you'd like to make the server available globally (so you don't have to re-add it in each project), you can use the `user` scope:
  249. ```bash
  250. claude mcp add -s user digitalocean-mcp-user-scope \
  251. -e DIGITALOCEAN_API_TOKEN=$DIGITALOCEAN_API_TOKEN \
  252. -- npx @digitalocean/mcp --services apps,databases
  253. ```
  254. This will:
  255. - Make the server available in all folders, not just the one you're in
  256. - Scope it to your user account
  257. - Store it in your global Claude config at `~/.claude.json`
  258. To remove it:
  259. ```bash
  260. claude mcp remove -s user digitalocean-mcp-user-scope
  261. ```
  262. ---
  263. ### Claude Desktop
  264. #### Remote MCP (Recommended)
  265. **Before editing the config file**, ensure `DIGITALOCEAN_API_TOKEN` is set in your shell profile (see Step 1 — Option A). Claude Desktop reads environment variables from your shell profile at launch.
  266. The config file is located at:
  267. - **macOS:** `~/Library/Application Support/Claude/claude_desktop_config.json`
  268. - **Windows:** `%APPDATA%\Claude\claude_desktop_config.json`
  269. - **Linux:** `~/.config/Claude/claude_desktop_config.json`
  270. **Option A — OAuth (recommended).** Claude Desktop connects to remote servers through the [`mcp-remote`](https://www.npmjs.com/package/mcp-remote) bridge, which opens a browser for you to sign in to DigitalOcean on first use:
  271. ```json
  272. {
  273. "mcpServers": {
  274. "digitalocean-apps": {
  275. "command": "npx",
  276. "args": ["mcp-remote", "https://apps.mcp.digitalocean.com/mcp"]
  277. }
  278. }
  279. }
  280. ```
  281. **Option B — API token.** Add the remote MCP servers to your config file. Reference the env var using `${DIGITALOCEAN_API_TOKEN}` — Claude Desktop will substitute it at runtime:
  282. ```json
  283. {
  284. "mcpServers": {
  285. "digitalocean-apps": {
  286. "url": "https://apps.mcp.digitalocean.com/mcp",
  287. "headers": {
  288. "Authorization": "Bearer ${DIGITALOCEAN_API_TOKEN}"
  289. }
  290. },
  291. "digitalocean-databases": {
  292. "url": "https://databases.mcp.digitalocean.com/mcp",
  293. "headers": {
  294. "Authorization": "Bearer ${DIGITALOCEAN_API_TOKEN}"
  295. }
  296. }
  297. }
  298. }
  299. ```
  300. > **Important:** The `${DIGITALOCEAN_API_TOKEN}` syntax tells Claude Desktop to read the value from your system's environment variables. Your actual token is never written into this file. This file is safe to commit to version control.
  301. You can add any of the endpoints listed in the [Available Services](#available-services) section.
  302. #### Local Installation
  303. Add the following to your `claude_desktop_config.json` file. The `env` block passes the environment variable directly to the MCP server process — no hardcoded token needed:
  304. ```json
  305. {
  306. "mcpServers": {
  307. "digitalocean": {
  308. "command": "npx",
  309. "args": ["@digitalocean/mcp", "--services", "apps"],
  310. "env": {
  311. "DIGITALOCEAN_API_TOKEN": "${DIGITALOCEAN_API_TOKEN}"
  312. }
  313. }
  314. }
  315. }
  316. ```
  317. > **How this works:** The `"env"` block in Claude Desktop config passes environment variables to the spawned MCP server process. The `${DIGITALOCEAN_API_TOKEN}` value is resolved from your system environment at runtime. Your token is never stored in the config file itself.
  318. After saving the file, **restart Claude Desktop** for the changes to take effect.
  319. ---
  320. ### Cursor
  321. #### Remote MCP (Recommended)
  322. **Before editing the config file**, ensure `DIGITALOCEAN_API_TOKEN` is set in your shell profile (see Step 1 — Option A).
  323. The Cursor config file is located at:
  324. - **macOS / Linux:** `~/.cursor/config.json`
  325. - **Windows:** `%USERPROFILE%\.cursor\config.json`
  326. **Option A — OAuth (recommended).** Add just the URL with no `headers` block; Cursor prompts you to sign in on first use:
  327. ```json
  328. {
  329. "mcpServers": {
  330. "digitalocean-apps": {
  331. "url": "https://apps.mcp.digitalocean.com/mcp"
  332. }
  333. }
  334. }
  335. ```
  336. **Option B — API token.** Add the remote MCP servers to your Cursor settings file:
  337. ```json
  338. {
  339. "mcpServers": {
  340. "digitalocean-apps": {
  341. "url": "https://apps.mcp.digitalocean.com/mcp",
  342. "headers": {
  343. "Authorization": "Bearer ${DIGITALOCEAN_API_TOKEN}"
  344. }
  345. },
  346. "digitalocean-databases": {
  347. "url": "https://databases.mcp.digitalocean.com/mcp",
  348. "headers": {
  349. "Authorization": "Bearer ${DIGITALOCEAN_API_TOKEN}"
  350. }
  351. }
  352. }
  353. }
  354. ```
  355. You can add any of the endpoints listed in the [Available Services](#available-services) section.
  356. #### Local Installation
  357. [![Install MCP Server](https://cursor.com/deeplink/mcp-install-dark.svg)](https://cursor.com/en/install-mcp?name=digitalocean&config=eyJjb21tYW5kIjoibnB4IEBkaWdpdGFsb2NlYW4vbWNwIC0tc2VydmljZXMgYXBwcyIsImVudiI6eyJESUdJVEFMT0NFQU5fQVBJX1RPS0VOIjoiWU9VUl9BUElfVE9LRU4ifX0%3D)
  358. Add the following to your Cursor settings file located at `~/.cursor/config.json`:
  359. ```json
  360. {
  361. "mcpServers": {
  362. "digitalocean": {
  363. "command": "npx",
  364. "args": ["@digitalocean/mcp", "--services", "apps"],
  365. "env": {
  366. "DIGITALOCEAN_API_TOKEN": "${DIGITALOCEAN_API_TOKEN}"
  367. }
  368. }
  369. }
  370. }
  371. ```
  372. > **How this works:** Cursor resolves `${DIGITALOCEAN_API_TOKEN}` from your system environment variables when it launches the MCP server. Make sure the variable is set in your shell profile before starting Cursor.
  373. ##### Verify Installation
  374. 1. Open Cursor and open Command Palette (`Shift + ⌘ + P` on Mac or `Ctrl + Shift + P` on Windows/Linux)
  375. 2. Search for "MCP" in the command palette search bar
  376. 3. Select "View: Open MCP Settings"
  377. 4. Select "Tools & Integrations" from the left sidebar
  378. 5. You should see "digitalocean" listed under Available MCP Servers
  379. 6. Click on "N tools enabled" (N is the number of tools currently enabled)
  380. ##### Debugging
  381. To check MCP server logs and debug issues:
  382. 1. Open the Command Palette (`⌘+Shift+P` on Mac or `Ctrl+Shift+P` on Windows/Linux)
  383. 2. Type "Developer: Toggle Developer Tools" and press Enter
  384. 3. Navigate to the Console tab to view MCP server logs
  385. 4. You'll find MCP related logs as you interact with the MCP server
  386. ##### Testing the Connection
  387. In Cursor's chat, try asking: "List all my DigitalOcean apps" — this should trigger the MCP server to fetch your apps if properly configured. If you are getting a 401 error or authentication related errors, verify that the `DIGITALOCEAN_API_TOKEN` variable is correctly set by running `echo $DIGITALOCEAN_API_TOKEN` in your terminal.
  388. ---
  389. ### VS Code
  390. #### Remote MCP (Recommended)
  391. **Before editing the config file**, ensure `DIGITALOCEAN_API_TOKEN` is set in your shell profile (see Step 1 — Option A).
  392. The VS Code MCP config file is located at `.vscode/mcp.json` in your workspace root. Create this file if it does not exist.
  393. **Option A — OAuth (recommended).** Add just the URL with no `headers` block; VS Code prompts you to sign in on first use:
  394. ```json
  395. {
  396. "servers": {
  397. "digitalocean-apps": {
  398. "url": "https://apps.mcp.digitalocean.com/mcp"
  399. }
  400. }
  401. }
  402. ```
  403. **Option B — API token.** Add the remote MCP servers, using VS Code's `inputs` feature to prompt for the token securely:
  404. ```json
  405. {
  406. "inputs": [
  407. {
  408. "id": "digitalocean-token",
  409. "type": "promptString",
  410. "description": "DigitalOcean API Token",
  411. "password": true
  412. }
  413. ],
  414. "servers": {
  415. "digitalocean-apps": {
  416. "url": "https://apps.mcp.digitalocean.com/mcp",
  417. "headers": {
  418. "Authorization": "Bearer ${input:digitalocean-token}"
  419. }
  420. },
  421. "digitalocean-databases": {
  422. "url": "https://databases.mcp.digitalocean.com/mcp",
  423. "headers": {
  424. "Authorization": "Bearer ${input:digitalocean-token}"
  425. }
  426. }
  427. }
  428. }
  429. ```
  430. > **How VS Code inputs work:** The `inputs` block defines a named input (`digitalocean-token`) that VS Code will **prompt you to enter securely** the first time you use the server. Your token is stored in VS Code's secret storage — never written to disk in plain text. The `"password": true` flag ensures it is masked during input. This config file is completely safe to commit to GitHub.
  431. Alternatively, if you prefer to use a system environment variable directly:
  432. ```json
  433. {
  434. "inputs": [],
  435. "servers": {
  436. "digitalocean-apps": {
  437. "url": "https://apps.mcp.digitalocean.com/mcp",
  438. "headers": {
  439. "Authorization": "Bearer ${env:DIGITALOCEAN_API_TOKEN}"
  440. }
  441. }
  442. }
  443. }
  444. ```
  445. > **Note:** VS Code uses `${env:VARIABLE_NAME}` syntax to read from system environment variables.
  446. #### Local Installation
  447. Add the following to your `.vscode/mcp.json` file. Use VS Code's `inputs` feature to avoid hardcoding the token:
  448. ```json
  449. {
  450. "inputs": [
  451. {
  452. "id": "digitalocean-token",
  453. "type": "promptString",
  454. "description": "DigitalOcean API Token",
  455. "password": true
  456. }
  457. ],
  458. "servers": {
  459. "mcpDigitalOcean": {
  460. "command": "npx",
  461. "args": ["@digitalocean/mcp", "--services", "apps"],
  462. "env": {
  463. "DIGITALOCEAN_API_TOKEN": "${input:digitalocean-token}"
  464. }
  465. }
  466. }
  467. }
  468. ```
  469. Or, to use a system environment variable directly:
  470. ```json
  471. {
  472. "inputs": [],
  473. "servers": {
  474. "mcpDigitalOcean": {
  475. "command": "npx",
  476. "args": ["@digitalocean/mcp", "--services", "apps"],
  477. "env": {
  478. "DIGITALOCEAN_API_TOKEN": "${env:DIGITALOCEAN_API_TOKEN}"
  479. }
  480. }
  481. }
  482. }
  483. ```
  484. ##### Verify Installation
  485. 1. Open VS Code and open Command Palette (`Shift + ⌘ + P` on Mac or `Ctrl + Shift + P` on Windows/Linux)
  486. 2. Search for "MCP" in the command palette search bar
  487. 3. Select "MCP: List Servers"
  488. 4. Verify that "mcpDigitalOcean" appears in the list of configured servers
  489. ##### Viewing Available Tools
  490. To see what tools are available from the MCP server:
  491. 1. Open the Command Palette (`⌘+Shift+P` on Mac or `Ctrl+Shift+P` on Windows/Linux)
  492. 2. Select "Agent" mode in the chatbox
  493. 3. Click "Configure tools" on the right, and check for DigitalOcean related tools under `MCP Server: mcpDigitalocean`. You should be able to list available tools like `app-create`, `app-list`, `app-delete`, etc.
  494. ##### Debugging
  495. To troubleshoot MCP connections:
  496. 1. Open the Command Palette (`⌘+Shift+P` on Mac or `Ctrl+Shift+P` on Windows/Linux)
  497. 2. Type "Developer: Toggle Developer Tools" and press Enter
  498. 3. Navigate to the Console tab to view MCP server logs
  499. 4. Check for connection status and error messages
  500. If you are getting a 401 error or authentication related errors, verify that the `DIGITALOCEAN_API_TOKEN` variable is set by running `echo $DIGITALOCEAN_API_TOKEN` in your terminal before launching VS Code.
  501. ---
  502. ## Step 3: Protect Your Token — Checklist
  503. Before pushing any code to GitHub, verify the following:
  504. - [ ] Your `.env` file (if used) is listed in `.gitignore`
  505. - [ ] No config file contains a raw token string like `dop_v1_...`
  506. - [ ] Config files use `${DIGITALOCEAN_API_TOKEN}`, `${env:DIGITALOCEAN_API_TOKEN}`, or `${input:...}` syntax
  507. - [ ] You have run `git diff` or `git status` to confirm no secrets are staged
  508. - [ ] You have never committed a token — if you have, [rotate it immediately](https://cloud.digitalocean.com/account/api/tokens) and revoke the old one
  509. > **If your token was already committed:** Go to the [DigitalOcean API Tokens page](https://cloud.digitalocean.com/account/api/tokens), delete the compromised token, and generate a new one. GitHub's secret scanning will detect and flag exposed tokens automatically.
  510. ---
  511. ## Prerequisites for Local Installation
  512. If you're using the local installation method (not Remote MCP), you'll need:
  513. - Node.js (v18 or later)
  514. - NPM (v8 or later)
  515. You can find installation guides at [https://nodejs.org/en/download](https://nodejs.org/en/download)
  516. Verify your installation:
  517. ```bash
  518. node --version
  519. npm --version
  520. ```
  521. ### Quick Test
  522. To verify the local MCP server works correctly, you can test it directly from the command line (make sure `DIGITALOCEAN_API_TOKEN` is set in your environment first):
  523. ```bash
  524. npx @digitalocean/mcp --services apps
  525. ```
  526. ---
  527. ## Configuration
  528. ### Local Installation Configuration
  529. When using the local installation, you use the `--services` flag to specify which service you want to enable. It is highly recommended to only enable the services you need to reduce context size and improve accuracy. See list of supported services below.
  530. ```bash
  531. npx @digitalocean/mcp --services apps,droplets
  532. ```
  533. ## Documentation
  534. Each service provides a detailed README describing all available tools, resources, arguments, and example queries. See the following files for full documentation:
  535. - [Apps Service](pkg/registry/apps/README.md)
  536. - [Droplet Service](pkg/registry/droplet/README.md)
  537. - [Account Service](pkg/registry/account/README.md)
  538. - [Networking Service](pkg/registry/networking/README.md)
  539. - [Databases Service](pkg/registry/dbaas/README.md)
  540. - [Insights Service](pkg/registry/insights/README.md)
  541. - [Spaces Service](pkg/registry/spaces/README.md)
  542. - [Marketplace Service](pkg/registry/marketplace/README.md)
  543. - [Functions Service](pkg/registry/functions/README.md)
  544. - [DOKS Service](pkg/registry/doks/README.md)
  545. - [DOCR Service](pkg/registry/docr/README.md)
  546. - [Dedicated Inference Service](pkg/registry/dedicated-inference/README.md)
  547. - [Inference Model Catalog Service](pkg/registry/inference-modelcatalog/README.md)
  548. - [Docs Service](pkg/registry/docs/README.md)
  549. - [GenAI evaluation](pkg/registry/genai/README.md)
  550. - [GenAI Batch Inference Service](pkg/registry/genai-batchinference/README.md)
  551. - [Signals Service](pkg/registry/signals/README.md)
  552. - [Harness Runtime Service](pkg/registry/harness-runtime/README.md)
  553. - [MicroVM Service](pkg/registry/microdroplet/README.md)
  554. - [GenAI Custom Models Service](pkg/registry/genai-custom-models/README.md)
  555. - [GenAI Inference Router](pkg/registry/genai-inferencerouter/README.md)
  556. - [NFS Service](pkg/registry/nfs/README.md)
  557. - [Volumes Service](pkg/registry/volumes/README.md)
  558. - [Vector Databases Service](pkg/registry/vectordb/README.md)
  559. ## Example Tools
  560. - Search Catalog models by name: `inference-model-catalog-search`
  561. - Open full metadata for one catalog model: `inference-model-catalog-get-card`
  562. - Deploy an app from a GitHub repo: `create-app-from-spec`
  563. - Resize a droplet: `droplet-resize`
  564. - Run a command in a MicroVM: `microvm-exec`
  565. - Write a file into a MicroVM: `microvm-file-write`
  566. - Add a new SSH key: `key-create`
  567. - Create a new domain: `domain-create`
  568. - Enable backups on a droplet: `droplet-enable-backups`
  569. - Flush a CDN cache: `cdn-flush-cache`
  570. - Create a VPC peering connection: `vpc-peering-create`
  571. - Delete a VPC peering connection: `vpc-peering-delete`
  572. - Search DigitalOcean documentation: `docs-search`
  573. - Get a quickstart guide for a service: `docs-get-quickstart`
  574. - Find troubleshooting docs for an error: `docs-troubleshoot`
  575. - Discover pages related to a docs page: `docs-get-related`
  576. ## Contributing
  577. Contributions are welcome! If you encounter any issues or have ideas for improvements, feel free to open an issue or submit a pull request.
  578. 1. Fork the repository.
  579. 2. Create a new branch for your feature or bug fix.
  580. 3. Submit a pull request with a clear description of your changes.
  581. ## License
  582. This project is licensed under the MIT License. See the [LICENSE](LICENSE) file for details.

Ratings and comments

Sign in to rate this skill.

Sign in

Free to use. If it’s helped, pass it on.