By Amit Jotwani
Last week, we announced the new DigitalOcean MCP Server - a tool that connects Claude Desktop (or IDEs like Cursor, or Windsurf) to your DigitalOcean account so it can actually do things: deploy apps, fetch logs, restart services, and more.
In this post, we’ll walk through how to set it up with Claude Code - Anthropic’s terminal-based CLI. Claude Code runs locally in your terminal and has access to your current project folder, which makes it perfect for things like deploying apps with context using MCP servers.
Note: If you’re new to MCP and wondering what this all unlocks, check out our high-level intro: MCP 101: An Introduction to Model Context Protocol, and MCP Server in Python — Everything I Wish I’d Known on Day One.
We’ll set up the server using the default (local) scope, verify it’s working, and run our first natural language prompt. Let’s dive in.
The MCP server needs permission to interact with your DigitalOcean account. To do that, you’ll need a personal access token with App Platform access.
mcp-server-token
If you haven’t already installed Claude Code, follow the instructions here to set it up.
Once installed, confirm it’s working:
claude --help
You should see a list of Claude’s CLI commands:
Let’s add the DigitalOcean MCP server using the default scope—which is local
. This means the server will be available only to you inside your current folder (private to you in this project).
Run the following command (replace the token):
claude mcp add digitalocean-mcp-local \
-e DIGITALOCEAN_API_TOKEN=YOUR_DO_API_TOKEN \
-- npx "@digitalocean/mcp"
What’s happening here:
digitalocean-mcp-local
is the name you’re giving the server (you can name it anything)-e
sets an environment variable for the token--
separates Claude flags from the server commandnpx "@digitalocean/mcp"
runs the official server without needing a separate installYou can list your registered servers with:
claude mcp list
You should see digitalocean-mcp-local
listed.
To see its full configuration:
claude mcp get digitalocean-mcp-local
If you don’t see it, or if something went wrong, double-check your token and make sure Claude Code is installed correctly.
Now that everything is set up, run Claude:
claude
Then try a natural language request like:
List all my apps on DigitalOcean
or
Create a new app from this GitHub repo: https://github.com/do-community/do-one-click-deploy-flask
Claude will ask you to approve the tool call. Say yes, and watch it go to work.
You now have Claude Code wired up to your DigitalOcean account using the MCP server. You can:
Curious what else you can do with it? We walk through the full workflow—connecting Claude to DigitalOcean, building and deploying a React app, pulling logs, and more in this video:
The video shows how to do it in Cursor, but everything you see there works exactly the same in Claude Code. The MCP server and tool calls are identical.
For a complete list of tools and capabilities of the DigitalOcean MCP server, check out DigitalOcean MCP Server on GitHub.
Thanks for learning with the DigitalOcean Community. Check out our offerings for compute, storage, networking, and managed databases.
This textbox defaults to using Markdown to format your answer.
You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!
Get paid to write technical tutorials and select a tech-focused charity to receive a matching donation.
Full documentation for every DigitalOcean product.
The Wave has everything you need to know about building a business, from raising funding to marketing your product.
Stay up to date by signing up for DigitalOcean’s Infrastructure as a Newsletter.
New accounts only. By submitting your email you agree to our Privacy Policy
Scale up as you grow — whether you're running one virtual machine or ten thousand.
Sign up and get $200 in credit for your first 60 days with DigitalOcean.*
*This promotional offer applies to new accounts only.