MCP server for SQL on PostgreSQL, SQL Server, MySQL, and Oracle.
339
MCP (Model Context Protocol) server for running SQL against multiple databases via ADO.NET.
Supported databases: PostgreSQL · SQL Server · MySQL / MariaDB · Oracle
SELECT is allowed; set DBMCP_UNSAFE=true to permit INSERT/UPDATE/DELETE/DDLdocker run -i --rm \
--add-host=host.docker.internal:host-gateway \
-e DBMCP_CONFIG_DIR=/config \
-e DBMCP_UNSAFE=false \
-v /host/path/to/configs:/config \
gotlib12345/dbmcp:latest
Mount a host directory to /config — without a volume, saved connection aliases are lost when the container stops.
{
"mcpServers": {
"dbmcp": {
"command": "docker",
"args": [
"run", "-i", "--rm",
"--add-host=host.docker.internal:host-gateway",
"-e", "DBMCP_CONFIG_DIR=/config",
"-e", "DBMCP_UNSAFE=false",
"-v", "C:\\path\\to\\configs:/config",
"gotlib12345/dbmcp:latest"
]
}
}
}
| Variable | Required | Description |
|---|---|---|
DBMCP_CONFIG_DIR | Yes | Directory for persisted connection configs (use /config with a volume) |
DBMCP_UNSAFE | No | true / 1 / yes — allow write/DDL SQL. Default: read-only SELECT only |
DBMCP_LOCALHOST_HOST | No | Replace localhost / 127.0.0.1 in connection strings (default in Docker: host.docker.internal) |
latest — newest buildvX.Y.Z — versioned releasesContent type
Image
Digest
sha256:74f68f41e…
Size
54.7 MB
Last updated
about 2 months ago
docker pull gotlib12345/dbmcp