
DigitalOcean Database
STDIOConnect AI-powered IDEs to DigitalOcean databases using API token authentication
Connect AI-powered IDEs to DigitalOcean databases using API token authentication
🌊 DigitalOcean • ⚡ TypeScript • 🐘 PostgreSQL • 🐬 MySQL
Connect AI-powered IDEs to your DigitalOcean databases with just an API token!
Compatible with: 🎯 Cursor AI • 🤖 Claude Desktop • 🌊 Windsurf • 💻 VS Code • ⚡ Zed • 🔧 Any MCP Client
GitHub badges (will display properly on GitHub):
This Model Context Protocol (MCP) server enables seamless integration between AI-powered development environments and your DigitalOcean managed databases. Works with Cursor AI, Claude Desktop, Windsurf, VS Code with AI extensions, and any other IDE that supports MCP. Instead of manually managing database credentials, simply use your DigitalOcean API token to automatically discover and connect to any of your database clusters.
Once connected, you can interact with your databases through natural language:
git clone https://github.com/oladejibidmus/DigitalOcean-Database-MCP-Server.git cd digitalocean-database-mcp
npm install
npm run build
Choose your development environment and follow the corresponding setup:
Ctrl+Shift+P
(or Cmd+Shift+P
on Mac) and search for "Cursor Settings"digitalocean-database
node
/absolute/path/to/digitalocean-database-mcp/dist/index.js
Alternatively, create a .cursor/mcp.json
file in your project directory:
{ "mcpServers": { "digitalocean-database": { "command": "node", "args": ["/absolute/path/to/digitalocean-database-mcp/dist/index.js"] } } }
claude_desktop_config.json
{ "mcpServers": { "digitalocean-database": { "command": "node", "args": ["/absolute/path/to/digitalocean-database-mcp/dist/index.js"] } } }
Ctrl+Shift+P
and search "Open Windsurf Settings"{ "mcpServers": { "digitalocean-database": { "command": "node", "args": ["/absolute/path/to/digitalocean-database-mcp/dist/index.js"] } } }
For GitHub Copilot Agent Mode (Built-in):
chat.mcp.enabled
.vscode/mcp.json
file to your workspace:{ "servers": { "digitalocean-database": { "type": "stdio", "command": "node", "args": ["/absolute/path/to/digitalocean-database-mcp/dist/index.js"] } } }
For Continue.dev Extension:
.continue/mcpServers/digitalocean-db.yaml
:name: DigitalOcean Database mcpServer: version: 0.0.1 schema: v1 mcpServers: - name: DigitalOcean DB command: node args: - "/absolute/path/to/digitalocean-database-mcp/dist/index.js"
{ "context_servers": { "digitalocean-database": { "source": "custom", "command": { "path": "node", "args": ["/absolute/path/to/digitalocean-database-mcp/dist/index.js"], "env": {} } } } }
For any other MCP-compatible client, use these standard parameters:
stdio
node
["/absolute/path/to/digitalocean-database-mcp/dist/index.js"]
DO_API_TOKEN
for pre-set authenticationAfter configuration:
Note: Replace /absolute/path/to/digitalocean-database-mcp
with the actual full path to your cloned repository.
In your AI assistant (Cursor, Claude Desktop, Windsurf, etc.), simply say:
Set my DigitalOcean API token: dop_v1_your_actual_token_here
Show me all my database clusters
Connect to my database cluster named "production-api"
Show me all tables in this database
Execute this query: SELECT COUNT(*) FROM users WHERE created_at > '2024-01-01'
Describe the structure of the orders table
set_api_token
- Set your DigitalOcean API tokenlist_database_clusters
- List all your database clustersconnect_by_name
- Connect to a cluster by nameexecute_query
- Run SQL queries with optional parameterslist_tables
- Show all tables in the databasedescribe_table
- Get detailed table schemaget_database_info
- Database version and cluster informationdisconnect_database
- Close current connectionconnect_database
- Connect with manual credentials if needed┌─────────────────┐ ┌─────────────────┐ ┌─────────────────┐
│ AI Assistant │◄──►│ MCP Server │◄──►│ DigitalOcean DB │
│ │ │ │ │ Clusters │
│ • Cursor AI │ │ • API Client │ │ • PostgreSQL │
│ • Claude Desktop│ │ • DB Connectors │ │ • MySQL │
│ • Windsurf │ │ • Query Engine │ │ • SSL Enabled │
│ • VS Code │ │ • Pool Manager │ │ • Auto-scaling │
│ • Any MCP Client│ │ │ │ │
└─────────────────┘ └─────────────────┘ └─────────────────┘
digitalocean-database-mcp/
├── src/
│ └── index.ts # Main MCP server implementation
├── dist/ # Compiled JavaScript output
├── package.json # Dependencies and scripts
├── tsconfig.json # TypeScript configuration
└── README.md # This file
# Development with hot reload npm run dev # Build for production npm run build # Start production server npm start
git checkout -b feature/new-feature
src/index.ts
"Invalid API token"
dop_v1_
prefix"Database cluster not found"
list_database_clusters
to see available clusters"SSL connection failed"
"MCP server not found"
node dist/index.js
"Server not responding"
"Connection timeout"
// Connect to your analytics database "Connect to my cluster named 'analytics-prod'" // Explore the data "Show me all tables and describe the events table" // Run analysis "SELECT DATE(created_at) as date, COUNT(*) as events FROM events WHERE created_at >= CURRENT_DATE - INTERVAL '30 days' GROUP BY DATE(created_at) ORDER BY date"
// Check current schema "List all tables and their row counts" // Create new table "CREATE TABLE blog_posts ( id SERIAL PRIMARY KEY, title VARCHAR(255) NOT NULL, content TEXT, author_id INTEGER, created_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP )" // Verify creation "Describe the blog_posts table"
We welcome contributions! Please see our contributing guidelines:
This project is licensed under the MIT License - see the LICENSE file for details.
Made with ❤️ for the AI-powered development community
GitHub star badge: https://github.com/oladejibidmus/DigitalOcean-Database-MCP-Server
Works with: 🎯 Cursor AI • 🤖 Claude Desktop • 🌊 Windsurf • 💻 VS Code • ⚡ Zed • 🔧 Any MCP Client