MCP Server
Let Claude, ChatGPT, Cursor, and other MCP-aware AI assistants provision PostgreSQL databases and run SQL on your behalf — through the dbaas.dev MCP server.
How this works
MCP (Model Context Protocol) is just the wire format. The actual database work is done by dbaas.dev — a managed PostgreSQL provider. The MCP server is a thin bridge between the two.
Sends natural-language requests. Speaks MCP to discover and call tools.
Translates MCP tool calls into HTTPS requests to the dbaas.dev REST API. A protocol adapter, nothing more.
Provisions Postgres on Kubernetes, runs SQL, stores backups. Owns the actual databases.
AI client MCP server dbaas.dev API PostgreSQL pod
───────── ────────── ───────────── ──────────────
"create a postgres" ─→ tools/call ─→ POST /v1/services ─→ kubectl apply
create_database /create Deployment+Svc
"SELECT * FROM x" ─→ tools/call ─→ POST /v1/resources ─→ pgx.Query
exec_sql /{id}/sql on the podTry it in 30 seconds
no API keyThree curl calls against the live MCP server. Provisions a 5-minute throwaway database, creates a table, queries it. Auto-deletes itself.
- 1 · Provision a database
ID=$(curl -s -X POST https://api.dbaas.dev/v1/mcp \ -H 'Content-Type: application/json' \ -d '{"jsonrpc":"2.0","id":1,"method":"tools/call","params":{ "name":"provision_ephemeral_postgres", "arguments":{"ttl":5}}}' \ | grep -oE '"id":"[^"]+"' | head -1 | cut -d'"' -f4) echo "DB id: $ID" - 2 · Wait ~30s, then create a table and insert a row
sleep 30 curl -s -X POST https://api.dbaas.dev/v1/mcp \ -H 'Content-Type: application/json' \ -d "{\"jsonrpc\":\"2.0\",\"id\":2,\"method\":\"tools/call\",\"params\":{ \"name\":\"exec_sql_ephemeral\", \"arguments\":{ \"id\":\"$ID\", \"sql\":\"CREATE TABLE notes(id serial PRIMARY KEY, body text); INSERT INTO notes(body) VALUES ('hello from MCP')\"}}}" - 3 · Query it back
curl -s -X POST https://api.dbaas.dev/v1/mcp \ -H 'Content-Type: application/json' \ -d "{\"jsonrpc\":\"2.0\",\"id\":3,\"method\":\"tools/call\",\"params\":{ \"name\":\"exec_sql_ephemeral\", \"arguments\":{\"id\":\"$ID\",\"sql\":\"SELECT * FROM notes\"}}}"You should see a row with
body: "hello from MCP". The database self-destructs in 5 minutes — no cleanup needed.
Remote MCP — Claude.ai & ChatGPT
One URL. No npx, no Node, no local config files. Works with claude.ai connectors, Claude Code /mcp, ChatGPT custom connectors, and any client that speaks MCP Streamable HTTP.
https://api.dbaas.dev/v1/mcpClaude.ai (web)
- Open Settings → Connectors → Add custom connector.
- Paste
https://api.dbaas.dev/v1/mcpas the URL. - Choose Bearer token auth and paste your API key. Skip auth to use ephemeral-only tools.
- Start a chat — Claude can now provision DBs and run SQL.
Claude Code (CLI)
claude mcp add --transport http dbaas https://api.dbaas.dev/v1/mcp \ --header "Authorization: Bearer dbaas_live_your_key_here"
ChatGPT (custom connector)
- In ChatGPT, open Settings → Connectors → Custom MCP.
- URL:
https://api.dbaas.dev/v1/mcp. - Auth header:
Authorization: Bearer dbaas_live_…
Manual / curl test
curl -X POST https://api.dbaas.dev/v1/mcp \
-H 'Content-Type: application/json' \
-H 'Authorization: Bearer dbaas_live_your_key_here' \
-d '{"jsonrpc":"2.0","id":1,"method":"tools/list"}'Transport: MCP Streamable HTTP (spec 2025-03-26) · JSON-RPC 2.0 · 15 tools (3 ephemeral + 12 persistent).
Ephemeral mode — zero config
3 tools available. Spin up throwaway Postgres instances. No account, no API key.
npx -y dbaas-mcpAuthenticated mode — full power
14 tools. Persistent databases, backups, metrics, schema inspection. Generate an API key →
DBAAS_API_KEY=dbaas_live_… npx -y dbaas-mcpInstall — Claude Desktop
Edit ~/Library/Application Support/Claude/claude_desktop_config.json (macOS) or %APPDATA%\Claude\claude_desktop_config.json (Windows):
{
"mcpServers": {
"dbaas": {
"command": "npx",
"args": ["-y", "dbaas-mcp"]
}
}
}{
"mcpServers": {
"dbaas": {
"command": "npx",
"args": ["-y", "dbaas-mcp"],
"env": {
"DBAAS_API_KEY": "dbaas_live_your_key_here"
}
}
}
}Install — Cursor
Open Cursor Settings → MCP → Add new global MCP server and paste:
{
"mcpServers": {
"dbaas": {
"command": "npx",
"args": ["-y", "dbaas-mcp"],
"env": {
"DBAAS_API_KEY": "dbaas_live_your_key_here"
}
}
}
}Install — Continue (VS Code / JetBrains)
Add to ~/.continue/config.json under "mcpServers" — same JSON as above.
Tool catalog
| Tool | Auth | Description |
|---|---|---|
provision_ephemeral_postgres | None | Spin up a throwaway Postgres (auto-deletes after TTL) |
get_ephemeral_database | None | Poll status and get connection details for an ephemeral DB |
exec_sql_ephemeral | None | Run SQL against an ephemeral database |
list_databases | API key | List all your persistent databases |
create_database | API key | Provision a new persistent Postgres database |
get_database_info | API key | Get host, port, credentials for a database |
exec_sql | API key | Run SQL against a persistent database (with safety confirmation for destructive statements) |
describe_schema | API key | List tables with row counts, or inspect columns + indexes for a specific table |
stop_database | API key | Stop a running database (saves compute) |
start_database | API key | Start a stopped database |
delete_database | API key | Permanently delete a database (requires confirmation param) |
list_backups | API key | List all backups for a database |
trigger_backup | API key | Trigger an immediate backup |
restore_backup | API key | Restore a backup over the live database (overwrites data) |
get_database_metrics | API key | Get CPU, memory, storage metrics for a database |
Example prompts
Ready to use persistent databases?
Generate an API key in 10 seconds — no credit card required.