
Read Only Local Mysql Mcp Server
Connects Claude to MySQL databases with read-only access through three straightforward tools: connect lets you point to any MySQL instance via connection string, query runs SELECT statements and returns JSON results, and disconnect reverts to your default environment configuration. It validates queries to block writes, so you can let Claude explore schemas, run analytics queries, and pull data without risking mutations. Best for local development databases or production replicas where you want natural language querying without the overhead of a full BI tool. Works through npx for zero-install setup or can be cloned and built locally if you need to modify the query validation logic.
- GitHub stars
- 6
- tools
- 3
- transport
- STDIO
- last updated
- Feb 17, 2026
Tools
3 toolsPublic tool metadata for what this MCP can expose to an agent.
connectConnect to a MySQL database using a connection string. The connection persists for subsequent queries until changed or disconnected.
Connect to a MySQL database using a connection string. The connection persists for subsequent queries until changed or disconnected.
No parameter schema in public metadata yet.
disconnectDisconnect from the current runtime database and revert to the default environment-configured connection. Takes no parameters.
Disconnect from the current runtime database and revert to the default environment-configured connection. Takes no parameters.
No parameter schema in public metadata yet.
queryRun a read-only SQL query against the currently connected database.
Run a read-only SQL query against the currently connected database.
No parameter schema in public metadata yet.
Sponsors
Readme
MySQL MCP Server
A Model Context Protocol (MCP) server that enables Claude Desktop to interact with MySQL databases through natural language queries.
Features
- Execute read-only SQL queries through Claude Desktop
- Dynamic connection configuration — connect to any MySQL database at runtime via connection string
- Built-in security with query validation (SELECT, WITH, SHOW, DESCRIBE and EXPLAIN only, one statement, no comments) plus a server-side read-only transaction
- Easy integration with Claude Desktop
- JSON formatted query results
- Environment-based configuration for database credentials
Quick Start
For Claude Code Users (Recommended - Easiest Method)
claude mcp add mysql -s user -- npx -y @hovecapital/read-only-mysql-mcp-server@latest
Then set your database environment variables:
Details
- Repository
- github.com/hovecapital/read-only-local-mysql-mcp-server
- Website
- hove.capital
- Category
- Databases
- Package
@hovecapital/read-only-mysql-mcp-server- Transport
- STDIO
- Registry
- MCP registry, active