mcp-digitalocean
by pandruszkow
README.md
# mcp-digitalocean
MCP server for DigitalOcean with tag-gated mutations. All non-sensitive resources are readable freely; write operations are only permitted on resources that carry at least one configured tag.
## Access model
| Resource | Reads | Mutations |
|---|---|---|
| Droplets | ✓ | Tag-gated |
| Volumes | ✓ | Tag-gated |
| Snapshots | ✓ | Tag-gated |
| Load Balancers | ✓ | Tag-gated |
| Kubernetes clusters + node pools | ✓ | Tag-gated |
| Databases (credentials redacted) | ✓ | Tag-gated |
| Firewalls | ✓ | Tag-gated |
| Domains + DNS records | ✓ | — (no tag support in DO) |
| SSH keys | ✓ | — (no tag support in DO) |
| VPCs + members | ✓ | — (no tag support in DO) |
| Reserved IPs | ✓ | — (no tag support in DO) |
| Projects + resources | ✓ | — (no tag support in DO) |
| Account info | ✓ | n/a |
**Sensitive data:** Database connection objects (`password`, `uri`) are stripped from all responses automatically.
**Create operations:** Creating a resource is permitted only if the request includes at least one permitted tag. Untagged creates are rejected before the API call is made.
**Mutation operations on existing resources:** The resource is fetched first; if it carries none of the permitted tags, the operation is rejected.
## Configuration
| Variable | Required | Description |
|---|---|---|
| `DO_API_TOKEN` | Yes | DigitalOcean personal access token |
| `DO_MUTATION_TAGS` | Yes | Comma-separated list of tags that permit mutations, e.g. `ai-managed,sandbox` |
## Usage
```json
{
"mcpServers": {
"digitalocean": {
"command": "node",
"args": ["/path/to/mcp-digitalocean/dist/index.js"],
"env": {
"DO_API_TOKEN": "dop_v1_...",
"DO_MUTATION_TAGS": "ai-managed,sandbox"
}
}
}
}
```
Or keep the token out of the config file and set `DO_API_TOKEN` in your shell environment before starting the MCP client.
## Build
```
npm install
npm run build
```
## Development
```
DO_API_TOKEN=... DO_MUTATION_TAGS=ai-managed npm run dev
```