Labsco
MCP SERVER

MySQL Database Access

by dpflucas

Get oriented in an unfamiliar MySQL schema and answer questions from it with read-only SQL, without opening a client.

Relational SQL DatabasesVerified
Summary
Schema questions get answered in the conversation instead of in a second terminal.

Three calls take you from "which databases are here" to "what columns does this table have", which is exactly the path a query against unfamiliar data starts down. execute_query is stated as read-only, so this server is not the thing that writes to your database — but list_databases and the per-call database parameter mean its reach is whatever the MySQL user was granted, and that narrowing belongs in the grant rather than here.

What it is

Four read tools over a MySQL connection: the databases it can see, the tables inside one, a table's schema, and a read-only query.

What you get
  • Every database the connection is able to reach
  • The tables in a database you name
  • The schema for a specific table
  • A read-only SQL query, run against a database you name
Requirements

A reachable MySQL server and five environment variables that address it: MYSQL_HOST, MYSQL_PORT, MYSQL_USER, MYSQL_PASSWORD and MYSQL_DATABASE.

Setup effort

One command plus a key — npm install -g mysql-mcp-server, then supply credentials