
mcpdbwizard-mariadb
io.github.srmadscience/mcpdbwizard-mariadb
A MariaDB MCP server built from the procedures, tables and statements you select. No run-sql tool
Documentation
MCPDBWizard for MariaDB
MCPDBWizard for MariaDB generates MCP servers from a MariaDB schema. You select the tables, views, functions, procedures, Oracle-mode package members, sequences and SQL statements to expose, and it generates a server for exactly those. An agent then reaches the database only through typed tools. Nothing you didn't select has any code generated for it, and every call binds values rather than passing SQL text.
It ships as a Docker image. The web console runs inside it: Design chooses what to expose, and Runtime generates, starts and fronts the servers over HTTP.
This repository holds no source code. It exists for the release notes and as a public home for the image.
Get the image
docker pull ghcr.io/srmadscience/mcpdbwizard-mariadb:latest
docker pull docker.io/srmadscience/mcpdbwizard-mariadb:latest
Both registries hold the same multi-arch image (linux/amd64, linux/arm64). Pin a version
tag in anything that matters. latest moves, and docker run never refreshes an image the
machine already has.
Run it
docker run -d --name mcpdbwizard-mariadb -p 8080:8080 -v mcpdbwizard-data:/data \
-e MCPDBWIZARD_DB_HOST=db.example.com \
-e MCPDBWIZARD_DB_NAME=appdb \
-e MCPDBWIZARD_DB_USER=appuser \
-e DB_PASS_FILE=/run/secrets/db \
-e ADMIN_INITIAL_PASSWORD='choose-a-long-one' \
ghcr.io/srmadscience/mcpdbwizard-mariadb:latest
Open http://localhost:8080, log in as admin with ADMIN_INITIAL_PASSWORD, and set a new
password when asked.
| Setting | Meaning |
|---|---|
MCPDBWIZARD_DB_HOST | The database host |
MCPDBWIZARD_DB_PORT | Its port; 3306 if unset |
MCPDBWIZARD_DB_NAME | The database. Its objects are the ones listed as your own |
MCPDBWIZARD_DB_USER | The login. It need not share the database's name |
MCPDBWIZARD_DB_OTHER_USER | Optional: more databases to list, as a LIKE pattern (app%) |
DB_PASS_FILE or DB_PASS | The login's password: a file (preferred) or the value; not both |
ADMIN_INITIAL_PASSWORD | The console's first admin password |
/data holds the configs and the generated servers. Keep it on a volume.
The login needs these grants on each database it reads:
GRANT SELECT, EXECUTE, SHOW CREATE ROUTINE ON appdb.* TO appuser;
SHOW CREATE ROUTINE is the one that is easy to miss. Without it, MCPDBWizard cannot read a
routine's ROW parameter fields, whether a function is an aggregate, or (on 11.8) its parameter
defaults. A sequence's NEXTVAL also needs INSERT on that sequence.
Supported versions
MariaDB 11.4, 11.8, 12.3 and 13.x, each tested with lower_case_table_names 0, and 11.4 and 13.0
with 1 as well. MariaDB 10.11 is not supported: a login that did not create a routine cannot read
its source there, so its parameters cannot be described.
Geometry crosses as EWKT (SRID=4326;POINT(1 2)), VECTOR (11.8 and later) as an array of
numbers, and JSON as its text. Cursor outputs need 12.3 or later. The MCP server is the way in:
the SOAP service layer and the JSON / JSON-RPC connectors of the Oracle product are not available
for MariaDB.
Documentation and licence
Documentation is at https://mcpdbwizard.com/docs/. The image is proprietary software from ATB Consultancy Services Ltd, and an MCPDBWizard licence covers the Oracle, Postgres and MariaDB products alike. See https://mcpdbwizard.com for terms.
Reporting a problem
To report a suspected security problem, use this repository's Security tab →
Report a vulnerability, which keeps the report private. Please don't open a public issue for
it. For anything else, open an issue. Include the image tag, the MariaDB version
(select version()), and a minimal config or steps that reproduce it.
ghcr.io/srmadscience/mcpdbwizard-mariadb:2.0.36docker pull ghcr.io/srmadscience/mcpdbwizard-mariadb:2.0.36:undefined