dbaas-mcp
v2.1.0
Published
MCP server for dbaas.dev — provision and manage PostgreSQL databases from Claude, Cursor, and any MCP client
Maintainers
Readme
dbaas-mcp
MCP server for dbaas.dev — manage PostgreSQL databases directly from Claude Desktop, Cursor, Continue, and any MCP client.
No account needed for ephemeral databases. Just run it and start building.
Quick start
npx -y dbaas-mcpThat's it. Claude now has 3 tools to spin up throwaway PostgreSQL databases.
For persistent databases (survive restarts, backups, metrics), generate an API key at dbaas.dev/account/api-keys — all 14 tools unlock automatically.
Claude Desktop
Edit ~/Library/Application Support/Claude/claude_desktop_config.json (macOS) or %APPDATA%\Claude\claude_desktop_config.json (Windows):
Ephemeral only (no account needed):
{
"mcpServers": {
"dbaas": {
"command": "npx",
"args": ["-y", "dbaas-mcp"]
}
}
}With persistent database access:
{
"mcpServers": {
"dbaas": {
"command": "npx",
"args": ["-y", "dbaas-mcp"],
"env": {
"DBAAS_API_KEY": "dbaas_live_your_key_here"
}
}
}
}Cursor
In .cursor/mcp.json at your project root or ~/.cursor/mcp.json globally:
{
"mcpServers": {
"dbaas": {
"command": "npx",
"args": ["-y", "dbaas-mcp"],
"env": {
"DBAAS_API_KEY": "dbaas_live_your_key_here"
}
}
}
}Continue (VS Code)
In ~/.continue/config.json:
{
"experimental": {
"modelContextProtocolServers": [
{
"transport": {
"type": "stdio",
"command": "npx",
"args": ["-y", "dbaas-mcp"],
"env": {
"DBAAS_API_KEY": "dbaas_live_your_key_here"
}
}
}
]
}
}Tools
Ephemeral (no API key needed)
| Tool | Description |
|---|---|
| provision_ephemeral_postgres | Spin up a throwaway PostgreSQL DB (1–60 min TTL, default 60). Waits until ready and returns a connection string. |
| get_ephemeral_database | Check status + get connection string for an ephemeral DB. |
| exec_sql_ephemeral | Run SQL on an ephemeral DB without a client connection. |
Persistent (requires DBAAS_API_KEY)
| Tool | Description |
|---|---|
| list_databases | List all your persistent databases with status. |
| create_database | Provision a new persistent PostgreSQL database. |
| get_database_info | Get connection string and address for a persistent DB. |
| exec_sql | Run SQL on a persistent DB (destructive statements require confirmation). |
| stop_database | Pause a database (data preserved). |
| start_database | Resume a paused database. |
| delete_database | Permanently delete a database (requires confirmed=true). |
| list_backups | List available pg_dump backups (7-day retention). |
| trigger_backup | Request an immediate backup. |
| get_database_metrics | CPU, memory, connections, storage stats. |
| describe_schema | Table + column + index introspection — call before writing queries. |
Example prompts
Ephemeral (no setup):
"Spin up a throwaway Postgres DB, create a users table, insert 5 users, and show me the results."
"Provision an ephemeral database and test whether my schema migration works."
Persistent (with API key):
"Create a PostgreSQL database for my project, set up the users and posts tables, and show me the schema."
"List my databases, show the metrics for the running one, and trigger a backup."
"Describe the schema of my database, then query the top 10 users by created_at."
Environment variables
| Variable | Default | Description |
|---|---|---|
| DBAAS_API_KEY | (none) | API key from dbaas.dev/account/api-keys. Enables persistent database tools. |
| DBAAS_API_URL | https://api.dbaas.dev/v1 | Override API base URL (for self-hosted or local dev). |
Generate an API key
- Sign in at dbaas.dev
- Go to Account → API Keys
- Click New API Key, give it a name (e.g. "Claude Desktop")
- Copy the key — shown once only
- Set
DBAAS_API_KEY=dbaas_live_…in your MCP config
API reference
Full OpenAPI spec: api.dbaas.dev/openapi.yaml
