---
name: digitalocean-get-started
area: Getting Started
supported_surfaces: [cli, mcp, docs]
description: |-
  Hand your coding agent this playbook to set up DigitalOcean: install and
  sign in to doctl, connect the DigitalOcean MCP Router once for use across
  projects, and find the right docs for what you're building.
title: Onboard your agent to DigitalOcean
url: https://docs.digitalocean.com/get-started.md
---

# Set up DigitalOcean for your AI coding agent

Use this playbook to prepare the current agent for DigitalOcean. Install the CLI and connect MCP once per machine and agent. Create resources only when the user asks for them.

## How to run

Run section 1 once per machine. Run section 2 once per coding agent. Use section 3 to find docs for the user's task. Follow section 4 for the rest of the session.

Perform actions yourself when terminal or file access is available. Global or user-scoped installation is the default. Pause only for user authentication, approval, or UI actions you cannot perform. Do not merely return commands for the user to copy. If a step is blocked, record why and continue with the remaining steps.

## 1. Install and sign in to doctl

`doctl` is the official DigitalOcean CLI. Check for an existing installation:

```sh
doctl version
```

Browser sign-in requires doctl 1.184.0 or later. If doctl is missing or older, install the latest version:

```sh
# macOS
brew install doctl

# Ubuntu and other snap-supported Linux
sudo snap install doctl
```

On other systems, follow the [doctl install guide](https://docs.digitalocean.com/reference/doctl/how-to/install/index.html.md).

If `doctl version` reports that a newer release is available, upgrade with the same package manager.

Check whether doctl is already authenticated:

```sh
doctl account get
```

If it is not, sign in through the browser:

```sh
doctl auth login
```

doctl opens a browser where the user approves access. Pause while the user completes sign-in. If you are on a remote machine without a browser, run `doctl auth login --no-browser` and give the user the printed URL. If the user doesn't have a DigitalOcean account, they can create one at <https://cloud.digitalocean.com/registrations/new> and then sign in.

Verify:

```sh
doctl account get
doctl auth list
```

`doctl auth list` marks the current context. Report that name as the context, not the team name from `doctl account get`.

Do not create any resources during setup.

## 2. Connect the DigitalOcean MCP Router

The MCP Router is a single remote MCP endpoint that fronts DigitalOcean's first-party MCP services, including documentation search. Connect it once to manage resources and search docs across projects.

```text
https://mcp.digitalocean.com/mcp
```

The router uses OAuth. Do not add an `Authorization` header or API token unless the user asks for token-based auth.

Before changing an MCP configuration file, inspect it and merge the `digitalocean` entry without replacing unrelated settings. Add the router only once per client.

If the client already connects to `https://mcp.digitalocean.com/mcp` under any name, including through a plugin or connector, don't add another entry. Authorize and verify the existing one instead. Leave per-service DigitalOcean MCP servers, such as `https://droplets.mcp.digitalocean.com/mcp`, in place unless the user asks you to remove them.

### Claude Code

```bash
claude mcp list
claude mcp add --transport http digitalocean --scope user https://mcp.digitalocean.com/mcp
```

Connectors added through claude.ai appear in the list with a `claude.ai` prefix. To authenticate, open `/mcp`, select `digitalocean`, and choose the authentication action.

### Codex CLI

```bash
codex mcp list
codex mcp add digitalocean --url https://mcp.digitalocean.com/mcp
```

If the server exists but is not authenticated, run `codex mcp login digitalocean`.

### Cursor

Skip this step if Cursor already lists a server for the router URL, for example from a plugin. Otherwise, merge this into `~/.cursor/mcp.json`:

```json
{
  "mcpServers": {
    "digitalocean": {
      "url": "https://mcp.digitalocean.com/mcp"
    }
  }
}
```

Cursor displays `Needs login` when authorization is required. Ask the user to click it.

### VS Code with GitHub Copilot

Run **MCP: Add Server**, choose **HTTP**, enter `https://mcp.digitalocean.com/mcp`, name it `digitalocean`, and select **Global**. Then run **MCP: List Servers**, start `digitalocean`, and allow authentication.

### Devin Desktop (formerly Windsurf) and Devin CLI

The Devin Local agent in Devin Desktop and the Devin CLI share the same user config, `~/.config/devin/mcp_config.json` (on Windows, `%APPDATA%\devin\mcp_config.json`):

```bash
devin mcp list
devin mcp add -s user digitalocean https://mcp.digitalocean.com/mcp
```

To authenticate in Devin Desktop, open **Customize**, select **MCPs**, and click **Authenticate** on `digitalocean`. See [Devin MCP configuration](https://docs.devin.ai/cli/extensibility/mcp/configuration.md).

### Other clients

If the client supports remote MCP with OAuth, add `https://mcp.digitalocean.com/mcp` using its documented method. If it supports only stdio servers, you can bridge to the router with the third-party `mcp-remote` package: configure the command as `npx` with arguments `["mcp-remote", "https://mcp.digitalocean.com/mcp"]`. Confirm with the user before installing it.

If the user doesn't want to grant account access, connect only the Documentation MCP server instead. It needs no authentication:

```text
https://docs.mcp.digitalocean.com/mcp
```

For per-client setup commands, fetch https://docs.digitalocean.com/reference/mcp/documentation-mcp-tools/index.html.md.

### Authorize and verify

When a browser or consent screen opens, pause for the user to complete OAuth.

The router exposes three tools: `find_tools`, `retrieve_schema`, and `invoke_tool`. After authorization:

1. Call `invoke_tool` with `docs/docs-search` and a query such as `App Platform`.
2. Call `invoke_tool` with the read-only `accounts/account-get-information` tool.
3. Refresh the client's MCP tools or server list if either call fails.
4. Reload or restart the client only if refreshing does not load the server.

For more client routes and per-service endpoints, see [Configure Remote MCP](https://docs.digitalocean.com/reference/mcp/configure-mcp/index.html.md).

## 3. Find the right docs for the task

Ask the user what they want to build if it isn't clear. Then read the matching getting started page before acting.

| Goal | Start here | Full product docs |
|---|---|---|
| Deploy a web app or API from a repo or container image | [App Platform](https://docs.digitalocean.com/products/app-platform/getting-started/index.html.md) | [`llms-full`](https://docs.digitalocean.com/llms-full-products-app-platform.txt) |
| Run a virtual machine | [Droplets](https://docs.digitalocean.com/products/droplets/getting-started/index.html.md) | [`llms-full`](https://docs.digitalocean.com/llms-full-products-droplets.txt) |
| Run containers on Kubernetes | [DigitalOcean Kubernetes](https://docs.digitalocean.com/products/kubernetes/getting-started/index.html.md) | [`llms-full`](https://docs.digitalocean.com/llms-full-products-kubernetes.txt) |
| Add a managed database | [Managed Databases](https://docs.digitalocean.com/products/databases/index.html.md) | [`llms-full`](https://docs.digitalocean.com/llms-full-products-databases.txt) |
| Store files or static assets | [Spaces](https://docs.digitalocean.com/products/spaces/getting-started/index.html.md) | [`llms-full`](https://docs.digitalocean.com/llms-full-products-spaces.txt) |
| Run serverless functions | [Functions](https://docs.digitalocean.com/products/functions/getting-started/index.html.md) | [`llms-full`](https://docs.digitalocean.com/llms-full-products-functions.txt) |
| Call AI models | [Inference](https://docs.digitalocean.com/products/inference/getting-started/index.html.md) | [`llms-full`](https://docs.digitalocean.com/llms-full-products-inference.txt) |
| Run and govern AI agents | [Managed Agents](https://docs.digitalocean.com/products/managed-agents/index.html.md) (public preview) | [`llms-full`](https://docs.digitalocean.com/llms-full-products-managed-agents.txt) |
| Run GPU workloads | [GPU Droplets](https://docs.digitalocean.com/products/gpu-droplets/index.html.md) | [`llms-full`](https://docs.digitalocean.com/llms-full-products-gpu-droplets.txt) |

For anything else:

- Search with `docs/docs-search` through the MCP Router.
- Browse the [docs index](https://docs.digitalocean.com/llms.txt), which also includes guidance on product choices and naming.
- Read any docs page as markdown by replacing `index.html` with `index.html.md` in its URL, or appending `index.html.md` to a directory URL.
- Use the per-product full-text files listed in [`llms-full.txt`](https://docs.digitalocean.com/llms-full.txt).

## 4. Work safely with the user's account

DigitalOcean resources bill while they exist. Connecting doctl and MCP gives the agent the access of the signed-in user.

- Confirm with the user before creating, resizing, or deleting anything. State the resource type, size, region, and expected cost when you know it.
- Keep human confirmation enabled for every MCP tool that changes resources.
- Prefer read-only commands and tools when exploring.
- Put resources you create in a [project](https://docs.digitalocean.com/products/projects/index.html.md) the user names, or tag them, so the user can find and clean them up later.
- Prefer OAuth sign-in over API tokens. Never write tokens into files that are committed to Git.

## Completion

Report only verified state:

```text
DigitalOcean agent setup is ready
doctl: <version>, signed in as <email>, context <name>
MCP: <connected|blocked: reason>, https://mcp.digitalocean.com/mcp
MCP config: <path|managed by client>
Docs check: <docs/docs-search succeeded|blocked: reason>
Account check: <accounts/account-get-information succeeded|not requested>
Reload: <not needed|completed>
```

Sources:

- https://docs.digitalocean.com/reference/doctl/how-to/install/
- https://docs.digitalocean.com/reference/mcp/
- https://docs.digitalocean.com/reference/mcp/configure-mcp/
- https://github.com/digitalocean-labs/mcp-digitalocean
- https://docs.digitalocean.com/llms.txt
