Installation
Install dbmcp via Docker, prebuilt binary, or from source
Database MCP is distributed as a single binary with no runtime dependencies. Choose the installation method that works best for your setup.
Quick Install (recommended)
macOS, Linux, WSL:
curl -fsSL https://dbmcp.haymon.ai/install.sh | bashOr with wget:
wget -qO- https://dbmcp.haymon.ai/install.sh | bashWindows (PowerShell):
irm https://dbmcp.haymon.ai/install.ps1 | iexWindows (CMD):
curl -fsSL https://dbmcp.haymon.ai/install.cmd -o install.cmd && install.cmd && del install.cmdThis detects your platform, downloads the correct binary, and installs it. Re-run the same command to upgrade to the latest version.
To install to a custom directory:
INSTALL_DIR=/opt/bin curl -fsSL https://dbmcp.haymon.ai/install.sh | bash$env:INSTALL_DIR = "C:\tools\dbmcp"; irm https://dbmcp.haymon.ai/install.ps1 | iexset INSTALL_DIR=C:\tools\dbmcp && curl -fsSL https://dbmcp.haymon.ai/install.cmd -o install.cmd && install.cmd && del install.cmdPrebuilt Binaries
Download the latest release from GitHub.
Linux
x86_64 (Intel/AMD):
curl -LO https://github.com/haymon-ai/dbmcp/releases/latest/download/dbmcp-x86_64-unknown-linux-gnu.tar.gz
tar xzf dbmcp-x86_64-unknown-linux-gnu.tar.gz
sudo mv dbmcp /usr/local/bin/aarch64 (ARM):
curl -LO https://github.com/haymon-ai/dbmcp/releases/latest/download/dbmcp-aarch64-unknown-linux-gnu.tar.gz
tar xzf dbmcp-aarch64-unknown-linux-gnu.tar.gz
sudo mv dbmcp /usr/local/bin/macOS
Apple Silicon (M1/M2/M3/M4):
curl -LO https://github.com/haymon-ai/dbmcp/releases/latest/download/dbmcp-aarch64-apple-darwin.tar.gz
tar xzf dbmcp-aarch64-apple-darwin.tar.gz
sudo mv dbmcp /usr/local/bin/Intel:
curl -LO https://github.com/haymon-ai/dbmcp/releases/latest/download/dbmcp-x86_64-apple-darwin.tar.gz
tar xzf dbmcp-x86_64-apple-darwin.tar.gz
sudo mv dbmcp /usr/local/bin/Windows
x86_64:
Download the latest release:
Invoke-WebRequest -Uri https://github.com/haymon-ai/dbmcp/releases/latest/download/dbmcp-x86_64-pc-windows-msvc.zip -OutFile dbmcp.zip
Expand-Archive dbmcp.zip -DestinationPath .Move dbmcp.exe to a directory on your PATH, or run it directly from the extracted location.
Verify the installation:
dbmcp.exe --helpFor older versions or other assets, see the GitHub Releases page.
Verify the installation (Linux/macOS):
dbmcp --helpDocker
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 DB_BACKEND=postgres \
-e DB_HOST=host.docker.internal \
-e DB_USER=postgres \
ghcr.io/haymon-ai/dbmcpHTTP mode (for web clients and remote access):
docker run --rm \
-e DB_BACKEND=postgres \
-e DB_HOST=host.docker.internal \
-e DB_USER=postgres \
-p 9001:9001 \
ghcr.io/haymon-ai/dbmcp http --host 0.0.0.0SQLite with a mounted volume:
docker run -i --rm \
-e DB_BACKEND=sqlite \
-e DB_NAME=/data/my.db \
-v /path/to/local/db:/data \
ghcr.io/haymon-ai/dbmcpImages are available for linux/amd64 and linux/arm64. A specific version can be pinned with ghcr.io/haymon-ai/dbmcp:<version>.
Package Managers
Cargo
If you have the Rust toolchain installed:
cargo install dbmcpThis builds from source and installs the binary to ~/.cargo/bin/.
Verify the installation:
dbmcp --helpBuild from Source
Prerequisites
- Git
- Rust toolchain (edition 2024, requires Rust 1.85+)
Build
git clone https://github.com/haymon-ai/dbmcp.git
cd dbmcp
cargo build --releaseCopy the binary to a directory on your PATH:
sudo cp target/release/dbmcp /usr/local/bin/Verify the installation:
dbmcp --helpComparison
| Method | Ease of Install | Auto Updates | Version Flexibility | Prerequisites | Platform Coverage |
|---|---|---|---|---|---|
| Quick Install | Single command | Re-run to upgrade | Latest release | curl/wget or PowerShell | macOS, Linux, WSL, Windows |
| Docker | docker pull | Pull latest tag | Any release tag | Docker | Linux, macOS, Windows |
| Prebuilt Binary | Simple download | None | Any release | None | Linux, macOS, Windows |
| Cargo Install | One command | cargo install to update | Any published version | Rust toolchain | All platforms Rust supports |
| Build from Source | Multiple steps | Manual (git pull + rebuild) | Any commit/branch | Git + Rust toolchain | All platforms Rust supports |