
Sakila MCP
Read-only MySQL access with a fail-closed SQL classifier and structured query results.
- tools
- 6
- auth
- Secret needed
- transport
- STDIO
- env vars
- 5
- last updated
- Nov 18, 2026
What it does
- Reads schema and data with
server_info,list_databases,list_tables,describe_table, andrun_query, capped atmax_rows - Plans queries with
explain_query, which returns EXPLAIN JSON or tree output without executing the statement - Requires a MySQL account granted only SELECT and SHOW VIEW; the database allowlist is a name filter, not an isolation boundary
- Designed for schema exploration, ad hoc analysis, and diagnosing slow queries against MySQL 8.4 or later
Tools
6 toolsPublic tool metadata for what this MCP can expose to an agent.
server_infoMySQL 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.
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.
No parameter schema in public metadata yet.
list_databasesDatabases you're allowed to query, system schemas flagged.
Databases you're allowed to query, system schemas flagged.
No parameter schema in public metadata yet.
list_tablesTables and views in one database: engine, approximate rows, data and index size.
Tables and views in one database: engine, approximate rows, data and index size.
No parameter schema in public metadata yet.
describe_tableColumns, indexes (key parts in order, uniqueness, cardinality), foreign keys, engine, row format, collation.
Columns, indexes (key parts in order, uniqueness, cardinality), foreign keys, engine, row format, collation.
No parameter schema in public metadata yet.
run_queryColumns and rows for one statement, capped at max_rows. Parameters via ? placeholders.
Columns and rows for one statement, capped at max_rows. Parameters via ? placeholders.
No parameter schema in public metadata yet.
explain_queryEXPLAIN FORMAT=JSON plus a summary (full table scans, filesort, temporary tables, largest row estimate), or FORMAT=TREE text. Doesn't run the 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.
No parameter schema in public metadata yet.
Configuration
SAKILA_MCP_USER*MySQL account name. Give it read-only grants.
SAKILA_MCP_PASSWORDsecretPassword of the MySQL account. Empty if the account has none.
SAKILA_MCP_HOSTdefault: 127.0.0.1MySQL host.
SAKILA_MCP_PORTdefault: 3306MySQL port.
SAKILA_MCP_DATABASE_ALLOWLISTComma-separated databases the agent may query. Empty means every non-system database.
Readme
sakila-mcp
sakila-mcp is an MCP server that lets an LLM agent inspect and query any MySQL database, read-only, with a fail-closed SQL classifier between the agent and the server.
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.1 (0.1.1 is the first release on PyPI). What's described here works today. Expect the interface to change.
Quickstart
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
Details
- Repository
- github.com/pantoniades/sakila-mcp
- Category
- Databases
- Package
sakila-mcp- Transport
- STDIO
- Auth
- Required
- Registry
- MCP registry, active
Similar to Sakila MCP
More Databases
MySQL MCP Servermusaddiq-devRead-only MySQL access for listing databases, tables, and schemas, plus bounded SELECT queries.
MySQLdesigncomputer1.4K starsConnects to MySQL databases for SQL queries, schema inspection, and table sampling.
MCP Alchemy Serverrunekaagaard421 starsRead-only schema and query access to relational databases: SQLite, PostgreSQL, MySQL, and more.
Postgres MCP Procrystaldba3.5K starsConnects to PostgreSQL databases for schema browsing, SQL execution, query tuning, and health checks.
Dbmcphaymon-ai33 starsRead and write access to MySQL, MariaDB, PostgreSQL, and SQLite databases from one binary.
DBHubbytebase3.9K starsConnects to seven SQL databases for schema exploration, queries, and diagnostics through one server.