# MCP Server for MySQL

An MCP server that gives Claude and other LLMs access to MySQL databases: inspecting schemas and running read-only queries by default, with per-flag opt-in write access, SSH tunneling, multi-database mode and automatic PII redaction.

MCP Server for MySQL is a Model Context Protocol server that connects an LLM to a MySQL database for schema inspection and query execution. Write operations, such as insert, update and delete, are disabled by default and must be explicitly enabled per operation through environment flags, and results can have personally identifiable information automatically masked before being returned to the model.

It supports connecting to multiple databases without reconnecting, per-database read and write permission scoping, an SSH tunnel mode for reaching remote databases, and a remote HTTP transport secured with bearer token authentication and optional SSL and mutual TLS.

It is designed to work with Claude Code and other MCP clients, requires Node.js 20 or newer and MySQL 5.7 or newer, and is released under the MIT license.

Website: https://github.com/benborla/mcp-server-mysql
