Sakila MCP

v0.2.0
io.github.pantoniades/sakila-mcp Checked 2 days ago Published 8 days ago

Security-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.

ParameterTypeDescription
database *stringDatabase (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.

ParameterTypeDescription
database *stringDatabase (schema) name, exact case.
table *stringTable 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.

ParameterTypeDescription
sql *stringOne SQL statement.
databaseDefault database for unqualified table names. Omit if every name is qualified as db.table.
paramsValues 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.

ParameterTypeDescription
sql *stringOne SQL statement.
databaseDefault database for unqualified table names. Omit if every name is qualified as db.table.
formatstring

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.

ParameterTypeDescription
database *stringDatabase (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.

ParameterTypeDescription
database *stringDatabase (schema) name, exact case.
procedure *stringProcedure name, as list_procedures gives it.
argsOne value per IN and INOUT parameter, in declaration order. OUT parameters take no value. Bound by the server, never spliced into SQL.