queryLABSCO SUMMARY
A dry run for SQL you did not write.
The rollback design is the reason to pick this one: an assistant can draft an UPDATE, prove it parses and touches the rows it claims, and still leave the database untouched. Treat it as validation rather than protection — the credentials you supply are real, and SQL injection is explicitly left to whoever builds on top.
What it is
A containerized MCP server for MySQL with an unusual safety property: it accepts write statements but never commits them. A read query returns rows; a write query is executed inside a transaction that is rolled back, so what comes back is whether the statement is valid, not a changed database.
What you get
query— run a read-only statement and get the rows back as JSONtest_execute— run a write statement and get back whether it can execute, with the change rolled backlist_tables— the table names in the databasedescribe_table— a table's columns with type, nullability, key, default and extra
Requirements
A reachable MySQL server and credentials for it. Put MYSQL_HOST, MYSQL_PORT, MYSQL_USER and MYSQL_PASSWORD in ~/.mcp/.env; the client runs ghcr.io/xiangma9712/mcp/mysql with --env-file pointed at it. To reach a MySQL running on your own machine, set the host to host.docker.internal and pass --add-host=host.docker.internal:host-gateway — OrbStack supplies that automatically, but adding the flag is the reliable path. Package mcp-mysql at 1.0.3.
Setup effort
One command plus credentials — docker run -i --rm --add-host=host.docker.internal:host-gateway --env-file ~/.mcp/.env ghcr.io/xiangma9712/mcp/mysql, then supply credentials
USE CASES
Checking a migration statement before running it for real
Send the write through the rollback path and see whether it executes, then run it yourself where it counts.
Exploring a schema you inherited
List the tables, describe the interesting ones, and read the column types without opening a client.
Answering a question with actual data
Let the assistant write the SELECT and return rows, rather than guessing at what the table contains.
4 tools
Listed in project docs. Your client may show a different list.
test_executelist_tablesdescribe_tableBEFORE YOU INSTALL
What to know first
Tools you get
4 tools named in the project's documentation.
Requires
- MYSQL_PASSWORD in your environment
- MYSQL_USER in your environment
INSTALLATION
Connect your client
Server setup
Configuration file
{
"mcpServers": {
"mysql": {
"command": "docker",
"args": [
"run",
"-i",
"--rm",
"--add-host=host.docker.internal:host-gateway",
"--env-file",
"/Users/<YOUR_USERNAME>/.mcp/.env",
"ghcr.io/xiangma9712/mcp/mysql"
]
}
}
}/Users/<YOUR_USERNAME>/.mcp/.env is the full path of your ~/.mcp/.env — the file holding MYSQL_HOST, MYSQL_PORT, MYSQL_USER and MYSQL_PASSWORD.
docker
docker run -i --rm --add-host=host.docker.internal:host-gateway --env-file ~/.mcp/.env ghcr.io/xiangma9712/mcp/mysql