mysql_query takes SELECT only and enforces 4096 characters, 1000 rows and 30 seconds, which puts a limit on what an exploratory question can cost; anything that changes data goes through mysql_execute, with params passed separately and the affected row count and insert ID coming back. list_tables and describe_table mean the model can read the schema instead of guessing column names, and the split between the two query tools is visible to whoever grants access.
A four-tool MySQL server that separates reading from writing and exposes enough schema to build a query against.
- Read-only SELECT execution with a maximum query length of 4096 characters, a maximum of 1000 result rows and a 30 second query timeout
- INSERT, UPDATE and DELETE through a separate tool that supports parameterised queries, handles the transaction, and returns the affected row count and insert ID
- The tables in the current database, and the structure of any one of them
A reachable MySQL database and five environment variables: MYSQL_HOST, MYSQL_PORT, MYSQL_USER, MYSQL_PASS and MYSQL_DB.
One command plus a key — npx -y @kevinwatt/mysql-mcp, then supply credentials
