The Model Context Protocol (MCP) is a standardized protocol for providing context to large language models.
MCP clients are applications (like Windsurf, Cursor, Claude, or VS Code Copilot) that connect to MCP servers. MCP servers provide context and tools for code agents to use.
You can use DigitalOcean’s MCP server to provide context about App Platform, which enables AI tools to interface with the DigitalOcean API to manage your resources.
Prerequisites
To use the DigitalOcean MCP server you need the following:
Do not commit access tokens to your Git repository. Many MCP clients require you to put access tokens directly in their configuration files. This can be safe if the configuration file is not checked into a Git repository and the file has appropriately restricted read
permissions.
If the configuration file is in a Git repository, add the file to .gitignore
or use any available client-specific techniques (such as VS Code’s input variable substitution to avoid exposing your access token.
The DigitalOcean MCP server runs locally using npm’s npx
command and requires no further installation.
Add the DigitalOcean MCP Server to MCP Clients
MCP clients use a standard JSON format to configure MCP servers. Use the following DigitalOcean MCP server configuration and MCP client instructions for Claude, Cursor, VS Code, and Windsurf to finish the configuration.
To find other MCP clients not listed here, refer to the official Model Context Protocol website’s Example Clients list.
Example DigitalOcean MCP Configuration
The following JSON snippet configures the DigitalOcean MCP server with <your_api_token>
and access to only the apps
App Platform service.
{
"mcpServers": {
"digitalocean": {
"command": "npx",
"args": ["-y", "@digitalocean/mcp", "--services", "apps"],
"env": {
"DIGITALOCEAN_API_TOKEN": "<your_api_token>"
}
}
}
}
Replace <your_api_token>
with your DigitalOcean API token, or – if available – use the client-specific method of variable substitution to keep your token out of the configuration file.
Refer to the mcp-digitalocean
repository for more information on other supported DigitalOcean services and detailed lists and descriptions of their available tools.
Claude
Use claude mcp add
to add MCP servers to Claude Code. You should have your DigitalOcean API token set as the DIGITALOCEAN_API_TOKEN
environment variable before running this command:
claude mcp add digitalocean \
--env DIGITALOCEAN_API_TOKEN=${DIGITALOCEAN_API_TOKEN} \
-- npx -y "@digitalocean/mcp"
Check if the addition was successful by listing your available MCP servers:
Read the official Claude Code Installing MCP servers docs for more information.
For Claude Desktop, refer to Getting started with Local MCP Servers on Claude Desktop.
Cursor

Use the Add to Cursor badge or read Cursor’s Model Context Protocol docs to add the DigitalOcean MCP server to Cursor.
Visual Studio Code
Read Use MCP servers in VS Code to add the DigitalOcean MCP server to Visual Studio Code.
Windsurf
Read the Windsurf Cascade MCP docs to learn how to add the DigitalOcean MCP server to Windsurf.
Troubleshooting
If your DigitalOcean MCP server is not working as expected, check the following common issues.
Authentication Issues
The DigitalOcean MCP server requires an active and properly-scoped access token:
- Ensure the
DIGITALOCEAN_API_TOKEN
variable is correctly set in the MCP server’s environment
- Verify the access token has appropriate permissions for the services you’re using
- Check that the access token hasn’t expired
Invalid Specifications
If the MCP server is functioning but giving you code and configuration that results in errors, check that the generated code or configuration files match the relevant API specification or platform availability:
Unsupported Region or Service
An LLM may configure services or features that are not available in the specified region:
- Check regional availability for the service you’re setting up
- Verify the service is available in your selected region
- Use
doctl compute region list
to see available regions
Debugging Best Practices
When debugging issues with LLMs and the DigitalOcean MCP server, consider the following:
- Keep Logs: Save the MCP request/response logs for reproducibility
- Start Small: Test with small and focused operations first before moving on to complex workflows
- Check Permissions: Ensure your API token has the necessary scopes