execute_queryLABSCO 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 — git clone https://github.com/fabiovige/mcp-mysql-simple.git
USE CASES
Answering a data question where it was asked
Run the query in the conversation and get the rows back inline, instead of switching to a client and pasting the result across.
Writing a query against a table you have never read
Read the structure first so column names and types are copied rather than guessed, then run the query — the loop that otherwise costs two failed attempts.
Getting oriented in an unfamiliar database
The schema and table listings are readable as resources, so the layout can be pulled in once and referred to, rather than rediscovered call by call.
Letting an agent query production without holding your breath
The statements most likely to end badly are refused before they reach the server, so the remaining risk is scoped by the credentials you hand it rather than by the model's judgement.
2 tools
Listed in project docs. Your client may show a different list.
describe_tableBEFORE YOU INSTALL
What to know first
Tools you get
2 tools named in the project's documentation.
Requires
- node on PATH
- MYSQL_PASSWORD in your environment
- MYSQL_USER in your environment
Where it runs
The documented client runs the server on your machine.
INSTALLATION
Connect your client
This one is built from source rather than installed with a single command.
Server setup
git clone https://github.com/fabiovige/mcp-mysql-simple.git
cd mcp-mysql-simple
npm install
npm run buildMCP Clients
Claude Desktop
{
"mcpServers": {
"mysql-optimized": {
"command": "node",
"args": [
"<YOUR_PATH_TO_DIST>/index.js"
],
"env": {
"MYSQL_HOST": "localhost",
"MYSQL_PORT": "3306",
"MYSQL_USER": "root",
"MYSQL_PASSWORD": "<YOUR_MYSQL_PASSWORD>",
"MYSQL_DATABASE": "<YOUR_MYSQL_DATABASE>"
}
}
}
}The README's placeholders are in Portuguese. <YOUR_PATH_TO_DIST>/index.js ("path/to") is the full path to dist/index.js in your clone, <YOUR_MYSQL_PASSWORD> ("your password") your MySQL password and <YOUR_MYSQL_DATABASE> ("your database") your database name. Change MYSQL_HOST, MYSQL_PORT and MYSQL_USER if yours differ.