Sakila MCP
v0.2.0Security-first MySQL MCP server: read-only by default, with a fail-closed SQL classifier.
These tools were reported by the server itself during our smoke test (tools/list), not copied from the README.
server_info
Returns the MySQL version, release line, uptime, session time zone and key global settings (buffer pool, binlog/GTID, read_only, sql_mode, charset). Use it first to learn what kind of server you are talking to.
list_databases
Returns the databases you may query, each flagged if it is a system schema. Call it before list_tables when you do not know the database name.
list_tables
Returns the tables and views in one database with engine, approximate row count and data/index size (statistics may be cached, not exact). Use it to find candidate tables before describe_table.
| Parameter | Type | Description |
|---|---|---|
database * | string | Database (schema) name, exact case. |
describe_table
Returns one table's or view's columns (type, nullability, default, collation), indexes (key parts in order, uniqueness, cardinality), foreign keys, engine and approximate row count. Use it before writing a query against the table.
| Parameter | Type | Description |
|---|---|---|
database * | string | Database (schema) name, exact case. |
table * | string | Table or view name, exact case. |
run_query
Runs one read-only statement (SELECT, WITH, TABLE, VALUES, SHOW, DESCRIBE or EXPLAIN) and returns columns and rows, at most 200 rows with truncated=true if there were more. Use ? placeholders with params for values. Refused statements return refused=true with a reason and a suggestion.
| Parameter | Type | Description |
|---|---|---|
sql * | string | One SQL statement. |
database | Default database for unqualified table names. Omit if every name is qualified as db.table. | |
params | Values for ? placeholders, in order. Bound by the server, never spliced into the SQL. SELECT, TABLE and VALUES only. |
explain_query
Returns the execution plan for one SELECT, TABLE or VALUES statement without running it: the EXPLAIN FORMAT=JSON document plus a summary (full table scans, filesort, temporary table, max estimated rows), or the TREE text. Use it before running a query that may be slow.
| Parameter | Type | Description |
|---|---|---|
sql * | string | One SQL statement. |
database | Default database for unqualified table names. Omit if every name is qualified as db.table. | |
format | string |
list_procedures
Returns the stored procedures in one database: parameters (IN, OUT, INOUT and types), declared data access, and whether call_procedure may call each one, with the reason if not. Use it before call_procedure.
| Parameter | Type | Description |
|---|---|---|
database * | string | Database (schema) name, exact case. |
call_procedure
Calls one stored procedure in a read-only transaction and returns its result sets (at most 200 rows each) and OUT/INOUT values. Pass one value per IN and INOUT parameter; get the signature from list_procedures. Refused unless the operator enabled procedures, and for procedures that write.
| Parameter | Type | Description |
|---|---|---|
database * | string | Database (schema) name, exact case. |
procedure * | string | Procedure name, as list_procedures gives it. |
args | One value per IN and INOUT parameter, in declaration order. OUT parameters take no value. Bound by the server, never spliced into SQL. |