MCPDBWizard

Documentation  ·  MariaDB

MCPDBWizard for MariaDB

MCPDBWizard for MariaDB is the same product pointed at MariaDB. You select the tables, views, procedures, functions, package members, sequences and SQL statements an agent may use, and it generates an MCP server for exactly those. An object you did not select has no tool, no method and no class, and every call binds its values rather than passing SQL text. The console, the proxy, accounts, tokens, the access grid, audit and Context Pinning all work as they do on Oracle.

It is a separate image, because a MariaDB image carries no Oracle driver at all:

docker pull ghcr.io/srmadscience/mcpdbwizard-mariadb:2.0.36
docker pull docker.io/srmadscience/mcpdbwizard-mariadb:2.0.36

Both registries hold the same multi-arch image (linux/amd64, linux/arm64). One licence covers every product: an MCPDBWizard licence unlocks the Oracle, Postgres and MariaDB images alike. See Commercials.

To get it running, follow Quickstart: MariaDB. To try it on a schema made for the purpose, the MariaDB hotel demo has one, with a customer-facing config that uses Context Pinning.

Supported versions

MariaDB 11.4, 11.8, 12.3 and 13.x. Each release is tested against all four, and against 11.4 and 13.0 with lower_case_table_names=1 as well as 0.

10.11 is not supported. There, a login that did not create a routine cannot read its source, and the source is the only place MariaDB records a ROW parameter’s fields or a package’s members.

Two features need a newer server: cursor outputs need 12.3 or later, and VECTOR needs 11.8 or later.

What becomes a tool

ObjectToolsNotes
Tableget_by_pk, insert, update, delete, plus a lookup per unique key, index and foreign keyNeeds a primary key, as on Oracle, so a view gets none. Generated columns are never written. A SPATIAL, FULLTEXT or VECTOR index gets no lookup, because equality cannot use it.
Procedure or functionOne tool per routineIN, OUT and INOUT parameters, and ROW / ROW TYPE OF parameters as JSON objects.
Member of a packageOne tool per memberOracle-mode packages, and default-mode packages on 11.4 and later.
Procedure that returns result setsIts tool returns them as result_setsEach with its columns and at most 10,000 rows, flagged truncated past that.
SYS_REFCURSOR output (12.3+)Returned as rowsUp to 64 columns. Column types are known for a SELECT * over a table; otherwise a column crosses as text, or as base64 when it is not valid UTF-8.
Sequencenextval
Your own SQL statementOne tool per statementDescribed by the server when the server is generated, so a bad statement is caught then.

How the types cross

MariaDBOver MCP
int and the other integer types, decimal, float, double, bit, yearnumber
tinyint(1), booleannumber (MariaDB stores a boolean as a tinyint)
char, varchar, text, enum, setstring
date, datetime, timestampstring, in MariaDB’s own text form
timestring: it is a duration, and can exceed 24 hours
binary, varbinary, blobbase64 string
jsonJSON text: a string holding the document, not an object
geometry, point, polygon and the other spatial typesEWKT string: SRID=4326;POINT(1 2)
vector(n) (11.8+)array of numbers
ROW(...), ROW TYPE OFJSON object, keyed by field name

A geometry is checked as EWKT on the way in, and text that is not EWKT is refused rather than becoming NULL, which is what MariaDB’s own ST_GeomFromText would do with it. A vector’s dimensions are 32-bit floats, so a value sent with more precision comes back rounded.

What is different from Oracle

Bringing Oracle code across

MariaDB’s Oracle mode (sql_mode=ORACLE) runs a good deal of PL/SQL, and MCPDBWizard reads its packages. These are the differences that compile and then surprise you:

Not supported

See also Known issues on MariaDB.