Configure Local MCP Server

Validated on 5 Dec 2025 • Last edited on 5 Dec 2025

App Platform is a Platform-as-a-Service (PaaS) offering that allows developers to publish code directly to DigitalOcean servers without worrying about the underlying infrastructure.

The local MCP server runs as a single process on your machine via the @digitalocean/mcp npm package, providing a unified bridge to DigitalOcean services.

You enable the services you need, such as App Platform, Droplets, or Databases, by adding them in your local mcp.json client configuration. The MCP client then uses this configuration to launch the server and manage your DigitalOcean resources.

Prerequisites

To use the local MCP server, you need the following:

Warning

Do not commit access tokens to your Git repository. Many MCP clients require you to put access tokens directly in their configuration files. This is safe only if the configuration file is not checked into a Git repository and has appropriately restricted read permissions.

If the configuration file is in a Git repository, add it to .gitignore or use any available client-specific techniques (for example, 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.

Configure the Local MCP Server

The local MCP server (@digitalocean/mcp) is launched directly by your MCP client using the settings defined in your mcp.json configuration file. The exact location of this file and how it is applied depends on your MCP client.

To enable local MCP services, add an entry to the mcpServers block with the following:

  • command set to "npx"
  • args that include the MCP package name and the --services flag to add the DigitalOcean services you want to enable, such as "apps", "droplets", or "databases"
  • env that contains your DigitalOcean API token

The following JSON snippet configures the DigitalOcean MCP server with <your_api_token> and enables access to only the App Platform (apps) service. Replace <your_api_token> with your DigitalOcean API token, or use the client-specific method of variable substitution (if available) to keep your token out of the configuration file.

{
  "mcpServers": {
    "digitalocean": {
      "command": "npx",
      "args": ["-y", "@digitalocean/mcp", "--services", "apps"],
      "env": {
        "DIGITALOCEAN_API_TOKEN": "<your_api_token>"
      }
    }
  }
}

Refer to the mcp-digitalocean repository for more information on other supported DigitalOcean services and detailed lists and descriptions of their available tools.

Add the MCP Server to Your MCP Client

Claude

Use claude mcp add to add MCP servers you previously enabled in the mcp.json file to Claude Code. You must set your DigitalOcean API token 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:

claude mcp list

For more information, see the official Claude Code Installing MCP servers documentation.

To learn how to add MCP servers using Claude Desktop, see Getting started with Local MCP Servers on Claude Desktop.

Cursor

Install MCP Server

Use the Add to Cursor badge or see Cursor’s Model Context Protocol docs to add the DigitalOcean MCP server to Cursor.

Visual Studio Code

See Use MCP servers in VS Code to add the DigitalOcean MCP server to Visual Studio Code.

Windsurf

See the Windsurf Cascade MCP docs to learn how to add the DigitalOcean MCP server to Windsurf.

After you add the MCP server to your client, the local MCP server is launched whenever you access a DigitalOcean service enabled in your client’s configuration.

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.

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.

We can't find any results for your search.

Try using different keywords or simplifying your search terms.