Scan your whole stack
From OX Research Newsroom
Latest version: v0.2.0
Sakila MCP was last scanned on 26 Nov 2026 at version 0.2.0. Risk score 0 of 100. No malicious behavior was detected.
| Version | Published | Status |
|---|---|---|
| 0.2.0 LATEST | 26 Nov 2026 | No rules fired |
| 0.1.2 | 18 Nov 2026 | No rules fired |
Findings for v0.2.0. The score is a capped sum of the weights of the rules that fired — not CVSS, not exploitability, and not a probability. It is not comparable across packages with different scan coverage.
The score describes 0.2.0; other versions have their own rules, not their own score.
The publisher’s own README, as collected from the registry.
sakila-mcp is an MCP server that lets an LLM agent inspect and query any MySQL database. It is built security first: read-only by default, with a fail-closed SQL classifier between the agent and the server, and anything beyond that is switched on by you, never by the agent.
sakila-mcp is a general-purpose MySQL MCP server for any MySQL database. It is named after Sakila, the MySQL dolphin mascot, and is not specific to the Sakila sample database.
Independent open-source project. Not affiliated with, sponsored by or endorsed by Oracle. MySQL is a trademark of Oracle and/or its affiliates.
Status: v0.2. What's described here works today. Expect the interface to change.
You need uv and a MySQL account that can only read (the grants are under Safety model).
cat > ~/.config/sakila-mcp.toml <<'EOF'
host = "db.example.internal"
user = "sakila_mcp"
password = "..."
database_allowlist = ["app_db"]
EOF
chmod 600 ~/.config/sakila-mcp.toml
claude mcp add sakila -- uvx sakila-mcp --config ~/.config/sakila-mcp.toml
Then ask "what's in app_db and how do orders relate to customers?" or "why is this query slow?". Any MCP client that speaks stdio works; see Use it.
LIMIT is ever added to a query.EXPLAIN FORMAT=JSON shapes.Eight tools. Seven work out of the box; call_procedure is off until you
allow it.
| Tool | Returns |
|---|---|
server_info |
MySQL version and release line (LTS / Innovation), uptime, session time zone, key globals (buffer pool, binlog format, GTID mode, read_only, sql_mode, charset), and the sakila-mcp version. |
list_databases |
Databases you're allowed to query, system schemas flagged. |
list_tables |
Tables and views in one database: engine, approximate rows, data and index size. |
describe_table |
Columns, indexes (key parts in order, uniqueness, cardinality), foreign keys, engine, row format, collation. |
run_query |
Columns and rows for one statement, capped at max_rows. Parameters via ? placeholders. |
explain_query |
EXPLAIN FORMAT=JSON plus a summary (full table scans, filesort, temporary tables, largest row estimate), or FORMAT=TREE text. Doesn't run the query. |
list_procedures |
Stored procedures in one database: parameters, declared data access, and whether call_procedure may call each one. |
call_procedure |
Result sets (each capped at max_rows) and OUT/INOUT values of one stored procedure, run in a read-only transaction. Off by default. |
Plus one resource, mysql://capabilities: version, release line, EXPLAIN JSON format
version, and whether sys is visible.
Results are structured, not prose. DECIMAL comes back as a string so it stays exact,
dates and times as ISO 8601, JSON parsed, binary as <binary N bytes>. Long cells are
cut at max_cell_bytes with a marker saying how big they were.
When the server says no, the agent gets a result with refused: true, a reason and a
suggestion, not an error, so it can rephrase. That includes SQL the classifier can't
parse. Mistakes MySQL reports (unknown table or column, wrong parameter count) and
infrastructure failures are tool errors.
Who is trusted: you (this server's configuration) and your MySQL server, including its grants and its stored code. Who is not: the client. Every tool call is treated as untrusted, whether a model wrote it or text the model read in your data steered it. The server's job is to keep an untrusted client inside what you allowed. It does not defend against someone who can already create procedures or change grants on your server.
Read-only is the default. Capabilities beyond classified read statements are opted into
with allow; today there is one, procedures. Write capabilities are planned and will
work the same way: off unless you turn them on, and in separate tools.
Every session, on every pool checkout:
SET SESSION TRANSACTION READ ONLYmax_execution_time = statement_timeout_ms, lock_wait_timeout = 5 sprogram_name=sakila-mcp and sakila_mcp_version, and every
statement is tagged /* sakila-mcp tool=... */, so you can find it in the processlist
and performance_schemaEvery statement from run_query and explain_query goes through a SQL classifier
(sqlglot plus token-level checks) before it reaches MySQL. It fails closed: if it can't
parse it, it refuses it.
/*! ... */ version comments,
INTO (OUTFILE, DUMPFILE, variables), locking reads (FOR UPDATE, FOR SHARE),
:= assignment, the SET_VAR hint, EXPLAIN ANALYZE (it executes), functions that
block, lock, wait or read files (SLEEP, BENCHMARK, GET_LOCK, LOAD_FILE, ...),
and any function that isn't a known built-in (stored functions can write).PREPARE / EXECUTE ... USING), never spliced
into the SQL.max_rows; the query is cut off, not rewritten with a LIMIT.The database allowlist is a filter on names, not an isolation boundary.
information_schema, performance_schema and sys are always readable, and
SHOW PROCESSLIST, SHOW ENGINE INNODB STATUS and performance_schema statement history
show other sessions' SQL, literal values included. The mysql schema is denied unless
you list it.
The real boundary is the account's grants. Give sakila-mcp its own account with only what it needs:
CREATE USER 'sakila_mcp'@'%' IDENTIFIED BY '...';
GRANT SELECT, SHOW VIEW ON app_db.* TO 'sakila_mcp'@'%';
-- Optional: SHOW PROCESSLIST / SHOW REPLICA STATUS. PROCESS exposes other sessions' SQL.
GRANT PROCESS, REPLICATION CLIENT ON *.* TO 'sakila_mcp'@'%';
The password never appears in tool results, logs or error text. There's a test for that.
Off by default: with allow empty the server never sends a CALL, and run_query
refuses one. To let the agent call procedures:
allow = ["procedures"]
GRANT EXECUTE ON app_db.* TO 'sakila_mcp'@'%'; -- or ON PROCEDURE app_db.report
The agent never writes the CALL. It names a database and a procedure and passes values;
the names are looked up in information_schema and the values are bound.
What this server enforces:
MODIFIES SQL DATA is refused without being called.START TRANSACTION READ ONLY. A body that writes, creates a
temporary table or runs SET TRANSACTION READ WRITE is stopped by MySQL, and the agent
gets a refusal.max_rows, and at most 20 result sets are returned.procedure_timeout_ms) and a cap on calls in flight (max_procedure_calls).What MySQL enforces: the EXECUTE grant, and for SQL SECURITY DEFINER procedures (the
default) the definer's privileges, not this account's.
What is not defended, because stored code is trusted:
START TRANSACTION READ WRITE) can write.max_execution_time does not apply inside a stored procedure, and this
account cannot kill a definer-rights procedure. Past the deadline the agent gets an
error and the procedure keeps running on the server until it finishes. Such a call keeps
its slot under max_procedure_calls until then, so retries cannot pile up.So: only procedures that purely read are usable, including ones that never declared it. Procedures that build temporary tables are not, for now.
Nothing to install: uvx sakila-mcp downloads and runs the latest release. Pin a version
with uvx sakila-mcp@0.2.0, or install it with uv tool install sakila-mcp.
uvx sakila-mcp --help
To run from a checkout instead, see Development.
Environment variables (SAKILA_MCP_*), a TOML file passed with --config, or both.
Environment variables win over the file. Keep the password in the file, chmod 600 it,
and keep it out of version control.
# ~/.config/sakila-mcp.toml
host = "db.example.internal"
port = 3306
user = "sakila_mcp"
password = "..."
database_allowlist = ["app_db"] # empty = every non-system database
| Key | Env var | Default | |
|---|---|---|---|
host |
SAKILA_MCP_HOST |
127.0.0.1 |
|
port |
SAKILA_MCP_PORT |
3306 |
|
user |
SAKILA_MCP_USER |
(required) | |
password |
SAKILA_MCP_PASSWORD |
empty | |
database_allowlist |
SAKILA_MCP_DATABASE_ALLOWLIST |
empty (all) | comma-separated in the env var |
max_rows |
SAKILA_MCP_MAX_ROWS |
200 |
rows returned per query |
max_cell_bytes |
SAKILA_MCP_MAX_CELL_BYTES |
4096 |
longer cells are truncated |
statement_timeout_ms |
SAKILA_MCP_STATEMENT_TIMEOUT_MS |
10000 |
session max_execution_time |
pool_size |
SAKILA_MCP_POOL_SIZE |
4 |
|
read_only |
SAKILA_MCP_READ_ONLY |
true |
false refuses to start; there is no write mode yet |
allow |
SAKILA_MCP_ALLOW |
empty | capabilities you opt into; procedures is the only one. Comma-separated in the env var |
procedure_timeout_ms |
SAKILA_MCP_PROCEDURE_TIMEOUT_MS |
60000 |
how long call_procedure waits; the procedure itself is not stopped |
max_procedure_calls |
SAKILA_MCP_MAX_PROCEDURE_CALLS |
3 |
procedure calls in flight; must be below pool_size |
The server connects to MySQL on the first tool call, not at startup. It starts and lists its tools even when MySQL is down; a wrong host or password shows up as a tool error on the first call (and in stderr), and the next call tries again.
Claude Code:
claude mcp add sakila -- uvx sakila-mcp --config ~/.config/sakila-mcp.toml
Claude Desktop (claude_desktop_config.json):
{
"mcpServers": {
"sakila": {
"command": "uvx",
"args": ["sakila-mcp", "--config", "/home/you/.config/sakila-mcp.toml"]
}
}
}
Ollama, with local models. Ollama runs the model but isn't an MCP client itself, so use
ollmcp (mcp-client-for-ollama), a
terminal client that connects Ollama models to MCP servers:
uv tool install ollmcp
It reads the same mcpServers format as Claude Desktop. Save this as, say,
~/.config/sakila-mcp.ollmcp.json:
{
"mcpServers": {
"sakila": {
"command": "uvx",
"args": ["sakila-mcp", "--config", "/home/you/.config/sakila-mcp.toml"]
}
}
}
and start it with a model that supports tool calling. ollama show <model> lists tools
under Capabilities, and https://ollama.com/search?c=tools lists the models that have it:
ollmcp -j ~/.config/sakila-mcp.ollmcp.json -m <model>
/tools inside ollmcp turns individual tools on and off. Model choice matters more here
than with a hosted model: a model that is too small may call the wrong tool, invent
arguments, or stop after one call. If that happens, try a larger one. That's a model
problem, not a safety one. The server enforces the same rules whatever is calling it.
Then ask it things like "what's in app_db and how do orders relate to customers?" or "why is this query slow?".
Write capabilities (planned, opt-in like procedures), procedures that write or build
temporary tables, stored functions, more than one server per process, HTTP transport,
replication / InnoDB / lock diagnostics, Enterprise Edition features, EXPLAIN ANALYZE.
git clone https://github.com/pantoniades/sakila-mcp.git
cd sakila-mcp
uv sync
uv run ruff check . && uv run ruff format --check . && uv run mypy && uv run pytest
Integration tests need a MySQL server prepared once with tests/integration/setup.sh.
Give it the address the server sees the tests connect from and a letters-and-digits
password (extra arguments go to the mysql client), then point the tests at the server:
SAKILA_MCP_TEST_CLIENT_HOST=127.0.0.1 SAKILA_MCP_TEST_PASSWORD=<password> \
tests/integration/setup.sh -u root -p
echo 'SAKILA_MCP_TEST_DSN=mysql://sakila_mcp_test:<password>@<host>:3306/sakila_mcp_test' > .env.test
.env.test is gitignored. Without it the integration tests skip.
One test is opt-in: it drives Claude Code (claude -p) through every tool against the
test server and checks that the client accepts each result. It needs the claude CLI,
uses your account, and never runs in CI:
uv run pytest -m llm Find threats in your stack.
OX Radar can check high-priority threats, like critical package CVEs, against your context.
Each incident is marked Detected or Not Detected with a remediation plan and proof all tracked in the Response Center.
The probe returned only these fields for this server — auth requirement, protocol and tool list weren’t observed, so they’re not shown (never guessed).
The publisher’s own links, as the registry reports them. These are not sources for the assessment on this page.