Connects Claude directly to the DigitalOcean API through a collection of standalone HTTPS endpoints, each handling a different service area. You get dedicated interfaces for droplets, Kubernetes clusters, databases, container registries, App Platform deployments, and their newer GenAI services like batch inference and dedicated GPU instances. The project emphasizes security with prominent warnings against hardcoding API tokens, instead walking through environment variable setup for macOS, Linux, and Windows. Useful if you're managing DigitalOcean infrastructure and want Claude to handle resource provisioning, monitoring, or configuration without switching to the web console. Each service runs as its own MCP server, so you can connect to just the ones you need.
MCP DigitalOcean Integration is an open-source project 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.
DISCLAIMER: "Use of MCP technology to interact with your DigitalOcean account can come with risks"
WARNING: Do NOT paste your DigitalOcean API token directly into any config file (e.g.,
claude_desktop_config.json,~/.cursor/config.json, VS Code settings). If you commit these files to GitHub, your token will be exposed and GitHub will automatically block or revoke it to protect your account.
The safe approach is to store your token in an environment variable on your machine and reference it from your config file. Follow the steps below for your operating system before proceeding with any client installation.
Open a terminal.
Determine which shell you are using:
echo $SHELL
/bin/zsh → edit ~/.zshrc/bin/bash → edit ~/.bashrc or ~/.bash_profileOpen the file in a text editor:
# For zsh (default on macOS Monterey and later)
nano ~/.zshrc
# For bash
nano ~/.bashrc
Add the following line at the bottom of the file:
export DIGITALOCEAN_API_TOKEN="your_actual_token_here"
Replace your_actual_token_here with your real token from the DigitalOcean API Tokens page.
Save and exit:
nano: press Ctrl + O, then Enter to save, then Ctrl + X to exit.Reload your shell to apply the change:
source ~/.zshrc # or source ~/.bashrc
Verify it is set correctly:
echo $DIGITALOCEAN_API_TOKEN
You should see your token printed in the terminal.
.env file (for project-level isolation)In your project root folder, create a .env file:
touch .env
Open it and add:
DIGITALOCEAN_API_TOKEN=your_actual_token_here
Immediately add .env to your .gitignore so it is never committed:
echo ".env" >> .gitignore
To load the .env file into your current terminal session:
export $(grep -v '^#' .env | xargs)
Verify:
echo $DIGITALOCEAN_API_TOKEN
Note: Option B only sets the variable for the current terminal session. You need to run step 4 each time you open a new terminal. For a permanent solution, use Option A.
DIGITALOCEAN_API_TOKENyour_actual_token_hereecho $env:DIGITALOCEAN_API_TOKEN
Or in Command Prompt:
echo %DIGITALOCEAN_API_TOKEN%
$env:DIGITALOCEAN_API_TOKEN = "your_actual_token_here"
.env file on WindowsIn your project folder, create a file named .env (no extension) with this content:
DIGITALOCEAN_API_TOKEN=your_actual_token_here
Add .env to your .gitignore:
.env
To load it in PowerShell:
Get-Content .env | ForEach-Object {
if ($_ -match "^\s*([^#][^=]*)=(.*)$") {
[System.Environment]::SetEnvironmentVariable($matches[1].Trim(), $matches[2].Trim(), "Process")
}
}
Verify:
echo $env:DIGITALOCEAN_API_TOKEN
https://cloud.digitalocean.com/account/api/tokensmcp-local-dev), set expiry, and choose the required scopes.The easiest way to get started is to use DigitalOcean's hosted MCP services. Each service is deployed as a standalone MCP server accessible via HTTPS, allowing you to connect without running any local server. You can connect to multiple endpoints simultaneously by adding multiple entries to your configuration.
| Service | Remote MCP URL | Description |
|---|---|---|
| apps | https://apps.mcp.digitalocean.com/mcp | Manage DigitalOcean App Platform applications, including deployments and configurations. |
| accounts | https://accounts.mcp.digitalocean.com/mcp | Get information about your DigitalOcean account, billing, balance, invoices, and SSH keys. |
| databases | https://databases.mcp.digitalocean.com/mcp | Provision, manage, and monitor managed database clusters (Postgres, MySQL, Redis, etc.). |
| doks | https://doks.mcp.digitalocean.com/mcp | Manage DigitalOcean Kubernetes clusters and node pools. |
| droplets | https://droplets.mcp.digitalocean.com/mcp | Create, manage, resize, snapshot, and monitor droplets (virtual machines) on DigitalOcean. |
| docr | https://docr.mcp.digitalocean.com/mcp | Manage DigitalOcean Container Registry repositories, tags, manifests, and garbage collection. |
| genai-batchinference | https://genai-batchinference.mcp.digitalocean.com/mcp | Create, manage, and monitor batch inference jobs for asynchronous bulk AI processing. |
| genai-custom-models | https://genai-custom-models.mcp.digitalocean.com/mcp | Import, list, update, and delete custom (bring-your-own) models on DigitalOcean's GenAI platform. |
| genai-inferencerouter | https://genai-inferencerouter.mcp.digitalocean.com/mcp | Create, list, get, and delete GenAI model routers. |
| dedicated-inference | https://dedicated-inference.mcp.digitalocean.com/mcp | Manage Dedicated Inference instances for GPU-accelerated model serving. |
| inference-modelcatalog | https://inference-modelcatalog.mcp.digitalocean.com/mcp | Browse the DigitalOcean Inference model catalog, search for models, and get model cards. |
| insights | https://insights.mcp.digitalocean.com/mcp | Monitors your resources, endpoints and alert you when they're slow, unavailable, or SSL certificates are expiring. |
| marketplace | https://marketplace.mcp.digitalocean.com/mcp | Discover and manage DigitalOcean Marketplace applications. |
| networking | https://networking.mcp.digitalocean.com/mcp | Manage domains, DNS records, certificates, firewalls, load balancers, reserved IPs, BYOIP Prefixes, VPCs, and CDNs. |
| functions | https://functions.mcp.digitalocean.com/mcp | Manage serverless function namespaces, actions, packages, triggers, and activations. |
| spaces | https://spaces.mcp.digitalocean.com/mcp | DigitalOcean Spaces object storage and Spaces access keys for S3-compatible storage. |
| docs | https://docs.mcp.digitalocean.com/mcp | Search and retrieve DigitalOcean public documentation. No API token required. |
| genai-evaluation | https://genai-evaluation.mcp.digitalocean.com/mcp | Manage and run evaluation workflows in DigitalOcean's GenAI platform. |
| nfs | https://nfs.mcp.digitalocean.com/mcp | Manage DigitalOcean NFS file shares and file share snapshots. |
| volumes | https://volumes.mcp.digitalocean.com/mcp | Manage DigitalOcean block storage volumes and volume snapshots. |
Make sure you have completed Step 1 and your DIGITALOCEAN_API_TOKEN environment variable is set. Then run:
claude mcp add --transport http digitalocean-apps https://apps.mcp.digitalocean.com/mcp \
--header "Authorization: Bearer $DIGITALOCEAN_API_TOKEN"
How this works: The
$DIGITALOCEAN_API_TOKENis expanded by your shell at the time you run the command. The actual token value is stored securely in Claude's config — you never paste the token into the command yourself.
You can add multiple services the same way:
claude mcp add --transport http digitalocean-databases https://databases.mcp.digitalocean.com/mcp \
--header "Authorization: Bearer $DIGITALOCEAN_API_TOKEN"
claude mcp add --transport http digitalocean-droplets https://droplets.mcp.digitalocean.com/mcp \
--header "Authorization: Bearer $DIGITALOCEAN_API_TOKEN"
See the Available Services section for the complete list of available endpoints.
claude mcp add digitalocean-mcp \
-e DIGITALOCEAN_API_TOKEN=$DIGITALOCEAN_API_TOKEN \
-- npx @digitalocean/mcp --services apps,databases
This will:
digitalocean-mcp.apps and databases services.~/.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
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=$DIGITALOCEAN_API_TOKEN \
-- npx @digitalocean/mcp --services apps,databases
This will:
~/.claude.jsonTo remove it:
claude mcp remove -s user digitalocean-mcp-user-scope
Before editing the config file, ensure DIGITALOCEAN_API_TOKEN is set in your shell profile (see Step 1 — Option A). Claude Desktop reads environment variables from your shell profile at launch.
The config file is located at:
~/Library/Application Support/Claude/claude_desktop_config.json%APPDATA%\Claude\claude_desktop_config.json~/.config/Claude/claude_desktop_config.jsonAdd the remote MCP servers to your config file. Reference the env var using ${DIGITALOCEAN_API_TOKEN} — Claude Desktop will substitute it at runtime:
{
"mcpServers": {
"digitalocean-apps": {
"url": "https://apps.mcp.digitalocean.com/mcp",
"headers": {
"Authorization": "Bearer ${DIGITALOCEAN_API_TOKEN}"
}
},
"digitalocean-databases": {
"url": "https://databases.mcp.digitalocean.com/mcp",
"headers": {
"Authorization": "Bearer ${DIGITALOCEAN_API_TOKEN}"
}
}
}
}
Important: The
${DIGITALOCEAN_API_TOKEN}syntax tells Claude Desktop to read the value from your system's environment variables. Your actual token is never written into this file. This file is safe to commit to version control.
You can add any of the endpoints listed in the Available Services section.
Add the following to your claude_desktop_config.json file. The env block passes the environment variable directly to the MCP server process — no hardcoded token needed:
{
"mcpServers": {
"digitalocean": {
"command": "npx",
"args": ["@digitalocean/mcp", "--services", "apps"],
"env": {
"DIGITALOCEAN_API_TOKEN": "${DIGITALOCEAN_API_TOKEN}"
}
}
}
}
How this works: The
"env"block in Claude Desktop config passes environment variables to the spawned MCP server process. The${DIGITALOCEAN_API_TOKEN}value is resolved from your system environment at runtime. Your token is never stored in the config file itself.
After saving the file, restart Claude Desktop for the changes to take effect.
Before editing the config file, ensure DIGITALOCEAN_API_TOKEN is set in your shell profile (see Step 1 — Option A).
The Cursor config file is located at:
~/.cursor/config.json%USERPROFILE%\.cursor\config.jsonAdd the remote MCP servers to your Cursor settings file:
{
"mcpServers": {
"digitalocean-apps": {
"url": "https://apps.mcp.digitalocean.com/mcp",
"headers": {
"Authorization": "Bearer ${DIGITALOCEAN_API_TOKEN}"
}
},
"digitalocean-databases": {
"url": "https://databases.mcp.digitalocean.com/mcp",
"headers": {
"Authorization": "Bearer ${DIGITALOCEAN_API_TOKEN}"
}
}
}
}
You can add any of the endpoints listed in the Available Services section.
Add the following to your Cursor settings file located at ~/.cursor/config.json:
{
"mcpServers": {
"digitalocean": {
"command": "npx",
"args": ["@digitalocean/mcp", "--services", "apps"],
"env": {
"DIGITALOCEAN_API_TOKEN": "${DIGITALOCEAN_API_TOKEN}"
}
}
}
}
How this works: Cursor resolves
${DIGITALOCEAN_API_TOKEN}from your system environment variables when it launches the MCP server. Make sure the variable is set in your shell profile before starting Cursor.
Shift + ⌘ + P on Mac or Ctrl + Shift + P on Windows/Linux)To check MCP server logs and debug issues:
⌘+Shift+P on Mac or Ctrl+Shift+P on Windows/Linux)In Cursor's chat, try asking: "List all my DigitalOcean apps" — this should trigger the MCP server to fetch your apps if properly configured. If you are getting a 401 error or authentication related errors, verify that the DIGITALOCEAN_API_TOKEN variable is correctly set by running echo $DIGITALOCEAN_API_TOKEN in your terminal.
Before editing the config file, ensure DIGITALOCEAN_API_TOKEN is set in your shell profile (see Step 1 — Option A).
The VS Code MCP config file is located at .vscode/mcp.json in your workspace root. Create this file if it does not exist. Add the remote MCP servers:
{
"inputs": [
{
"id": "digitalocean-token",
"type": "promptString",
"description": "DigitalOcean API Token",
"password": true
}
],
"servers": {
"digitalocean-apps": {
"url": "https://apps.mcp.digitalocean.com/mcp",
"headers": {
"Authorization": "Bearer ${input:digitalocean-token}"
}
},
"digitalocean-databases": {
"url": "https://databases.mcp.digitalocean.com/mcp",
"headers": {
"Authorization": "Bearer ${input:digitalocean-token}"
}
}
}
}
How VS Code inputs work: The
inputsblock defines a named input (digitalocean-token) that VS Code will prompt you to enter securely the first time you use the server. Your token is stored in VS Code's secret storage — never written to disk in plain text. The"password": trueflag ensures it is masked during input. This config file is completely safe to commit to GitHub.
Alternatively, if you prefer to use a system environment variable directly:
{
"inputs": [],
"servers": {
"digitalocean-apps": {
"url": "https://apps.mcp.digitalocean.com/mcp",
"headers": {
"Authorization": "Bearer ${env:DIGITALOCEAN_API_TOKEN}"
}
}
}
}
Note: VS Code uses
${env:VARIABLE_NAME}syntax to read from system environment variables.
Add the following to your .vscode/mcp.json file. Use VS Code's inputs feature to avoid hardcoding the token:
{
"inputs": [
{
"id": "digitalocean-token",
"type": "promptString",
"description": "DigitalOcean API Token",
"password": true
}
],
"servers": {
"mcpDigitalOcean": {
"command": "npx",
"args": [
"@digitalocean/mcp",
"--services",
"apps"
],
"env": {
"DIGITALOCEAN_API_TOKEN": "${input:digitalocean-token}"
}
}
}
}
Or, to use a system environment variable directly:
{
"inputs": [],
"servers": {
"mcpDigitalOcean": {
"command": "npx",
"args": [
"@digitalocean/mcp",
"--services",
"apps"
],
"env": {
"DIGITALOCEAN_API_TOKEN": "${env:DIGITALOCEAN_API_TOKEN}"
}
}
}
}
Shift + ⌘ + P on Mac or Ctrl + Shift + P on Windows/Linux)To see what tools are available from the MCP server:
⌘+Shift+P on Mac or Ctrl+Shift+P on Windows/Linux)MCP Server: mcpDigitalocean. You should be able to list available tools like app-create, app-list, app-delete, etc.To troubleshoot MCP connections:
⌘+Shift+P on Mac or Ctrl+Shift+P on Windows/Linux)If you are getting a 401 error or authentication related errors, verify that the DIGITALOCEAN_API_TOKEN variable is set by running echo $DIGITALOCEAN_API_TOKEN in your terminal before launching VS Code.
Before pushing any code to GitHub, verify the following:
.env file (if used) is listed in .gitignoredop_v1_...${DIGITALOCEAN_API_TOKEN}, ${env:DIGITALOCEAN_API_TOKEN}, or ${input:...} syntaxgit diff or git status to confirm no secrets are stagedIf your token was already committed: Go to the DigitalOcean API Tokens page, delete the compromised token, and generate a new one. GitHub's secret scanning will detect and flag exposed tokens automatically.
If you're using the local installation method (not Remote MCP), you'll need:
You can find installation guides at https://nodejs.org/en/download
Verify your installation:
node --version
npm --version
To verify the local MCP server works correctly, you can test it directly from the command line (make sure DIGITALOCEAN_API_TOKEN is set in your environment first):
npx @digitalocean/mcp --services apps
When using the local installation, 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
Each service provides a detailed README describing all available tools, resources, arguments, and example queries. See the following files for full documentation:
inference-model-catalog-searchinference-model-catalog-get-cardcreate-app-from-specdroplet-resizekey-createdomain-createdroplet-enable-backupscdn-flush-cachevpc-peering-createvpc-peering-deletedocs-searchdocs-get-quickstartContributions are welcome! If you encounter any issues or have ideas for improvements, feel free to open an issue or submit a pull request.
This project is licensed under the MIT License. See the LICENSE file for details.
silenceper/mcp-k8s
azure/containerization-assist
io.github.evozim/aws-builder
reza-gholizade/k8s-mcp-server
flux159/mcp-server-kubernetes