Create Database
Follow the mcp-patterns skill (${CLAUDE_PLUGIN_ROOT}/skills/mcp-patterns/SKILL.md) for the database tool pattern and usage notes; read it before the first call.
Create and deploy a database instance in a Dokploy project.
Arguments
Format: <name> --project <project> --type <postgres|mysql|mariadb|mongo|redis|libsql> [--password <pass>]
- name: Database name (required)
- --project: Project name or ID (required)
- --type: Database type — postgres, mysql, mariadb, mongo, redis, libsql (required)
- --password: Database password (generated if omitted — the API requires one)
Parse from "$ARGUMENTS".
Process
Resolve project (same as create-app command), then resolve the target environment:
project-one { projectId }→environments[](defaultproduction); orenvironment-byProjectId { projectId }. If several, ask the user.Create database using the type-specific MCP tool:
- postgres:
postgres-create - mysql:
mysql-create - mariadb:
mariadb-create - mongo:
mongo-create - redis:
redis-create - libsql:
libsql-create
Pass
name,environmentId(NOT projectId), plus the per-type REQUIRED fields:- postgres/mysql/mariadb:
databaseName,databaseUser,databasePassword - mongo:
databaseUser,databasePassword - redis:
databasePassword - libsql:
databaseUser,databasePassword, plus its extra required fields (sqldNode,enableNamespaces, …) — seelibsql-createin the full index for defaults
- postgres:
Deploy database using
{type}-deploywith the created database ID.Display result: Show database ID, name, type, status. Include internal connection details (host, port, credentials) and suggest using
{type}-saveExternalPortif external access is needed.
Example Usage
/dokploy-dev:create-db "main-db" --project my-saas --type postgres
/dokploy-dev:create-db "cache" --project my-saas --type redis
/dokploy-dev:create-db "analytics" --project data --type mongo --password "secure123"