Connects AI clients to MySQL for schema inspection and SQL queries, with opt-in writes and configurable database access controls.
Copy the AI prompt to install this server into Claude Code, Cursor, or another agent โ or use 1-click editor setup below.
We haven't yet run this listing's install command through our automated sandbox check. This isn't a red flag โ we're steadily working through the catalog.
๐ก Paste the JSON block into your client's configuration file under mcpServers, then restart the application.
Inspect callable tools, capabilities, and parameters exposed to AI agents by MCP Server Mysql.
The benborla29/mcp-server-mysql MCP server connects MCP-compatible AI clients to a MySQL database. It exposes a SQL query tool named mysql_query and a mysql://tables resource that returns table and column metadata for the connected database.
Queries are read-only by default. Insert, update, and delete operations can be enabled independently through environment variables, allowing an operator to keep an installation read-only or grant only the write operations it needs. The server also supports per-database read and write permissions in multi-database configurations.
This is intended for MySQL 5.7 or later, with MySQL 8.0 or later recommended. The runtime requirement is Node.js 20 or newer.
The benborla29/mcp-server-mysql MCP server runs locally as an MCP process for clients such as Claude Desktop or Claude Code. The client starts the process and passes connection settings through environment variables. An AI agent can then call mysql_query to execute SQL or read the table metadata resource to understand the available schema.
Multi-database mode allows queries across multiple databases without reconnecting. The project also includes SSH tunnel support for reaching remote databases. Connections can use SSL/TLS, including a mutual TLS option. For deployments that should not run as a local stdio process, the server provides an HTTP transport with bearer-token authentication.
Results can be configured for automatic PII masking. This is useful when query output may contain sensitive values, but the specific redaction configuration should be reviewed before using the server with production data.
Install and run the package with Node.js 20 or newer. A basic configuration supplies the MySQL host, port, username, password, and database name through MYSQL_HOST, MYSQL_PORT, MYSQL_USER, MYSQL_PASS, and MYSQL_DB.
Write access is not enabled by the default configuration. Set ALLOW_INSERT_OPERATION=true, ALLOW_UPDATE_OPERATION=true, or ALLOW_DELETE_OPERATION=true to permit the corresponding operation. These flags can be enabled separately rather than granting all write access at once.
The README provides configuration guidance for Claude Code and Claude Desktop, as well as documentation for Cursor, Codex, local repository use, remote mode, multi-database operation, TLS, SSH tunnels, and PII redaction. The MySQL account must have privileges appropriate to the operations the server is expected to perform.
The primary MCP tool is:
mysql_query: executes SQL against the configured MySQL connection. Read operations work by default; write operations depend on the relevant permission flags.The available resource is:
mysql://tables: lists tables and column metadata for the connected database.Additional supported capabilities include multiple database connections, schema-specific access controls, SSH tunnels, SSL/TLS connections, optional mutual TLS, HTTP transport with bearer authentication, and automatic masking of sensitive data in query results.
The benborla29/mcp-server-mysql MCP server requires a reachable MySQL installation and a user with suitable privileges; it does not provide a database itself. The supplied connection details and enabled write flags determine what an agent can access or change. Because SQL execution is exposed to the MCP client, operators should limit database privileges and review write settings before connecting it to production data.
The README identifies Claude Code as an optimized integration and gives a Claude Desktop configuration. Other client support depends on MCP client compatibility and the configuration method documented by the project.
Factual signals from GitHub, npm, and our automated checks โ not a rating.
No reviews yet โ be the first to share how this listing worked for you.
Showcase your server listing on GitHub or your project documentation. Embed this dynamic SVG badge to highlight official listing status and live engagement.
[](https://allmcps.com/mcp/benborla29-mcp-server-mysql)<a href="https://allmcps.com/mcp/benborla29-mcp-server-mysql"><img src="https://allmcps.com/api/badge/benborla29-mcp-server-mysql?style=directory" alt="MCP Server Mysql on AllMCPs" /></a>