Provides programmatic access to DigitalOcean's API with 48 tools across 7 service categories for complete infrastructure management, including droplet management, volume operations, snapshot handling, image management, floating IP management, load balancer configuration, firewall control, Kubernetes cluster management, and container registry access.
Enables management of Kubernetes clusters hosted on DigitalOcean, with tools for listing, retrieving details, creating, and deleting clusters through the DigitalOcean Kubernetes service.
DigitalOcean MCP Server
A comprehensive Model Context Protocol (MCP) server that provides programmatic access to DigitalOcean's API. This server exposes 48 tools across 7 major service categories for complete infrastructure management through the MCP interface.
Features
- 🖥️ Droplet Management: Complete lifecycle management with resize and snapshot capabilities
- 💾 Volume Management: Block storage operations including attach/detach and snapshots
- 📸 Snapshot Operations: Backup and restore functionality for droplets and volumes
- 🖼️ Image Management: Custom image operations, transfers, and conversions
- 🌐 Floating IP Management: Static IP allocation, assignment, and management
- ⚖️ Load Balancer Operations: Traffic distribution with full CRUD operations
- 🔥 Firewall Management: Complete network security with rule and policy management
- ☸️ Kubernetes Operations: Comprehensive cluster and node pool management
- 📦 Container Registry: Access and manage DigitalOcean container registries
- ✅ Connection Testing: Verify API connectivity and authentication
Prerequisites
- Go 1.19 or higher
- DigitalOcean API token (required - see Configuration section)
Installation
From Source
Using Go Install
Configuration
Environment Variables
REQUIRED: Set your DigitalOcean API token before running the server:
⚠️ The server will not function without this environment variable set.
Getting a DigitalOcean API Token
- Log in to your DigitalOcean Control Panel
- Navigate to API in the left sidebar
- Click Generate New Token
- Give your token a name and select appropriate scopes
- Copy the generated token (you won't be able to see it again)
Usage
Running the Server
First, ensure your DigitalOcean API token is set:
Then run the server:
Or run directly with Go:
The server will start and listen for MCP requests via stdio transport.
Available Tools (48 Total)
Connection & Testing
test_connection
- Test API connectivity and authentication
Droplet Management (7 tools)
list_droplets
- List all droplets with pagination supportget_droplet
- Get detailed information about a specific dropletcreate_droplet
- Create a new droplet with custom specificationsdelete_droplet
- Permanently delete a dropletresize_droplet
- Resize droplet to different size (CPU/RAM/disk)create_droplet_snapshot
- Create a snapshot backup of a droplet
Volume Management (8 tools)
list_volumes
- List all block storage volumes (optionally by region)get_volume
- Get detailed volume informationcreate_volume
- Create new block storage volumedelete_volume
- Delete a volumeattach_volume
- Attach volume to a dropletdetach_volume
- Detach volume from a dropletresize_volume
- Expand volume storage capacitycreate_volume_snapshot
- Create snapshot backup of a volume
Snapshot Operations (6 tools)
list_snapshots
- List all snapshots (filter by droplet/volume)list_volume_snapshots
- List volume-specific snapshotslist_droplet_snapshots
- List droplet-specific snapshotsget_snapshot
- Get detailed snapshot informationdelete_snapshot
- Delete a snapshot
Image Management (6 tools)
list_images
- List available images (distribution/application/user)get_image
- Get image details by ID or slugupdate_image
- Update image metadata (name, description)delete_image
- Delete custom imagestransfer_image
- Transfer image to different regionconvert_image_to_snapshot
- Convert image to snapshot format
Floating IP Management (6 tools)
list_floating_ips
- List all floating IP addressesget_floating_ip
- Get floating IP details and assignment statuscreate_floating_ip
- Create new floating IP (regional or assigned)delete_floating_ip
- Release floating IPassign_floating_ip
- Assign floating IP to dropletunassign_floating_ip
- Unassign floating IP from droplet
Load Balancer Operations (9 tools)
list_load_balancers
- List all load balancersget_load_balancer
- Get load balancer configuration and statuscreate_load_balancer
- Create new load balancer with forwarding rulesupdate_load_balancer
- Update load balancer configurationdelete_load_balancer
- Delete load balanceradd_droplets_to_load_balancer
- Add droplets to load balancer poolremove_droplets_from_load_balancer
- Remove droplets from pooladd_forwarding_rules_to_load_balancer
- Add traffic forwarding rulesremove_forwarding_rules_from_load_balancer
- Remove forwarding rules
Firewall Management (11 tools)
list_firewalls
- List all firewalls in the accountget_firewall
- Get detailed firewall configuration and rulescreate_firewall
- Create new firewall with inbound/outbound rulesupdate_firewall
- Update firewall configuration and rulesdelete_firewall
- Remove firewall from accountadd_droplets_to_firewall
- Assign droplets to firewall protectionremove_droplets_from_firewall
- Remove droplets from firewalladd_tags_to_firewall
- Add tags to firewall for organizationremove_tags_from_firewall
- Remove tags from firewalladd_rules_to_firewall
- Add new security rules to firewallremove_rules_from_firewall
- Remove existing security rules
Kubernetes Clusters (4 tools)
list_k8s_clusters
- List all Kubernetes clustersget_k8s_cluster
- Get cluster details and statuscreate_k8s_cluster
- Create new Kubernetes clusterdelete_k8s_cluster
- Delete Kubernetes cluster
Container Registry (2 tools)
list_registries
- List all container registriesget_registry
- Get registry details and repositories
Example MCP Client Usage
Basic Operations
Volume Management
Load Balancer Setup
Floating IP Management
Firewall Configuration
Development
Project Structure
Development Commands
Adding New Tools
- Define argument types in
types/args.go
- Implement handler logic in the appropriate file under
handlers/
- Register the tool in
server/tools.go
- Update this documentation
Dependencies
- godo - DigitalOcean API client
- mcp-golang - MCP protocol implementation
- oauth2 - OAuth2 authentication
Error Handling
All tools return standardized MCP responses:
- Success: JSON-formatted data with the requested information
- Error: Structured error messages with details about what went wrong
Common error scenarios:
- Invalid or missing API token
- Insufficient permissions
- Resource not found
- API rate limiting
- Network connectivity issues
Contributing
We welcome contributions! Please see CONTRIBUTING.md for guidelines.
License
This project is licensed under the MIT License - see the LICENSE file for details.
Support
- Report issues on GitHub Issues
- Check DigitalOcean API Documentation
- Review MCP Protocol Specification
Changelog
v2.0.1
- Firewall Management: Added comprehensive network security with 11 firewall tools
- Security Rules: Complete inbound/outbound rule management and configuration
- Droplet Protection: Assign and manage firewall protection for droplets
- Tag Management: Organize firewalls with tag-based categorization
- Rule Modification: Dynamic addition and removal of security rules
- Enhanced Documentation: Updated with firewall management examples
v2.0.0
- MAJOR EXPANSION: Added 30+ new API tools across 5 additional service categories
- Volume Management: Complete block storage lifecycle (8 tools)
- Snapshot Operations: Backup and restore functionality (6 tools)
- Image Management: Custom image operations and transfers (6 tools)
- Floating IP Management: Static IP allocation and assignment (6 tools)
- Load Balancer Operations: Traffic distribution with full CRUD (9 tools)
- Enhanced Droplets: Added resize and snapshot capabilities
- Comprehensive Documentation: Updated with detailed API coverage
- Improved Architecture: Modular handler design for scalability
v1.0.0
- Initial release
- Droplet management tools (5 tools)
- Kubernetes cluster tools (4 tools)
- Container registry tools (2 tools)
- Connection testing
This server cannot be installed
A Model Context Protocol (MCP) server that provides programmatic access to DigitalOcean's API. This server exposes tools for managing droplets, Kubernetes clusters, and container registries through the MCP interface.
Related MCP Servers
- -securityAlicense-qualityMCP Server simplifies the implementation of the Model Context Protocol by providing a user-friendly API to create custom tools and manage server workflows efficiently.Last updated -04TypeScriptMIT License
- -securityAlicense-qualityMCP Server provides a simpler API to interact with the Model Context Protocol by allowing users to define custom tools and services to streamline workflows and processes.Last updated -23TypeScriptMIT License
- AsecurityFlicenseAqualityAn all-in-one Model Context Protocol (MCP) server that connects your coding AI to numerous databases, data warehouses, data pipelines, and cloud services, streamlining development workflow through seamless integrations.Last updated -2Python
- GoMIT License