Labsco
MCP SERVER

MySQL MCP Server

by kevinwatt

Run read-only SELECTs against a MySQL database under fixed length, row and time ceilings, with a separate tool for INSERT, UPDATE and DELETE.

Relational SQL DatabasesVerified
Summary
The read path has its own ceilings, so exploring a database is a bounded operation.

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.

What it is

A four-tool MySQL server that separates reading from writing and exposes enough schema to build a query against.

What you get
  • 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
Requirements

A reachable MySQL database and five environment variables: MYSQL_HOST, MYSQL_PORT, MYSQL_USER, MYSQL_PASS and MYSQL_DB.

Setup effort

One command plus a key — npx -y @kevinwatt/mysql-mcp, then supply credentials