@digitalocean/mcp 0.0.12 → 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 CHANGED
@@ -1,52 +1,68 @@
1
1
  # DigitalOcean MCP Server
2
2
 
3
- A [Model Context Protocol (MCP)](https://modelcontextprotocol.io/introduction) server that provides tools to interact with DigitalOcean's [App Platform](https://www.digitalocean.com/products/app-platform) services.
3
+ [![npm version](https://img.shields.io/npm/v/@digitalocean/mcp.svg)](https://www.npmjs.com/package/@digitalocean/mcp) [![License: MIT](https://img.shields.io/badge/License-MIT-green.svg)](LICENSE)
4
4
 
5
- ## Overview
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
- This MCP server exposes DigitalOcean App Platform functionality through standardized tools that can be used by any MCP client, including Claude Desktop and [Cursor](https://docs.cursor.com/context/model-context-protocol). It enables AI assistants to directly manage your DigitalOcean apps without needing to write code or remember complex API endpoints.
7
+ [![Install MCP Server](https://cursor.com/deeplink/mcp-install-dark.svg)](https://cursor.com/install-mcp?name=digitalocean&config=eyJjb21tYW5kIjoibnB4IEBkaWdpdGFsb2NlYW4vbWNwIiwiZW52Ijp7IkRJR0lUQUxPQ0VBTl9BUElfVE9LRU4iOiJZT1VSX0RPX1RPS0VOIn19)
8
+ ---
8
9
 
9
- ## Features
10
+ ## 📚 Table of Contents
10
11
 
11
- - Manage apps (create, update, delete, restart)
12
- - Work with deployments (list, create, get, cancel)
13
- - Access logs for apps and deployments
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
- ## Setting up with Claude Desktop
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
- 1. Open Claude Desktop
24
- 2. Go to Settings Developer Edit Config
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
- ```json
29
- {
30
- "mcpServers": {
31
- "digitalocean": {
32
- "command": "npx",
33
- "args": ["@digitalocean/mcp"],
34
- "env": {
35
- "DIGITALOCEAN_API_TOKEN": "your_personal_access_token"
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
- ## Setting up with Cursor
57
+ ---
46
58
 
47
- 1. Go to Cursor Settings MCP → Click on "Add a new global MCP server"
48
- 2. This will open `~/.cursor/mcp.json`
49
- 3. Add or update the configuration with the same JSON as used for Claude Desktop:
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": "your_personal_access_token"
74
+ "DIGITALOCEAN_API_TOKEN": "YOUR_DO_TOKEN"
59
75
  }
60
76
  }
61
77
  }
62
78
  }
63
79
  ```
64
80
 
65
- 4. Replace `your_personal_access_token` with your actual DigitalOcean API token
66
- 5. Save the file and ensure the server is activated in Cursor Settings → MCP
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
- ## Using with Claude Desktop or Cursor
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
- Once configured, you can start chatting with the AI assistant using natural language to manage your DigitalOcean App Platform resources. Here are some examples of what you can ask:
97
+ ![Claude Desktop MCP Setup](https://github.com/user-attachments/assets/15ff8aed-c2ff-4bba-a0cc-0efabfdb0bcd)
98
+ *Setting up DigitalOcean MCP Server in Claude Desktop*
71
99
 
72
- ### Basic App Management
73
100
 
74
- - "How many DigitalOcean apps do I have?"
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
- ### Deployments
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
- - "When was the last deployment for my 'production-website' app?"
83
- - "Show me all deployments for my 'user-service' app"
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
+ ![Cursor MCP Setup](https://github.com/user-attachments/assets/da87617b-a368-4ffb-a5f1-2d3fa9a168a4)
111
+ *Setting up DigitalOcean MCP Server in Cursor*
86
112
 
87
- ### Creating and Updating Apps
113
+ ### Windsurf Setup
88
114
 
89
- - "Create a new static site app on DigitalOcean that deploys from my GitHub repo yourusername/static-website"
90
- - "Create a Flask app on DigitalOcean with the following specification: Python 3.9, 1 CPU, 1GB RAM, connected to my GitHub repo yourusername/flask-app"
91
- - "Update my 'api-service' app to use 2GB of RAM instead of 1GB"
92
- - "Set up a Node.js app that uses a managed PostgreSQL database"
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
- ### Logs and Debugging
122
+ ![Windsurf MCP Setup](https://github.com/user-attachments/assets/4408c955-34bd-4f51-92a9-b971bebbd785)
95
123
 
96
- - "Show me the logs for the 'web' component of my 'ecommerce' app"
97
- - "Get the latest build logs for my 'backend-api' app"
98
- - "What errors are showing up in my 'auth-service' deployment logs?"
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
- ### Infrastructure Information
139
+ The assistant will send the request → the MCP server talks to DigitalOcean → you get structured results, ready to act on.
101
140
 
102
- - "What regions can I deploy my DigitalOcean apps to?"
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
- Here's a quick overview of the available tools:
110
-
111
- - `list_apps` - List all apps on your account
112
- - `create_app` - Create a new app with an app specification
113
- - `get_app` - Get details about a specific app
114
- - `update_app` - Update an existing app
115
- - `delete_app` - Delete an app
116
- - `restart_app` - Restart an app
117
- - `list_deployments` - List all deployments for an app
118
- - `create_deployment` - Create a new deployment
119
- - `get_deployment` - Get details about a specific deployment
120
- - `cancel_deployment` - Cancel a deployment
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
- ### Common Issues
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
- - **Authentication Problems**: Ensure your DigitalOcean API token is valid and has the necessary permissions
164
+ ### Token not working?
165
+ - Check that it has App Platform access
166
+ - Try generating a fresh one
140
167
 
141
- ### If Tools Are Not Showing Up
168
+ ### JSON errors?
169
+ - No trailing commas
170
+ - No comments allowed in JSON
142
171
 
143
- 1. Check that the MCP server icon appears in the UI
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
- ## License
174
+ ```
175
+ npx @digitalocean/mcp
176
+ ```
148
177
 
149
- [MIT License](LICENSE)
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
- Contributions are welcome! Please feel free to submit a Pull Request.
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": "ModelContext/0.1.0",
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/version.js CHANGED
@@ -2,4 +2,4 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.LIB_VERSION = void 0;
4
4
  // THIS FILE IS GENERATED. DO NOT MODIFY.
5
- exports.LIB_VERSION = "0.0.12";
5
+ exports.LIB_VERSION = "0.0.13";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@digitalocean/mcp",
3
- "version": "0.0.12",
3
+ "version": "0.0.13",
4
4
  "description": "DigitalOcean MCP",
5
5
  "repository": {
6
6
  "type": "git",