Labsco
MCP SERVER

Simple MySQL MCP Server

by fabiovige

Run SQL against a MySQL database and read table structure back, with dangerous statements blocked before they execute.

Relational SQL Databases
Summary
A guard rail between an agent and a live database.

The validation layer is the point: a named set of destructive statements is refused before it reaches MySQL, and the delete-everything pattern is caught specifically. That is a floor, not a permission model — the account in MYSQL_USER still decides the real reach, and this is where you narrow it. Note the project's documentation is written in Portuguese.

What it is

A small MySQL server with a validation layer in front of the connection. Queries are checked before they run, table names are sanitised, and the connection is reused across calls. Alongside the two tools it publishes the database, table and schema listings as resources.

What you get
  • SQL executed against the configured database, with the statement validated first
  • The structure of a named table described
  • The available databases, the current database's tables and the full schema, published as readable resources
  • DROP DATABASE and DROP TABLE refused, and DELETE guarded against the WHERE 1=1 pattern
Requirements

Node.js, a reachable MySQL server, and five values in the environment that address it: MYSQL_HOST, MYSQL_PORT, MYSQL_USER, MYSQL_PASSWORD and MYSQL_DATABASE.

Setup effort

Build from source — clone the repository and build it, then point your client at the binary