Skip to main content
MCP server CX Codex

read-only-local-mysql-mcp-server — Claude Code MCP server

Lets Claude Code query a MySQL database in natural language while keeping access read-only. Use it to inspect schemas and retrieve data from an agent.

Install into Claude Code · Platform CLI All methods and platforms ↓
claude mcp add read-only-local-mysql-mcp-server -- npx -y @hovecapital/read-only-mysql-mcp-server
Open on GitHub

What read-only-local-mysql-mcp-server does

read-only-local-mysql-mcp-server connects Claude Code to MySQL through MCP. It turns natural-language requests into database queries and returns JSON results. Connection details come from DB_HOST, DB_PORT, DB_DATABASE, DB_USERNAME, and DB_PASSWORD.

You need Node.js 16 or newer and a MySQL server before starting. Claude Code can add the server with npx; configure the environment variables afterward and restart the client. Query validation allows SELECT, WITH, SHOW, DESCRIBE, and EXPLAIN, with one statement and no comments.

The server cannot write to the database because it also uses a server-side read-only transaction. Requests containing INSERT, UPDATE, or DELETE will not work, so this MCP server is for inspection and reporting rather than data changes.

What it helps with

  • list tables in a MySQL database
  • inspect a table’s columns
  • search records with a condition
  • summarize data from a query
  • run a read-only SQL statement

Example prompts for the agent

  • Show me the tables and columns in this MySQL database.
  • Find last month’s orders and return them as a table.
  • Explain the execution plan for this query with EXPLAIN.

How to install read-only-local-mysql-mcp-server

Platform CLI

claude mcp add read-only-local-mysql-mcp-server -- npx -y @hovecapital/read-only-mysql-mcp-server

Step by step, with commands for each platform: How to add an MCP server to Claude Code, Codex, Cursor, VS Code, Gemini CLI and more

Questions about read-only-local-mysql-mcp-server

How do I install read-only-local-mysql-mcp-server in Claude Code?

Run claude mcp add read-only-local-mysql-mcp-server -- npx -y @hovecapital/read-only-mysql-mcp-server, set DB_HOST, DB_PORT, DB_DATABASE, DB_USERNAME, and DB_PASSWORD, then restart Claude Code.

What does read-only-local-mysql-mcp-server do?

This MCP server lets Claude Code query MySQL using natural-language requests and receive JSON results. It is designed for read access.

Can it change MySQL data?

No. Validation permits only SELECT, WITH, SHOW, DESCRIBE, and EXPLAIN, with one statement and no comments. A read-only transaction adds another write-safety barrier.

Similar MCP servers

All MCP servers for Data and databases →

Project sponsors

Companies that keep this analytics open
Gold sponsor

Impressions, clicks and code copies — open statistics. We keep the numbers public for the same reason NeBlask itself is public. Become a sponsor