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.

1. Your AI client
Claude · ChatGPT · Cursor

Sends natural-language requests. Speaks MCP to discover and call tools.

2. MCP server
dbaas.dev/v1/mcp

Translates MCP tool calls into HTTPS requests to the dbaas.dev REST API. A protocol adapter, nothing more.

3. The provider
dbaas.dev (this site)

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 pod
Why this MCP can create databases: most MCP servers only read data from a system they don't own (a Notion workspace, a Postgres you already have). This one is wired into a managed-DB provider, so its tools include provision, backup, and delete—operations a generic MCP can't perform.

Try it in 30 seconds

no API key

Three curl calls against the live MCP server. Provisions a 5-minute throwaway database, creates a table, queries it. Auto-deletes itself.

  1. 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. 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. 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.

🌐
NEW — no install

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.

Server URL
https://api.dbaas.dev/v1/mcp
Claude.ai (web)
  1. Open Settings → Connectors → Add custom connector.
  2. Paste https://api.dbaas.dev/v1/mcp as the URL.
  3. Choose Bearer token auth and paste your API key. Skip auth to use ephemeral-only tools.
  4. 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)
  1. In ChatGPT, open Settings → Connectors → Custom MCP.
  2. URL: https://api.dbaas.dev/v1/mcp.
  3. 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).

Or run locally

Ephemeral mode — zero config

3 tools available. Spin up throwaway Postgres instances. No account, no API key.

npx -y dbaas-mcp
🔐

Authenticated mode — full power

14 tools. Persistent databases, backups, metrics, schema inspection. Generate an API key →

DBAAS_API_KEY=dbaas_live_… npx -y dbaas-mcp

Install — Claude Desktop

Edit ~/Library/Application Support/Claude/claude_desktop_config.json (macOS) or %APPDATA%\Claude\claude_desktop_config.json (Windows):

Ephemeral only (no key needed)
{
  "mcpServers": {
    "dbaas": {
      "command": "npx",
      "args": ["-y", "dbaas-mcp"]
    }
  }
}
With persistent databases
{
  "mcpServers": {
    "dbaas": {
      "command": "npx",
      "args": ["-y", "dbaas-mcp"],
      "env": {
        "DBAAS_API_KEY": "dbaas_live_your_key_here"
      }
    }
  }
}

Install — Cursor

Open Cursor Settings → MCPAdd 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

ToolAuthDescription
provision_ephemeral_postgresNoneSpin up a throwaway Postgres (auto-deletes after TTL)
get_ephemeral_databaseNonePoll status and get connection details for an ephemeral DB
exec_sql_ephemeralNoneRun SQL against an ephemeral database
list_databasesAPI keyList all your persistent databases
create_databaseAPI keyProvision a new persistent Postgres database
get_database_infoAPI keyGet host, port, credentials for a database
exec_sqlAPI keyRun SQL against a persistent database (with safety confirmation for destructive statements)
describe_schemaAPI keyList tables with row counts, or inspect columns + indexes for a specific table
stop_databaseAPI keyStop a running database (saves compute)
start_databaseAPI keyStart a stopped database
delete_databaseAPI keyPermanently delete a database (requires confirmation param)
list_backupsAPI keyList all backups for a database
trigger_backupAPI keyTrigger an immediate backup
restore_backupAPI keyRestore a backup over the live database (overwrites data)
get_database_metricsAPI keyGet CPU, memory, storage metrics for a database

Example prompts

"Spin up a throwaway Postgres, create a users table, insert 3 rows, and query them back."
"Show me all my databases and their current status."
"Create a persistent Postgres database called 'staging'."
"Describe the schema of my production database."
"Run a query on my staging database: SELECT count(*) FROM orders WHERE status = 'pending'."
"Trigger a backup of my production database."
"Show CPU and memory usage for all my databases."
"Stop my staging database to save compute overnight."

Ready to use persistent databases?

Generate an API key in 10 seconds — no credit card required.

Generate API key →