Labsco
MCP SERVER

MySQL DB

by burakdirin

Run SQL against a MySQL server from an assistant, with a read-only switch when you want queries and nothing else.

Relational SQL Databases
Summary
One switch decides whether it can change anything.

The server is deliberately thin: connect to a database, send SQL, get JSON back. Read-only mode is set in the configuration before it starts, which makes it the setting to get right before pointing this at anything that matters.

What it is

A thin SQL layer over MySQL, launched as a local process with the host, user, password and an optional starting database in its configuration.

What you get
  • connect_database — switches to a named database and confirms the connection
  • execute_query — runs SQL and returns results as JSON; several statements can go in one call, separated by semicolons
  • A read-only mode set in the configuration, which restricts the server to queries
Requirements

A reachable MySQL server and its credentials, set in the client config along with the optional starting database and the read-only flag. Install from PyPI with uv or pip, or run it with uvx without installing.

Setup effort

One command plus a key — uv pip install mysqldb-mcp-server, then supply credentials