@digitalocean/mcp 0.0.11 → 0.0.13
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 +139 -101
- package/build/api.js +2 -1
- package/build/server.js +1 -1
- package/build/version.js +2 -2
- package/package.json +4 -3
package/README.md
CHANGED
|
@@ -1,52 +1,68 @@
|
|
|
1
1
|
# DigitalOcean MCP Server
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
[](https://www.npmjs.com/package/@digitalocean/mcp) [](LICENSE)
|
|
4
4
|
|
|
5
|
-
|
|
5
|
+
This MCP server exposes DigitalOcean App Platform functionality through standardized tools that can be used by any MCP client, including [Claude Desktop](https://claude.ai/download) and [Cursor](https://docs.cursor.com/context/model-context-protocol). It enables AI assistants to directly manage your DigitalOcean apps without writing code or memorizing API endpoints.
|
|
6
6
|
|
|
7
|
-
|
|
7
|
+
[](https://cursor.com/install-mcp?name=digitalocean&config=eyJjb21tYW5kIjoibnB4IEBkaWdpdGFsb2NlYW4vbWNwIiwiZW52Ijp7IkRJR0lUQUxPQ0VBTl9BUElfVE9LRU4iOiJZT1VSX0RPX1RPS0VOIn19)
|
|
8
|
+
---
|
|
8
9
|
|
|
9
|
-
##
|
|
10
|
+
## 📚 Table of Contents
|
|
10
11
|
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
- Retrieve execution URLs for components
|
|
15
|
-
- View instance sizes and regions
|
|
16
|
-
- Validate app specifications
|
|
17
|
-
- Manage app alerts
|
|
18
|
-
- Handle app rollbacks
|
|
19
|
-
- View bandwidth metrics
|
|
12
|
+
* [🚀 What Can You Do With It?](#-what-can-you-do-with-it)
|
|
13
|
+
* [🧰 Prerequisites](#-prerequisites)
|
|
14
|
+
* [⚙️ Setting up your DigitalOcean MCP Server](#️-setting-up-your-digitalocean-mcp-server)
|
|
20
15
|
|
|
21
|
-
|
|
16
|
+
* [Generate Your API Token](#1-generate-your-api-token)
|
|
17
|
+
* [Add the Server to Your MCP Client](#2-add-the-server-to-your-mcp-client)
|
|
18
|
+
* [Claude Desktop](#claude-desktop)
|
|
19
|
+
* [Cursor](#cursor)
|
|
20
|
+
* [Windsurf Setup](#windsurf-setup)
|
|
21
|
+
* [💬 Example Prompts](#-example-prompts)
|
|
22
|
+
* [🛠 Available Tools](#available-tools)
|
|
23
|
+
* [🧯 Troubleshooting](#troubleshooting)
|
|
24
|
+
* [🤝 Contributing](#contributing)
|
|
25
|
+
* [📄 License](#license)
|
|
22
26
|
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
3. This will open `claude_desktop_config.json`
|
|
26
|
-
4. Add or update the configuration with:
|
|
27
|
+
---
|
|
28
|
+
## 🚀 What Can You Do With It?
|
|
27
29
|
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
30
|
+
You can now do things like:
|
|
31
|
+
|
|
32
|
+
- **Deploy a new app** from a GitHub repo
|
|
33
|
+
- **Quickly redeploy an existing app** with the latest changes
|
|
34
|
+
- **See logs,** restart components, or delete old environments
|
|
35
|
+
- **Check available regions** and create apps based on what’s supported
|
|
36
|
+
- **Build and deploy an app from scratch**, entirely through your assistant
|
|
37
|
+
|
|
38
|
+
...and more!
|
|
39
|
+
|
|
40
|
+
---
|
|
41
|
+
|
|
42
|
+
## 🧰 Prerequisites
|
|
43
|
+
To use the DigitalOcean MCP Server, you’ll need:
|
|
44
|
+
|
|
45
|
+
- **Node.js** (≥ 12) & **npm**
|
|
46
|
+
- A [DigitalOcean Personal Access Token](https://cloud.digitalocean.com/account/api/tokens) with **App Platform** scopes
|
|
47
|
+
- A supported MCP client:
|
|
48
|
+
- [Claude Desktop](https://claude.ai/download) (v1.9+)
|
|
49
|
+
- [Claude Code](https://docs.anthropic.com/en/docs/claude-code/overview)
|
|
50
|
+
- [Cursor](https://docs.cursor.com/context/model-context-protocol)
|
|
51
|
+
- [Windsurf](https://windsurf.com)
|
|
52
|
+
- (Optional but helpful): [GitHub CLI (gh)](https://cli.github.com) - useful for cloning repos, creating projects, and working with GitHub-based apps.
|
|
53
|
+
|
|
54
|
+
> 💡 You do not need to install anything—this server runs via npx, with just a one-line config added to your MCP client.
|
|
41
55
|
|
|
42
|
-
5. Replace `your_personal_access_token` with your actual DigitalOcean API token
|
|
43
|
-
6. Save the file and restart Claude Desktop
|
|
44
56
|
|
|
45
|
-
|
|
57
|
+
---
|
|
46
58
|
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
59
|
+
## ⚙️ Setting up your DigitalOcean MCP Server
|
|
60
|
+
|
|
61
|
+
### 1. Generate Your API Token
|
|
62
|
+
Head to [DigitalOcean’s API settings](https://cloud.digitalocean.com/account/api/tokens) and create a new **Personal Access Token** with **App Platform** permissions.
|
|
63
|
+
|
|
64
|
+
### 2. Add the Server to Your MCP Client
|
|
65
|
+
Add this JSON snippet to your client’s MCP config file:
|
|
50
66
|
|
|
51
67
|
```json
|
|
52
68
|
{
|
|
@@ -55,99 +71,121 @@ This MCP server exposes DigitalOcean App Platform functionality through standard
|
|
|
55
71
|
"command": "npx",
|
|
56
72
|
"args": ["@digitalocean/mcp"],
|
|
57
73
|
"env": {
|
|
58
|
-
"DIGITALOCEAN_API_TOKEN": "
|
|
74
|
+
"DIGITALOCEAN_API_TOKEN": "YOUR_DO_TOKEN"
|
|
59
75
|
}
|
|
60
76
|
}
|
|
61
77
|
}
|
|
62
78
|
}
|
|
63
79
|
```
|
|
64
80
|
|
|
65
|
-
|
|
66
|
-
|
|
81
|
+
Here’s what each part of the snippet does:
|
|
82
|
+
|
|
83
|
+
- * **command**: how to launch the server (`npx` or full path)
|
|
84
|
+
- * **args**: the package name
|
|
85
|
+
- * **env**: insert your DO token here
|
|
86
|
+
|
|
87
|
+
Then follow the instructions for your specific tool:
|
|
88
|
+
|
|
89
|
+
### Claude Desktop
|
|
67
90
|
|
|
68
|
-
|
|
91
|
+
1. Go to **Settings → Developer → Edit Config**
|
|
92
|
+
2. Add the snippet above to `claude_desktop_config.json`
|
|
93
|
+
3. Replace `YOUR_DO_TOKEN` with your token
|
|
94
|
+
4. Save and **restart Claude Desktop**
|
|
95
|
+
5. You'll see “digitalocean” listed as an available server
|
|
69
96
|
|
|
70
|
-
|
|
97
|
+

|
|
98
|
+
*Setting up DigitalOcean MCP Server in Claude Desktop*
|
|
71
99
|
|
|
72
|
-
### Basic App Management
|
|
73
100
|
|
|
74
|
-
|
|
75
|
-
- "List all my current apps on DigitalOcean"
|
|
76
|
-
- "Show me details for my app called 'customer-portal'"
|
|
77
|
-
- "Restart my app 'api-backend'"
|
|
78
|
-
- "Delete the app named 'test-environment'"
|
|
101
|
+
### Cursor
|
|
79
102
|
|
|
80
|
-
|
|
103
|
+
1. Go to **Settings → Cursor Settings → MCP → Add a new global MCP server**
|
|
104
|
+
2. Cursor will open `~/.cursor/mcp.json`
|
|
105
|
+
3. Add the snippet above to this json file
|
|
106
|
+
4. Replace `YOUR_DO_TOKEN` with your token
|
|
107
|
+
5. Save, and return to MCP Settings.
|
|
108
|
+
6. You should now see “digitalocean” in Cursor’s MCP settings
|
|
81
109
|
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
- "Cancel the current deployment for my 'staging-env' app"
|
|
85
|
-
- "What's the status of the latest deployment for my 'data-processor' app?"
|
|
110
|
+

|
|
111
|
+
*Setting up DigitalOcean MCP Server in Cursor*
|
|
86
112
|
|
|
87
|
-
###
|
|
113
|
+
### Windsurf Setup
|
|
88
114
|
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
115
|
+
1. In Windsurf: **Settings → Windsurf Settings → Cascade → MCP → Add Server → Add custom server**
|
|
116
|
+
2. Windsurf will open `~/.codeium/windsurf/mcp_config.json`
|
|
117
|
+
3. Add the snippet above to this json file
|
|
118
|
+
4. Replace `YOUR_DO_TOKEN` with your token
|
|
119
|
+
5. Save, and return to MCP Settings.
|
|
120
|
+
6. You should now see “digitalocean” in Windsurf's MCP settings
|
|
93
121
|
|
|
94
|
-
|
|
122
|
+

|
|
95
123
|
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
124
|
+
*Setting up DigitalOcean MCP Server in Windsurf*
|
|
125
|
+
|
|
126
|
+
---
|
|
127
|
+
## 💬 Example Prompts
|
|
128
|
+
|
|
129
|
+
Once it’s configured, try asking your assistant:
|
|
130
|
+
|
|
131
|
+
```
|
|
132
|
+
“List all active apps on my account”
|
|
133
|
+
“Create a new app from https://github.com/do-community/do-one-click-deploy-flask with 1GB RAM in NYC3”
|
|
134
|
+
“Show logs for checkout-service”
|
|
135
|
+
“Cancel the current deployment for marketing-site”
|
|
136
|
+
“Delete the old `staging-env` app”
|
|
137
|
+
```
|
|
99
138
|
|
|
100
|
-
|
|
139
|
+
The assistant will send the request → the MCP server talks to DigitalOcean → you get structured results, ready to act on.
|
|
101
140
|
|
|
102
|
-
|
|
103
|
-
- "List all available instance sizes for app components"
|
|
104
|
-
- "What's the smallest instance size I can use for a service component?"
|
|
105
|
-
- "Show me my bandwidth usage across all apps this month"
|
|
141
|
+
---
|
|
106
142
|
|
|
107
143
|
## Available Tools
|
|
108
144
|
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
- `retrieve_active_deployment_logs` - Get logs for a component of the active deployment
|
|
122
|
-
- `download_logs` - Download logs from a URL
|
|
123
|
-
- `list_app_regions` - List all regions supported by App Platform
|
|
124
|
-
- `list_instance_sizes` - List all instance sizes for components
|
|
125
|
-
- `validate_app_spec` - Validate an app specification
|
|
126
|
-
- `list_app_alerts` - List alerts for an app
|
|
127
|
-
- `update_app_alert_destinations` - Update alert destinations
|
|
128
|
-
- `rollback_app` - Rollback an app to a previous deployment
|
|
129
|
-
- `validate_app_rollback` - Validate an app rollback
|
|
130
|
-
- `commit_app_rollback` - Commit an app rollback
|
|
131
|
-
- `revert_app_rollback` - Revert an app rollback
|
|
132
|
-
- `get_app_bandwidth_daily_metrics` - Get bandwidth metrics for an app
|
|
133
|
-
- `get_all_app_bandwidth_daily_metrics` - Get bandwidth metrics for all apps
|
|
145
|
+
| Category | Commands |
|
|
146
|
+
| --------------- | ------------------------------------------------------------------------------------- |
|
|
147
|
+
| **Apps** | `list_apps`, `create_app`, `get_app`, `update_app`, `delete_app`, `restart_app` |
|
|
148
|
+
| **Deployments** | `list_deployments`, `create_deployment`, `get_deployment`, `cancel_deployment` |
|
|
149
|
+
| **Logs** | `retrieve_active_deployment_logs`, `download_logs` |
|
|
150
|
+
| **Infra** | `list_app_regions`, `list_instance_sizes` |
|
|
151
|
+
| **Alerts** | `list_app_alerts`, `update_app_alert_destinations` |
|
|
152
|
+
| **Rollbacks** | `validate_app_rollback`, `rollback_app`, `commit_app_rollback`, `revert_app_rollback` |
|
|
153
|
+
| **Metrics** | `get_app_bandwidth_daily_metrics`, `get_all_app_bandwidth_daily_metrics` |
|
|
154
|
+
| **Validation** | `validate_app_spec` |
|
|
155
|
+
|
|
156
|
+
---
|
|
134
157
|
|
|
135
158
|
## Troubleshooting
|
|
136
159
|
|
|
137
|
-
###
|
|
160
|
+
### The server doesn’t appear in your client?
|
|
161
|
+
- Make sure your JSON config is saved and valid
|
|
162
|
+
- Restart your MCP client (Claude, Cursor, Windsurf)
|
|
138
163
|
|
|
139
|
-
|
|
164
|
+
### Token not working?
|
|
165
|
+
- Check that it has App Platform access
|
|
166
|
+
- Try generating a fresh one
|
|
140
167
|
|
|
141
|
-
###
|
|
168
|
+
### JSON errors?
|
|
169
|
+
- No trailing commas
|
|
170
|
+
- No comments allowed in JSON
|
|
142
171
|
|
|
143
|
-
|
|
144
|
-
2. Verify your API token has the necessary permissions
|
|
145
|
-
3. Check the app logs for any error messages
|
|
172
|
+
You can also test the server directly by running:
|
|
146
173
|
|
|
147
|
-
|
|
174
|
+
```
|
|
175
|
+
npx @digitalocean/mcp
|
|
176
|
+
```
|
|
148
177
|
|
|
149
|
-
|
|
178
|
+
---
|
|
150
179
|
|
|
151
180
|
## Contributing
|
|
181
|
+
We’d love your help improving this! Bug reports, new features, and docs improvements are all welcome.
|
|
182
|
+
|
|
183
|
+
1. Fork this repo
|
|
184
|
+
2. Create a branch (`git checkout -b feature/awesome-tool`)
|
|
185
|
+
3. Open a PR
|
|
186
|
+
|
|
187
|
+
---
|
|
188
|
+
|
|
189
|
+
## License
|
|
152
190
|
|
|
153
|
-
|
|
191
|
+
This project is licensed under the [MIT License](LICENSE).
|
package/build/api.js
CHANGED
|
@@ -7,6 +7,7 @@ exports.DigitalOceanApiError = void 0;
|
|
|
7
7
|
exports.createClient = createClient;
|
|
8
8
|
const digitalocean_openapi_yaml_zod_1 = require("./specs/digitalocean-openapi.yaml.zod");
|
|
9
9
|
const logger_1 = __importDefault(require("./logger"));
|
|
10
|
+
const version_1 = require("./version");
|
|
10
11
|
const BASE_URL = "https://api.digitalocean.com";
|
|
11
12
|
function getToken() {
|
|
12
13
|
const token = process.env.DIGITALOCEAN_API_TOKEN;
|
|
@@ -30,7 +31,7 @@ function parsePath(path, pathParams = {}) {
|
|
|
30
31
|
function createClient(params = {}) {
|
|
31
32
|
const token = getToken();
|
|
32
33
|
const sharedHeaders = {
|
|
33
|
-
"User-Agent":
|
|
34
|
+
"User-Agent": `digitalocean-mcp/${version_1.LIB_VERSION}`,
|
|
34
35
|
Authorization: `Bearer ${token}`,
|
|
35
36
|
"Content-Type": "application/json",
|
|
36
37
|
Accept: "application/json",
|
package/build/server.js
CHANGED
|
@@ -14,7 +14,7 @@ const databases_1 = require("./tools/databases");
|
|
|
14
14
|
function createServer() {
|
|
15
15
|
const server = new DOMcpServer_1.DOMcpServer({
|
|
16
16
|
name: "DigitalOcean MCP Server",
|
|
17
|
-
version:
|
|
17
|
+
version: package_json_1.default.version,
|
|
18
18
|
}, { capabilities: { logging: { subscribe: true } } });
|
|
19
19
|
logger_1.default.createStdioLogger(server);
|
|
20
20
|
(0, app_1.registerAppTools)(server);
|
package/build/version.js
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@digitalocean/mcp",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.13",
|
|
4
4
|
"description": "DigitalOcean MCP",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -18,7 +18,7 @@
|
|
|
18
18
|
"build"
|
|
19
19
|
],
|
|
20
20
|
"scripts": {
|
|
21
|
-
"prebuild": "node -p \"'//
|
|
21
|
+
"prebuild": "node -p \"'// THIS FILE IS GENERATED. DO NOT MODIFY.\\nexport const LIB_VERSION = ' + JSON.stringify(require('./package.json').version) + ';'\" > src/version.ts",
|
|
22
22
|
"build": "tsc",
|
|
23
23
|
"dev": "tsc --watch",
|
|
24
24
|
"start:stdio": "node build/index.js",
|
|
@@ -34,5 +34,6 @@
|
|
|
34
34
|
"js-yaml": "^4.1.0",
|
|
35
35
|
"typed-openapi": "^0.10.1",
|
|
36
36
|
"typescript": "^5.8.3"
|
|
37
|
-
}
|
|
37
|
+
},
|
|
38
|
+
"packageManager": "yarn@1.22.22+sha512.a6b2f7906b721bba3d67d4aff083df04dad64c399707841b7acf00f6b133b7ac24255f2652fa22ae3534329dc6180534e98d17432037ff6fd140556e2bb3137e"
|
|
38
39
|
}
|