@digitalocean/mcp 1.0.30 → 1.0.37
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +449 -87
- package/dist/app-create-schema.json +33 -0
- package/dist/app-update-schema.json +33 -0
- package/dist/cluster-create-schema.json +16 -0
- package/dist/mcp-digitalocean-darwin-amd64 +0 -0
- package/dist/mcp-digitalocean-darwin-arm64 +0 -0
- package/dist/mcp-digitalocean-linux-386 +0 -0
- package/dist/mcp-digitalocean-linux-amd64 +0 -0
- package/dist/mcp-digitalocean-linux-arm +0 -0
- package/dist/mcp-digitalocean-linux-arm64 +0 -0
- package/dist/mcp-digitalocean-windows-386.exe +0 -0
- package/dist/mcp-digitalocean-windows-amd64.exe +0 -0
- package/dist/mcp-digitalocean-windows-arm64.exe +0 -0
- package/package.json +1 -1
- package/dist/mcp-digitalocean-windows-arm.exe +0 -0
package/README.md
CHANGED
|
@@ -4,36 +4,211 @@ MCP DigitalOcean Integration is an open-source project that provides a comprehen
|
|
|
4
4
|
|
|
5
5
|
> **DISCLAIMER:** "Use of MCP technology to interact with your DigitalOcean account [can come with risks](https://www.wiz.io/blog/mcp-security-research-briefing)"
|
|
6
6
|
|
|
7
|
-
|
|
7
|
+
---
|
|
8
8
|
|
|
9
|
-
|
|
10
|
-
- NPM (v8 or later)
|
|
9
|
+
## Security: Never Hardcode Your API Token
|
|
11
10
|
|
|
12
|
-
|
|
11
|
+
> **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
12
|
|
|
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
14
|
|
|
15
|
-
|
|
16
|
-
```bash
|
|
17
|
-
node --version
|
|
18
|
-
npm --version
|
|
19
|
-
```
|
|
15
|
+
---
|
|
20
16
|
|
|
21
|
-
##
|
|
17
|
+
## Step 1: Set Up Your API Token as an Environment Variable
|
|
22
18
|
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
19
|
+
### macOS / Linux
|
|
20
|
+
|
|
21
|
+
#### Option A: Set it in your shell profile (Recommended — persists across reboots)
|
|
22
|
+
|
|
23
|
+
1. Open a terminal.
|
|
24
|
+
|
|
25
|
+
2. Determine which shell you are using:
|
|
26
|
+
```bash
|
|
27
|
+
echo $SHELL
|
|
28
|
+
```
|
|
29
|
+
- If it outputs `/bin/zsh` → edit `~/.zshrc`
|
|
30
|
+
- If it outputs `/bin/bash` → edit `~/.bashrc` or `~/.bash_profile`
|
|
31
|
+
|
|
32
|
+
3. Open the file in a text editor:
|
|
33
|
+
```bash
|
|
34
|
+
# For zsh (default on macOS Monterey and later)
|
|
35
|
+
nano ~/.zshrc
|
|
36
|
+
|
|
37
|
+
# For bash
|
|
38
|
+
nano ~/.bashrc
|
|
39
|
+
```
|
|
40
|
+
|
|
41
|
+
4. Add the following line at the bottom of the file:
|
|
42
|
+
```bash
|
|
43
|
+
export DIGITALOCEAN_API_TOKEN="your_actual_token_here"
|
|
44
|
+
```
|
|
45
|
+
Replace `your_actual_token_here` with your real token from the [DigitalOcean API Tokens page](https://cloud.digitalocean.com/account/api/tokens).
|
|
46
|
+
|
|
47
|
+
5. Save and exit:
|
|
48
|
+
- In `nano`: press `Ctrl + O`, then `Enter` to save, then `Ctrl + X` to exit.
|
|
49
|
+
|
|
50
|
+
6. Reload your shell to apply the change:
|
|
51
|
+
```bash
|
|
52
|
+
source ~/.zshrc # or source ~/.bashrc
|
|
53
|
+
```
|
|
54
|
+
|
|
55
|
+
7. Verify it is set correctly:
|
|
56
|
+
```bash
|
|
57
|
+
echo $DIGITALOCEAN_API_TOKEN
|
|
58
|
+
```
|
|
59
|
+
You should see your token printed in the terminal.
|
|
60
|
+
|
|
61
|
+
#### Option B: Use a `.env` file (for project-level isolation)
|
|
62
|
+
|
|
63
|
+
1. In your project root folder, create a `.env` file:
|
|
64
|
+
```bash
|
|
65
|
+
touch .env
|
|
66
|
+
```
|
|
67
|
+
|
|
68
|
+
2. Open it and add:
|
|
69
|
+
```
|
|
70
|
+
DIGITALOCEAN_API_TOKEN=your_actual_token_here
|
|
71
|
+
```
|
|
72
|
+
|
|
73
|
+
3. **Immediately** add `.env` to your `.gitignore` so it is never committed:
|
|
74
|
+
```bash
|
|
75
|
+
echo ".env" >> .gitignore
|
|
76
|
+
```
|
|
77
|
+
|
|
78
|
+
4. To load the `.env` file into your current terminal session:
|
|
79
|
+
```bash
|
|
80
|
+
export $(grep -v '^#' .env | xargs)
|
|
81
|
+
```
|
|
82
|
+
|
|
83
|
+
5. Verify:
|
|
84
|
+
```bash
|
|
85
|
+
echo $DIGITALOCEAN_API_TOKEN
|
|
86
|
+
```
|
|
87
|
+
|
|
88
|
+
> **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.
|
|
89
|
+
|
|
90
|
+
---
|
|
91
|
+
|
|
92
|
+
### Windows
|
|
93
|
+
|
|
94
|
+
#### Option A: Set it as a System Environment Variable (Recommended — persists across reboots)
|
|
95
|
+
|
|
96
|
+
1. Open **Start Menu** and search for **"Environment Variables"**.
|
|
97
|
+
2. Click **"Edit the system environment variables"**.
|
|
98
|
+
3. In the System Properties dialog, click the **"Environment Variables..."** button.
|
|
99
|
+
4. Under **"User variables"**, click **"New..."**.
|
|
100
|
+
5. Fill in:
|
|
101
|
+
- **Variable name:** `DIGITALOCEAN_API_TOKEN`
|
|
102
|
+
- **Variable value:** `your_actual_token_here`
|
|
103
|
+
6. Click **OK** on all dialogs to save.
|
|
104
|
+
7. **Restart your terminal** (Command Prompt or PowerShell) for the change to take effect.
|
|
105
|
+
8. Verify in PowerShell:
|
|
106
|
+
```powershell
|
|
107
|
+
echo $env:DIGITALOCEAN_API_TOKEN
|
|
108
|
+
```
|
|
109
|
+
Or in Command Prompt:
|
|
110
|
+
```cmd
|
|
111
|
+
echo %DIGITALOCEAN_API_TOKEN%
|
|
112
|
+
```
|
|
113
|
+
|
|
114
|
+
#### Option B: Set it temporarily in PowerShell (current session only)
|
|
115
|
+
|
|
116
|
+
```powershell
|
|
117
|
+
$env:DIGITALOCEAN_API_TOKEN = "your_actual_token_here"
|
|
26
118
|
```
|
|
27
119
|
|
|
120
|
+
#### Option C: Use a `.env` file on Windows
|
|
121
|
+
|
|
122
|
+
1. In your project folder, create a file named `.env` (no extension) with this content:
|
|
123
|
+
```
|
|
124
|
+
DIGITALOCEAN_API_TOKEN=your_actual_token_here
|
|
125
|
+
```
|
|
126
|
+
|
|
127
|
+
2. Add `.env` to your `.gitignore`:
|
|
128
|
+
```
|
|
129
|
+
.env
|
|
130
|
+
```
|
|
131
|
+
|
|
132
|
+
3. To load it in PowerShell:
|
|
133
|
+
```powershell
|
|
134
|
+
Get-Content .env | ForEach-Object {
|
|
135
|
+
if ($_ -match "^\s*([^#][^=]*)=(.*)$") {
|
|
136
|
+
[System.Environment]::SetEnvironmentVariable($matches[1].Trim(), $matches[2].Trim(), "Process")
|
|
137
|
+
}
|
|
138
|
+
}
|
|
139
|
+
```
|
|
140
|
+
|
|
141
|
+
4. Verify:
|
|
142
|
+
```powershell
|
|
143
|
+
echo $env:DIGITALOCEAN_API_TOKEN
|
|
144
|
+
```
|
|
145
|
+
|
|
146
|
+
---
|
|
147
|
+
|
|
148
|
+
## Step 2: Get Your DigitalOcean API Token
|
|
149
|
+
|
|
150
|
+
1. Log in to your DigitalOcean account.
|
|
151
|
+
2. Navigate to **API** → **Tokens** in the left sidebar, or go directly to: `https://cloud.digitalocean.com/account/api/tokens`
|
|
152
|
+
3. Click **"Generate New Token"**.
|
|
153
|
+
4. Give it a name (e.g., `mcp-local-dev`), set expiry, and choose the required scopes.
|
|
154
|
+
5. Copy the token immediately — it will only be shown once.
|
|
155
|
+
6. Store it using one of the methods described in Step 1 above.
|
|
156
|
+
|
|
157
|
+
---
|
|
158
|
+
|
|
28
159
|
## Installation
|
|
29
160
|
|
|
161
|
+
### Remote MCP (Recommended)
|
|
162
|
+
|
|
163
|
+
The easiest way to get started is to use DigitalOcean's hosted MCP services. Each service is deployed as a standalone MCP server accessible via HTTPS, allowing you to connect without running any local server. You can connect to multiple endpoints simultaneously by adding multiple entries to your configuration.
|
|
164
|
+
|
|
165
|
+
#### Available Services
|
|
166
|
+
|
|
167
|
+
| Service | Remote MCP URL | Description |
|
|
168
|
+
|--------------|---------------------------------------------|-----------------------------------------------------------------------------------------|
|
|
169
|
+
| apps | https://apps.mcp.digitalocean.com/mcp | Manage DigitalOcean App Platform applications, including deployments and configurations. |
|
|
170
|
+
| accounts | https://accounts.mcp.digitalocean.com/mcp | Get information about your DigitalOcean account, billing, balance, invoices, and SSH keys. |
|
|
171
|
+
| databases | https://databases.mcp.digitalocean.com/mcp | Provision, manage, and monitor managed database clusters (Postgres, MySQL, Redis, etc.). |
|
|
172
|
+
| doks | https://doks.mcp.digitalocean.com/mcp | Manage DigitalOcean Kubernetes clusters and node pools. |
|
|
173
|
+
| droplets | https://droplets.mcp.digitalocean.com/mcp | Create, manage, resize, snapshot, and monitor droplets (virtual machines) on DigitalOcean. |
|
|
174
|
+
| docr | https://docr.mcp.digitalocean.com/mcp | Manage DigitalOcean Container Registry repositories, tags, manifests, and garbage collection. |
|
|
175
|
+
| insights | https://insights.mcp.digitalocean.com/mcp | Monitors your resources, endpoints and alert you when they're slow, unavailable, or SSL certificates are expiring. |
|
|
176
|
+
| marketplace | https://marketplace.mcp.digitalocean.com/mcp| Discover and manage DigitalOcean Marketplace applications. |
|
|
177
|
+
| networking | https://networking.mcp.digitalocean.com/mcp | Manage domains, DNS records, certificates, firewalls, load balancers, reserved IPs, BYOIP Prefixes, VPCs, and CDNs. |
|
|
178
|
+
| spaces | https://spaces.mcp.digitalocean.com/mcp | DigitalOcean Spaces object storage and Spaces access keys for S3-compatible storage. |
|
|
179
|
+
|
|
180
|
+
---
|
|
181
|
+
|
|
30
182
|
### Claude Code
|
|
31
183
|
|
|
32
|
-
|
|
184
|
+
#### Remote MCP (Recommended)
|
|
185
|
+
|
|
186
|
+
Make sure you have completed Step 1 and your `DIGITALOCEAN_API_TOKEN` environment variable is set. Then run:
|
|
187
|
+
|
|
188
|
+
```bash
|
|
189
|
+
claude mcp add --transport http digitalocean-apps https://apps.mcp.digitalocean.com/mcp \
|
|
190
|
+
--header "Authorization: Bearer $DIGITALOCEAN_API_TOKEN"
|
|
191
|
+
```
|
|
192
|
+
|
|
193
|
+
> **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.
|
|
194
|
+
|
|
195
|
+
You can add multiple services the same way:
|
|
196
|
+
|
|
197
|
+
```bash
|
|
198
|
+
claude mcp add --transport http digitalocean-databases https://databases.mcp.digitalocean.com/mcp \
|
|
199
|
+
--header "Authorization: Bearer $DIGITALOCEAN_API_TOKEN"
|
|
200
|
+
|
|
201
|
+
claude mcp add --transport http digitalocean-droplets https://droplets.mcp.digitalocean.com/mcp \
|
|
202
|
+
--header "Authorization: Bearer $DIGITALOCEAN_API_TOKEN"
|
|
203
|
+
```
|
|
204
|
+
|
|
205
|
+
See the [Available Services](#available-services) section for the complete list of available endpoints.
|
|
206
|
+
|
|
207
|
+
#### Local Installation
|
|
33
208
|
|
|
34
209
|
```bash
|
|
35
210
|
claude mcp add digitalocean-mcp \
|
|
36
|
-
-e DIGITALOCEAN_API_TOKEN
|
|
211
|
+
-e DIGITALOCEAN_API_TOKEN=$DIGITALOCEAN_API_TOKEN \
|
|
37
212
|
-- npx @digitalocean/mcp --services apps,databases
|
|
38
213
|
```
|
|
39
214
|
|
|
@@ -41,7 +216,7 @@ This will:
|
|
|
41
216
|
- Add the MCP server under the default (local) scope — meaning it's only available inside the current folder.
|
|
42
217
|
- Register it with the name `digitalocean-mcp`.
|
|
43
218
|
- Enable the `apps` and `databases` services.
|
|
44
|
-
- Pass your DigitalOcean API token securely to the server.
|
|
219
|
+
- Pass your DigitalOcean API token securely to the server via environment variable.
|
|
45
220
|
- Store the configuration in your global Claude config at `~/.claude.json`, scoped to the current folder.
|
|
46
221
|
|
|
47
222
|
#### Verify Installation
|
|
@@ -62,47 +237,124 @@ To remove it:
|
|
|
62
237
|
claude mcp remove digitalocean-mcp
|
|
63
238
|
```
|
|
64
239
|
|
|
240
|
+
##### User Scope
|
|
241
|
+
|
|
242
|
+
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.
|
|
243
|
+
|
|
244
|
+
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:
|
|
245
|
+
|
|
246
|
+
```bash
|
|
247
|
+
claude mcp add -s user digitalocean-mcp-user-scope \
|
|
248
|
+
-e DIGITALOCEAN_API_TOKEN=$DIGITALOCEAN_API_TOKEN \
|
|
249
|
+
-- npx @digitalocean/mcp --services apps,databases
|
|
250
|
+
```
|
|
251
|
+
|
|
252
|
+
This will:
|
|
253
|
+
- Make the server available in all folders, not just the one you're in
|
|
254
|
+
- Scope it to your user account
|
|
255
|
+
- Store it in your global Claude config at `~/.claude.json`
|
|
256
|
+
|
|
257
|
+
To remove it:
|
|
258
|
+
```bash
|
|
259
|
+
claude mcp remove -s user digitalocean-mcp-user-scope
|
|
260
|
+
```
|
|
261
|
+
|
|
262
|
+
---
|
|
263
|
+
|
|
65
264
|
### Claude Desktop
|
|
66
265
|
|
|
67
|
-
|
|
266
|
+
#### Remote MCP (Recommended)
|
|
267
|
+
|
|
268
|
+
**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.
|
|
269
|
+
|
|
270
|
+
The config file is located at:
|
|
271
|
+
- **macOS:** `~/Library/Application Support/Claude/claude_desktop_config.json`
|
|
272
|
+
- **Windows:** `%APPDATA%\Claude\claude_desktop_config.json`
|
|
273
|
+
- **Linux:** `~/.config/Claude/claude_desktop_config.json`
|
|
274
|
+
|
|
275
|
+
Add the remote MCP servers to your config file. Reference the env var using `${DIGITALOCEAN_API_TOKEN}` — Claude Desktop will substitute it at runtime:
|
|
276
|
+
|
|
277
|
+
```json
|
|
278
|
+
{
|
|
279
|
+
"mcpServers": {
|
|
280
|
+
"digitalocean-apps": {
|
|
281
|
+
"url": "https://apps.mcp.digitalocean.com/mcp",
|
|
282
|
+
"headers": {
|
|
283
|
+
"Authorization": "Bearer ${DIGITALOCEAN_API_TOKEN}"
|
|
284
|
+
}
|
|
285
|
+
},
|
|
286
|
+
"digitalocean-databases": {
|
|
287
|
+
"url": "https://databases.mcp.digitalocean.com/mcp",
|
|
288
|
+
"headers": {
|
|
289
|
+
"Authorization": "Bearer ${DIGITALOCEAN_API_TOKEN}"
|
|
290
|
+
}
|
|
291
|
+
}
|
|
292
|
+
}
|
|
293
|
+
}
|
|
294
|
+
```
|
|
295
|
+
|
|
296
|
+
> **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.
|
|
297
|
+
|
|
298
|
+
You can add any of the endpoints listed in the [Available Services](#available-services) section.
|
|
299
|
+
|
|
300
|
+
#### Local Installation
|
|
301
|
+
|
|
302
|
+
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:
|
|
68
303
|
|
|
69
304
|
```json
|
|
70
305
|
{
|
|
71
306
|
"mcpServers": {
|
|
72
307
|
"digitalocean": {
|
|
73
308
|
"command": "npx",
|
|
74
|
-
"args": ["@digitalocean/mcp", "--services apps"],
|
|
309
|
+
"args": ["@digitalocean/mcp", "--services", "apps"],
|
|
75
310
|
"env": {
|
|
76
|
-
"DIGITALOCEAN_API_TOKEN": "
|
|
311
|
+
"DIGITALOCEAN_API_TOKEN": "${DIGITALOCEAN_API_TOKEN}"
|
|
77
312
|
}
|
|
78
313
|
}
|
|
79
314
|
}
|
|
80
315
|
}
|
|
81
316
|
```
|
|
82
317
|
|
|
83
|
-
|
|
318
|
+
> **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.
|
|
84
319
|
|
|
85
|
-
|
|
320
|
+
After saving the file, **restart Claude Desktop** for the changes to take effect.
|
|
86
321
|
|
|
87
|
-
|
|
322
|
+
---
|
|
88
323
|
|
|
89
|
-
|
|
90
|
-
claude mcp add -s user digitalocean-mcp-user-scope \
|
|
91
|
-
-e DIGITALOCEAN_API_TOKEN=YOUR_DO_API_TOKEN \
|
|
92
|
-
-- npx @digitalocean/mcp --services apps,databases
|
|
93
|
-
```
|
|
324
|
+
### Cursor
|
|
94
325
|
|
|
95
|
-
|
|
96
|
-
- Make the server available in all folders, not just the one you're in
|
|
97
|
-
- Scope it to your user account
|
|
98
|
-
- Store it in your global Claude config at `~/.claude.json`
|
|
326
|
+
#### Remote MCP (Recommended)
|
|
99
327
|
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
328
|
+
**Before editing the config file**, ensure `DIGITALOCEAN_API_TOKEN` is set in your shell profile (see Step 1 — Option A).
|
|
329
|
+
|
|
330
|
+
The Cursor config file is located at:
|
|
331
|
+
- **macOS / Linux:** `~/.cursor/config.json`
|
|
332
|
+
- **Windows:** `%USERPROFILE%\.cursor\config.json`
|
|
333
|
+
|
|
334
|
+
Add the remote MCP servers to your Cursor settings file:
|
|
335
|
+
|
|
336
|
+
```json
|
|
337
|
+
{
|
|
338
|
+
"mcpServers": {
|
|
339
|
+
"digitalocean-apps": {
|
|
340
|
+
"url": "https://apps.mcp.digitalocean.com/mcp",
|
|
341
|
+
"headers": {
|
|
342
|
+
"Authorization": "Bearer ${DIGITALOCEAN_API_TOKEN}"
|
|
343
|
+
}
|
|
344
|
+
},
|
|
345
|
+
"digitalocean-databases": {
|
|
346
|
+
"url": "https://databases.mcp.digitalocean.com/mcp",
|
|
347
|
+
"headers": {
|
|
348
|
+
"Authorization": "Bearer ${DIGITALOCEAN_API_TOKEN}"
|
|
349
|
+
}
|
|
350
|
+
}
|
|
351
|
+
}
|
|
352
|
+
}
|
|
103
353
|
```
|
|
104
354
|
|
|
105
|
-
|
|
355
|
+
You can add any of the endpoints listed in the [Available Services](#available-services) section.
|
|
356
|
+
|
|
357
|
+
#### Local Installation
|
|
106
358
|
|
|
107
359
|
[](https://cursor.com/en/install-mcp?name=digitalocean&config=eyJjb21tYW5kIjoibnB4IEBkaWdpdGFsb2NlYW4vbWNwIC0tc2VydmljZXMgYXBwcyIsImVudiI6eyJESUdJVEFMT0NFQU5fQVBJX1RPS0VOIjoiWU9VUl9BUElfVE9LRU4ifX0%3D)
|
|
108
360
|
|
|
@@ -115,107 +367,217 @@ Add the following to your Cursor settings file located at `~/.cursor/config.json
|
|
|
115
367
|
"command": "npx",
|
|
116
368
|
"args": ["@digitalocean/mcp", "--services", "apps"],
|
|
117
369
|
"env": {
|
|
118
|
-
"DIGITALOCEAN_API_TOKEN": "
|
|
370
|
+
"DIGITALOCEAN_API_TOKEN": "${DIGITALOCEAN_API_TOKEN}"
|
|
119
371
|
}
|
|
120
372
|
}
|
|
121
373
|
}
|
|
122
374
|
}
|
|
123
375
|
```
|
|
124
376
|
|
|
125
|
-
|
|
377
|
+
> **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.
|
|
126
378
|
|
|
127
|
-
|
|
128
|
-
|
|
379
|
+
##### Verify Installation
|
|
380
|
+
|
|
381
|
+
1. Open Cursor and open Command Palette (`Shift + ⌘ + P` on Mac or `Ctrl + Shift + P` on Windows/Linux)
|
|
382
|
+
2. Search for "MCP" in the command palette search bar
|
|
129
383
|
3. Select "View: Open MCP Settings"
|
|
130
384
|
4. Select "Tools & Integrations" from the left sidebar
|
|
131
385
|
5. You should see "digitalocean" listed under Available MCP Servers
|
|
132
|
-
6. Click on "N tools enabled" (N is the number of tools currently enabled)
|
|
386
|
+
6. Click on "N tools enabled" (N is the number of tools currently enabled)
|
|
133
387
|
|
|
134
|
-
|
|
388
|
+
##### Debugging
|
|
135
389
|
|
|
136
390
|
To check MCP server logs and debug issues:
|
|
137
|
-
1. Open the Command Palette (
|
|
391
|
+
1. Open the Command Palette (`⌘+Shift+P` on Mac or `Ctrl+Shift+P` on Windows/Linux)
|
|
138
392
|
2. Type "Developer: Toggle Developer Tools" and press Enter
|
|
139
393
|
3. Navigate to the Console tab to view MCP server logs
|
|
140
394
|
4. You'll find MCP related logs as you interact with the MCP server
|
|
141
395
|
|
|
142
|
-
|
|
396
|
+
##### Testing the Connection
|
|
397
|
+
|
|
398
|
+
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.
|
|
143
399
|
|
|
144
|
-
|
|
400
|
+
---
|
|
145
401
|
|
|
146
402
|
### VS Code
|
|
147
403
|
|
|
148
|
-
|
|
404
|
+
#### Remote MCP (Recommended)
|
|
405
|
+
|
|
406
|
+
**Before editing the config file**, ensure `DIGITALOCEAN_API_TOKEN` is set in your shell profile (see Step 1 — Option A).
|
|
407
|
+
|
|
408
|
+
The VS Code MCP config file is located at `.vscode/mcp.json` in your workspace root. Create this file if it does not exist. Add the remote MCP servers:
|
|
409
|
+
|
|
410
|
+
```json
|
|
411
|
+
{
|
|
412
|
+
"inputs": [
|
|
413
|
+
{
|
|
414
|
+
"id": "digitalocean-token",
|
|
415
|
+
"type": "promptString",
|
|
416
|
+
"description": "DigitalOcean API Token",
|
|
417
|
+
"password": true
|
|
418
|
+
}
|
|
419
|
+
],
|
|
420
|
+
"servers": {
|
|
421
|
+
"digitalocean-apps": {
|
|
422
|
+
"url": "https://apps.mcp.digitalocean.com/mcp",
|
|
423
|
+
"headers": {
|
|
424
|
+
"Authorization": "Bearer ${input:digitalocean-token}"
|
|
425
|
+
}
|
|
426
|
+
},
|
|
427
|
+
"digitalocean-databases": {
|
|
428
|
+
"url": "https://databases.mcp.digitalocean.com/mcp",
|
|
429
|
+
"headers": {
|
|
430
|
+
"Authorization": "Bearer ${input:digitalocean-token}"
|
|
431
|
+
}
|
|
432
|
+
}
|
|
433
|
+
}
|
|
434
|
+
}
|
|
435
|
+
```
|
|
436
|
+
|
|
437
|
+
> **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.
|
|
438
|
+
|
|
439
|
+
Alternatively, if you prefer to use a system environment variable directly:
|
|
149
440
|
|
|
150
441
|
```json
|
|
151
442
|
{
|
|
152
|
-
"
|
|
153
|
-
|
|
154
|
-
"
|
|
155
|
-
"
|
|
156
|
-
|
|
157
|
-
"
|
|
158
|
-
"@digitalocean/mcp",
|
|
159
|
-
"--services",
|
|
160
|
-
"apps"
|
|
161
|
-
],
|
|
162
|
-
"env": {
|
|
163
|
-
"DIGITALOCEAN_API_TOKEN": "YOUR_API_TOKEN"
|
|
164
|
-
}
|
|
443
|
+
"inputs": [],
|
|
444
|
+
"servers": {
|
|
445
|
+
"digitalocean-apps": {
|
|
446
|
+
"url": "https://apps.mcp.digitalocean.com/mcp",
|
|
447
|
+
"headers": {
|
|
448
|
+
"Authorization": "Bearer ${env:DIGITALOCEAN_API_TOKEN}"
|
|
165
449
|
}
|
|
166
450
|
}
|
|
167
451
|
}
|
|
168
452
|
}
|
|
169
453
|
```
|
|
170
454
|
|
|
171
|
-
|
|
455
|
+
> **Note:** VS Code uses `${env:VARIABLE_NAME}` syntax to read from system environment variables.
|
|
456
|
+
|
|
457
|
+
#### Local Installation
|
|
458
|
+
|
|
459
|
+
Add the following to your `.vscode/mcp.json` file. Use VS Code's `inputs` feature to avoid hardcoding the token:
|
|
172
460
|
|
|
173
|
-
|
|
174
|
-
|
|
461
|
+
```json
|
|
462
|
+
{
|
|
463
|
+
"inputs": [
|
|
464
|
+
{
|
|
465
|
+
"id": "digitalocean-token",
|
|
466
|
+
"type": "promptString",
|
|
467
|
+
"description": "DigitalOcean API Token",
|
|
468
|
+
"password": true
|
|
469
|
+
}
|
|
470
|
+
],
|
|
471
|
+
"servers": {
|
|
472
|
+
"mcpDigitalOcean": {
|
|
473
|
+
"command": "npx",
|
|
474
|
+
"args": [
|
|
475
|
+
"@digitalocean/mcp",
|
|
476
|
+
"--services",
|
|
477
|
+
"apps"
|
|
478
|
+
],
|
|
479
|
+
"env": {
|
|
480
|
+
"DIGITALOCEAN_API_TOKEN": "${input:digitalocean-token}"
|
|
481
|
+
}
|
|
482
|
+
}
|
|
483
|
+
}
|
|
484
|
+
}
|
|
485
|
+
```
|
|
486
|
+
|
|
487
|
+
Or, to use a system environment variable directly:
|
|
488
|
+
|
|
489
|
+
```json
|
|
490
|
+
{
|
|
491
|
+
"inputs": [],
|
|
492
|
+
"servers": {
|
|
493
|
+
"mcpDigitalOcean": {
|
|
494
|
+
"command": "npx",
|
|
495
|
+
"args": [
|
|
496
|
+
"@digitalocean/mcp",
|
|
497
|
+
"--services",
|
|
498
|
+
"apps"
|
|
499
|
+
],
|
|
500
|
+
"env": {
|
|
501
|
+
"DIGITALOCEAN_API_TOKEN": "${env:DIGITALOCEAN_API_TOKEN}"
|
|
502
|
+
}
|
|
503
|
+
}
|
|
504
|
+
}
|
|
505
|
+
}
|
|
506
|
+
```
|
|
507
|
+
|
|
508
|
+
##### Verify Installation
|
|
509
|
+
|
|
510
|
+
1. Open VS Code and open Command Palette (`Shift + ⌘ + P` on Mac or `Ctrl + Shift + P` on Windows/Linux)
|
|
511
|
+
2. Search for "MCP" in the command palette search bar
|
|
175
512
|
3. Select "MCP: List Servers"
|
|
176
513
|
4. Verify that "mcpDigitalOcean" appears in the list of configured servers
|
|
177
514
|
|
|
178
|
-
|
|
515
|
+
##### Viewing Available Tools
|
|
179
516
|
|
|
180
517
|
To see what tools are available from the MCP server:
|
|
181
|
-
1. Open the Command Palette (
|
|
182
|
-
2. Select "Agent" mode in the chatbox
|
|
183
|
-
3. Click "Configure tools" on the right, and check for
|
|
518
|
+
1. Open the Command Palette (`⌘+Shift+P` on Mac or `Ctrl+Shift+P` on Windows/Linux)
|
|
519
|
+
2. Select "Agent" mode in the chatbox
|
|
520
|
+
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.
|
|
184
521
|
|
|
185
|
-
|
|
522
|
+
##### Debugging
|
|
186
523
|
|
|
187
524
|
To troubleshoot MCP connections:
|
|
188
|
-
1. Open the Command Palette (
|
|
525
|
+
1. Open the Command Palette (`⌘+Shift+P` on Mac or `Ctrl+Shift+P` on Windows/Linux)
|
|
189
526
|
2. Type "Developer: Toggle Developer Tools" and press Enter
|
|
190
527
|
3. Navigate to the Console tab to view MCP server logs
|
|
191
|
-
|
|
528
|
+
4. Check for connection status and error messages
|
|
192
529
|
|
|
193
|
-
If you are getting
|
|
530
|
+
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.
|
|
194
531
|
|
|
195
|
-
|
|
532
|
+
---
|
|
533
|
+
|
|
534
|
+
## Step 3: Protect Your Token — Checklist
|
|
535
|
+
|
|
536
|
+
Before pushing any code to GitHub, verify the following:
|
|
537
|
+
|
|
538
|
+
- [ ] Your `.env` file (if used) is listed in `.gitignore`
|
|
539
|
+
- [ ] No config file contains a raw token string like `dop_v1_...`
|
|
540
|
+
- [ ] Config files use `${DIGITALOCEAN_API_TOKEN}`, `${env:DIGITALOCEAN_API_TOKEN}`, or `${input:...}` syntax
|
|
541
|
+
- [ ] You have run `git diff` or `git status` to confirm no secrets are staged
|
|
542
|
+
- [ ] You have never committed a token — if you have, [rotate it immediately](https://cloud.digitalocean.com/account/api/tokens) and revoke the old one
|
|
196
543
|
|
|
197
|
-
|
|
198
|
-
enable the services you need to reduce context size and improve accuracy. See list of supported services below.
|
|
544
|
+
> **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.
|
|
199
545
|
|
|
546
|
+
---
|
|
547
|
+
|
|
548
|
+
## Prerequisites for Local Installation
|
|
549
|
+
|
|
550
|
+
If you're using the local installation method (not Remote MCP), you'll need:
|
|
551
|
+
|
|
552
|
+
- Node.js (v18 or later)
|
|
553
|
+
- NPM (v8 or later)
|
|
554
|
+
|
|
555
|
+
You can find installation guides at [https://nodejs.org/en/download](https://nodejs.org/en/download)
|
|
556
|
+
|
|
557
|
+
Verify your installation:
|
|
200
558
|
```bash
|
|
201
|
-
|
|
559
|
+
node --version
|
|
560
|
+
npm --version
|
|
202
561
|
```
|
|
203
562
|
|
|
204
|
-
|
|
563
|
+
### Quick Test
|
|
205
564
|
|
|
206
|
-
|
|
565
|
+
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):
|
|
566
|
+
```bash
|
|
567
|
+
npx @digitalocean/mcp --services apps
|
|
568
|
+
```
|
|
569
|
+
|
|
570
|
+
---
|
|
571
|
+
|
|
572
|
+
## Configuration
|
|
207
573
|
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
| spaces | DigitalOcean Spaces object storage and Spaces access keys for S3-compatible storage. |
|
|
216
|
-
| databases | Provision, manage, and monitor managed database clusters (Postgres, MySQL, Redis, etc.). |
|
|
217
|
-
| marketplace | Discover and manage DigitalOcean Marketplace applications. |
|
|
218
|
-
| doks | Manage DigitalOcean Kubernetes clusters and node pools. |
|
|
574
|
+
### Local Installation Configuration
|
|
575
|
+
|
|
576
|
+
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.
|
|
577
|
+
|
|
578
|
+
```bash
|
|
579
|
+
npx @digitalocean/mcp --services apps,droplets
|
|
580
|
+
```
|
|
219
581
|
|
|
220
582
|
## Documentation
|
|
221
583
|
|
|
@@ -252,4 +614,4 @@ Contributions are welcome! If you encounter any issues or have ideas for improve
|
|
|
252
614
|
|
|
253
615
|
## License
|
|
254
616
|
|
|
255
|
-
This project is licensed under the MIT License. See the [LICENSE](LICENSE) file for details.
|
|
617
|
+
This project is licensed under the MIT License. See the [LICENSE](LICENSE) file for details.
|
|
@@ -444,6 +444,25 @@
|
|
|
444
444
|
},
|
|
445
445
|
"type": "object"
|
|
446
446
|
},
|
|
447
|
+
"inactivity_sleep": {
|
|
448
|
+
"properties": {
|
|
449
|
+
"after_seconds": {
|
|
450
|
+
"type": "integer"
|
|
451
|
+
},
|
|
452
|
+
"loading_page": {
|
|
453
|
+
"properties": {
|
|
454
|
+
"enabled": {
|
|
455
|
+
"type": "boolean"
|
|
456
|
+
},
|
|
457
|
+
"custom_url": {
|
|
458
|
+
"type": "string"
|
|
459
|
+
}
|
|
460
|
+
},
|
|
461
|
+
"type": "object"
|
|
462
|
+
}
|
|
463
|
+
},
|
|
464
|
+
"type": "object"
|
|
465
|
+
},
|
|
447
466
|
"liveness_health_check": {
|
|
448
467
|
"properties": {
|
|
449
468
|
"initial_delay_seconds": {
|
|
@@ -1900,6 +1919,20 @@
|
|
|
1900
1919
|
},
|
|
1901
1920
|
"type": "array",
|
|
1902
1921
|
"description": "Rules for configuring HTTP ingress for component routes, CORS, rewrites, and redirects."
|
|
1922
|
+
},
|
|
1923
|
+
"secure_header": {
|
|
1924
|
+
"properties": {
|
|
1925
|
+
"key": {
|
|
1926
|
+
"type": "string"
|
|
1927
|
+
},
|
|
1928
|
+
"value": {
|
|
1929
|
+
"type": "string"
|
|
1930
|
+
},
|
|
1931
|
+
"remove_header": {
|
|
1932
|
+
"type": "boolean"
|
|
1933
|
+
}
|
|
1934
|
+
},
|
|
1935
|
+
"type": "object"
|
|
1903
1936
|
}
|
|
1904
1937
|
},
|
|
1905
1938
|
"type": "object"
|
|
@@ -448,6 +448,25 @@
|
|
|
448
448
|
},
|
|
449
449
|
"type": "object"
|
|
450
450
|
},
|
|
451
|
+
"inactivity_sleep": {
|
|
452
|
+
"properties": {
|
|
453
|
+
"after_seconds": {
|
|
454
|
+
"type": "integer"
|
|
455
|
+
},
|
|
456
|
+
"loading_page": {
|
|
457
|
+
"properties": {
|
|
458
|
+
"enabled": {
|
|
459
|
+
"type": "boolean"
|
|
460
|
+
},
|
|
461
|
+
"custom_url": {
|
|
462
|
+
"type": "string"
|
|
463
|
+
}
|
|
464
|
+
},
|
|
465
|
+
"type": "object"
|
|
466
|
+
}
|
|
467
|
+
},
|
|
468
|
+
"type": "object"
|
|
469
|
+
},
|
|
451
470
|
"liveness_health_check": {
|
|
452
471
|
"properties": {
|
|
453
472
|
"initial_delay_seconds": {
|
|
@@ -1904,6 +1923,20 @@
|
|
|
1904
1923
|
},
|
|
1905
1924
|
"type": "array",
|
|
1906
1925
|
"description": "Rules for configuring HTTP ingress for component routes, CORS, rewrites, and redirects."
|
|
1926
|
+
},
|
|
1927
|
+
"secure_header": {
|
|
1928
|
+
"properties": {
|
|
1929
|
+
"key": {
|
|
1930
|
+
"type": "string"
|
|
1931
|
+
},
|
|
1932
|
+
"value": {
|
|
1933
|
+
"type": "string"
|
|
1934
|
+
},
|
|
1935
|
+
"remove_header": {
|
|
1936
|
+
"type": "boolean"
|
|
1937
|
+
}
|
|
1938
|
+
},
|
|
1939
|
+
"type": "object"
|
|
1907
1940
|
}
|
|
1908
1941
|
},
|
|
1909
1942
|
"type": "object"
|
|
@@ -161,6 +161,22 @@
|
|
|
161
161
|
}
|
|
162
162
|
},
|
|
163
163
|
"type": "object"
|
|
164
|
+
},
|
|
165
|
+
"nvidia_gpu_device_plugin": {
|
|
166
|
+
"properties": {
|
|
167
|
+
"enabled": {
|
|
168
|
+
"type": "boolean"
|
|
169
|
+
}
|
|
170
|
+
},
|
|
171
|
+
"type": "object"
|
|
172
|
+
},
|
|
173
|
+
"rdma_shared_dev_plugin": {
|
|
174
|
+
"properties": {
|
|
175
|
+
"enabled": {
|
|
176
|
+
"type": "boolean"
|
|
177
|
+
}
|
|
178
|
+
},
|
|
179
|
+
"type": "object"
|
|
164
180
|
}
|
|
165
181
|
},
|
|
166
182
|
"type": "object"
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@digitalocean/mcp",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.37",
|
|
4
4
|
"description": "DigitalOcean MCP Implementation,",
|
|
5
5
|
"author": "DigitalOcean",
|
|
6
6
|
"homepage": "https://github.com/digitalocean-labs/mcp-digitalocean?tab=readme-ov-file#mcp-digitalocean-integration",
|
|
Binary file
|