Docker
Run dbmcp from the multi-arch Docker image
No Rust toolchain or compilation needed.
docker pull ghcr.io/haymon-ai/dbmcp:lateststdio mode (for Claude Desktop, Cursor, and other MCP clients):
docker run -i --rm \
-e DBMCP_DB_BACKEND=postgres \
-e DBMCP_DB_HOST=host.docker.internal \
-e DBMCP_DB_USER=postgres \
ghcr.io/haymon-ai/dbmcpHTTP mode (for web clients and remote access):
docker run --rm \
-e DBMCP_DB_BACKEND=postgres \
-e DBMCP_DB_HOST=host.docker.internal \
-e DBMCP_DB_USER=postgres \
-e DBMCP_TRANSPORT=http \
-e DBMCP_HTTP_HOST=0.0.0.0 \
-e DBMCP_HTTP_AUTH_TOKEN=change-me \
-p 9001:9001 \
ghcr.io/haymon-ai/dbmcpBinding 0.0.0.0 requires DBMCP_HTTP_AUTH_TOKEN; clients must send Authorization: Bearer <token>. Use a long random value (e.g. openssl rand -hex 32). The image has no shell or curl, so check health from the orchestrator with HTTP probes against /healthz and /readyz rather than a Docker HEALTHCHECK.
SQLite with a mounted volume:
docker run -i --rm \
-e DBMCP_DB_BACKEND=sqlite \
-e DBMCP_DB_NAME=/data/my.db \
-v /path/to/local/db:/data \
ghcr.io/haymon-ai/dbmcpTo redact personal data in query results, add -e DBMCP_PII_ENABLE=true to any of these commands (see Data Privacy).
Images are available for linux/amd64 and linux/arm64. A specific version can be pinned with ghcr.io/haymon-ai/dbmcp:<version>.
To run the image on Kubernetes, use the Helm chart.
Configuration in the container
The image has no built-in config file and sets no DBMCP_CONFIG_FILE. Choose one of:
Environment variables — pass DBMCP_* with -e:
docker run -i --rm \
-e DBMCP_DB_BACKEND=postgres -e DBMCP_DB_HOST=host.docker.internal \
-e DBMCP_DB_USER=postgres -e DBMCP_DB_PASSWORD -e DBMCP_DB_NAME=myapp \
ghcr.io/haymon-ai/dbmcpDocker's env file — Docker's own --env-file, given before the image name, loads the variables into the container's environment; it is not dbmcp's --env-file. Docker parses this file itself: it has no quoting or ${} expansion, so keep values plain.
docker run -i --rm --env-file ./dbmcp.env ghcr.io/haymon-ai/dbmcpMounted config file — mount the directory read-only and name the file with DBMCP_CONFIG_FILE (or pass --config-file after the image name). Relative paths inside the file resolve against the mounted directory, so keep certificates and keys beside it. To use a dbmcp env file, mount the env file too and set DBMCP_ENV_FILE.
docker run -i --rm \
-v "$PWD/config:/config:ro" \
-e DBMCP_CONFIG_FILE=/config/dbmcp.yaml \
-e DB_PASSWORD \
ghcr.io/haymon-ai/dbmcpAll paths in DBMCP_CONFIG_FILE, DBMCP_ENV_FILE, and the files themselves are container paths.