`mysql_query` executes what it is given, so the boundary is entirely the credentials you put in the config — grant SELECT only and this is a safe question-answering tool, grant more and it is a shell into your data. The pairing with schema discovery is what makes it work in practice: the model reads the table structure first, so the SQL it writes matches your columns rather than its assumptions.
A minimal MySQL bridge for assistants. It gives the model the three things it needs to answer a database question on its own: what tables exist, what shape one of them is, and the result of a query. Connection details come from environment variables in your client config.
- `mysql_list_tables` lists every table in the configured database
- `mysql_describe_table` returns the schema for a named table
- `mysql_query` executes any SQL statement you pass it
- Error handling that reports database failures back rather than dropping the call
Node.js v14 or higher and a reachable MySQL instance. Clone, `npm install`, and point your client at the server file with `MYSQL_HOST`, `MYSQL_USER`, `MYSQL_PASSWORD`, `MYSQL_DATABASE` and `MYSQL_PORT` in the env block — the port defaults to 3306. Queries run with the permissions of the user in that config, and `mysql_query` accepts any SQL, so a read-only account is the difference between a lookup tool and a write handle.
One command plus a key — npx -y mysql-mcp-server, then supply credentials
