nellika-lab/mcp-digitalocean
If you are the rightful owner of mcp-digitalocean and would like to certify it and/or have it hosted online, please leave a comment on the right or send an email to dayong@mcphub.com.
MCP DigitalOcean Integration - Enhanced with SSH Key Support is a comprehensive interface for managing DigitalOcean resources using the DigitalOcean API, built on the godo library and MCP framework.
MCP DigitalOcean Integration - Enhanced with SSH Key Support
This is an enhanced version of the MCP DigitalOcean Integration that provides a comprehensive interface for managing DigitalOcean resources and performing actions using the DigitalOcean API. Built on top of the godo library and the MCP framework, this project exposes a wide range of tools to simplify cloud infrastructure management.
🚀 NEW: SSH Key Support for Modern Linux Distributions
This enhanced version specifically addresses the critical issue with Rocky Linux and other modern distributions that require SSH key authentication instead of root passwords. Now you can create droplets with proper SSH key support!
Key Enhancements:
- ✅ SSH Key Parameter Support - Direct SSH key ID specification
- ✅ Environment Variable Fallback -
DIGITALOCEAN_DEFAULT_SSH_KEYSfor automation - ✅ Rocky Linux Compatible - Works with modern Linux distributions
- ✅ Additional Parameters - Private networking, IPv6, tags, VPC UUID support
- ✅ Full Backwards Compatibility - All existing configurations continue to work
- ✅ Comprehensive Testing - 35+ test cases ensuring reliability
DISCLAIMER: "Use of MCP technology to interact with your DigitalOcean account can come with risks"
Installation
Prerequisites
- Node.js (v18 or later)
- NPM (v8 or later)
node --version
npm --version
Local Installation
npx @digitalocean/mcp --services apps
Using with Claude Code
To add the DigitalOcean MCP server to Claude Code, run the following command in your terminal:
claude mcp add digitalocean-mcp \
-e DIGITALOCEAN_API_TOKEN=YOUR_DO_API_TOKEN \
-- npx @digitalocean/mcp --services apps,databases
This will:
- Add the MCP server under the default (local) scope — meaning it's only available inside the current folder.
- Register it with the name
digitalocean-mcp. - Enable the
appsanddatabasesservices. - Pass your DigitalOcean API token securely to the server.
- Store the configuration in your global Claude config at
~/.claude.json, scoped to the current folder.
To confirm it's been added:
claude mcp list
To inspect details:
claude mcp get digitalocean-mcp
To remove it:
claude mcp remove digitalocean-mcp
Alternatively, add the following to your claude_desktop_config.json file.
{
"mcpServers": {
"digitalocean": {
"command": "npx",
"args": ["@digitalocean/mcp", "--services apps"],
"env": {
"DIGITALOCEAN_API_TOKEN": "YOUR_API_TOKEN"
}
}
}
}
Want to use it everywhere?
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.
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:
claude mcp add -s user digitalocean-mcp-user-scope \
-e DIGITALOCEAN_API_TOKEN=YOUR_DO_API_TOKEN \
-- npx @digitalocean/mcp --services apps,databases
This will:
- Make the server available in all folders, not just the one you’re in
- Scope it to your user account
- Store it in your global Claude config at
~/.claude.json
To remove it:
claude mcp remove -s user digitalocean-mcp-user-scope
Using Cursor IDE
{
"mcpServers": {
"digitalocean": {
"command": "npx",
"args": ["@digitalocean/mcp", "--services apps"],
"env": {
"DIGITALOCEAN_API_TOKEN": "YOUR_API_TOKEN"
}
}
}
}
Using VSCode
{
"mcp": {
"inputs": [],
"servers": {
"mcpDigitalOcean": {
"command": "npx",
"args": [
"@digitalocean/mcp",
"--services",
"apps"
],
"env": {
"DIGITALOCEAN_API_TOKEN": "YOUR_API_TOKEN"
}
}
}
}
}
Configuring Tools
To configure tools, 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.
npx @digitalocean/mcp --services apps,droplets
Supported Services
The MCP DigitalOcean Integration supports the following services, allowing users to manage their DigitalOcean infrastructure effectively
| Service | Description |
|---|---|
| apps | Manage DigitalOcean App Platform applications, including deployments and configurations. |
| droplets | Create, manage, resize, snapshot, and monitor droplets (virtual machines) on DigitalOcean. |
| accounts | Get information about your DigitalOcean account, billing, balance, invoices, and SSH keys. |
| networking | Manage domains, DNS records, certificates, firewalls, reserved IPs, VPCs, and CDNs. |
| insights | Monitors your resources, endpoints and alert you when they're slow, unavailable, or SSL certificates are expiring. |
| spaces | DigitalOcean Spaces object storage and Spaces access keys for S3-compatible storage. |
| databases | Provision, manage, and monitor managed database clusters (Postgres, MySQL, Redis, etc.). |
| marketplace | Discover and manage DigitalOcean Marketplace applications. |
| doks | Manage DigitalOcean Kubernetes clusters and node pools. |
🔑 SSH Key Support Usage Examples
Environment Variable Approach
# Set default SSH keys that will be used for all droplets when SshKeys parameter is not specified
export DIGITALOCEAN_DEFAULT_SSH_KEYS="12345,67890"
Direct Parameter Approach
{
"Name": "rocky-server",
"Size": "s-1vcpu-1gb",
"ImageID": 123456789,
"Region": "nyc3",
"SshKeys": [12345, 67890],
"PrivateNetworking": true,
"IPv6": true,
"Tags": ["production", "web"],
"Backup": true,
"VpcUuid": "vpc-12345678"
}
Create Rocky Linux Droplet with SSH Keys
npx @digitalocean/mcp --services droplets
Then make a request to the droplet-create tool with SSH keys specified.
Service Documentation
Each service provides a detailed README describing all available tools, resources, arguments, and example queries. See the following files for full documentation:
Example Tool Usage
- Deploy an app from a GitHub repo:
create-app-from-spec - Resize a droplet:
droplet-resize - Add a new SSH key:
key-create - Create a new domain:
domain-create - Enable backups on a droplet:
droplet-enable-backups - Flush a CDN cache:
cdn-flush-cache - Create a VPC peering connection:
vpc-peering-create - Delete a VPC peering connection:
vpc-peering-delete
Contributing
Contributions are welcome! If you encounter any issues or have ideas for improvements, feel free to open an issue or submit a pull request.
How to Contribute
- Fork the repository.
- Create a new branch for your feature or bug fix.
- Submit a pull request with a clear description of your changes.
License
This project is licensed under the MIT License. See the file for details.