Skip to content
MCP server

mysql-mcp-server

Read-only MySQL access for LLM clients via the Model Context Protocol

mysql-mcp-server is an open-source MCP server for databases. It is available on CLI, Self-hosted and API.

Pricing
Open source
Platforms
CLI, Self-hosted, API
What it can do
Read-only
GitHub stars
16
Last commit
Language
JavaScript

Similar MCP servers

About mysql-mcp-server

Gives an AI assistant a safe window into a MySQL database. The server lists table structures as resources and offers a single query tool that accepts SELECT statements, so a model can explore a schema and answer questions against live data without changing anything.

Every query runs inside a READ ONLY transaction, and SQL is validated to allow only SELECT statements. Data modification and schema changes such as INSERT, UPDATE, DELETE, CREATE, ALTER and DROP are not supported. Connection details are passed as a MySQL connection URL in the client configuration file.

The package is aimed at developers and analysts who want Claude-style or other MCP-compatible assistants to query their own MySQL data. It runs locally over stdio on Node.js 18 or later and is installed through npm.

Tools this server provides (1)

Taken from the project documentation; the running server may differ.

From the tool list in its README, going by the names, all 1 tool only read data.

From the server's own tool labels and tool names; not verified by us.

queryName suggests: reads
Execute read-only SQL queries against the connected database.

What it does

Read-only query enforcement
Queries are checked to allow only SELECT statements and run inside READ ONLY transactions.
Schema discovery
Table structures with column names and data types are exposed automatically as resources.
Single query tool
A query tool accepts a SQL string and returns results for the connected database.
MCP stdio transport
Communicates with clients over JSON-RPC on stdio following the Model Context Protocol.
Simple npx setup
Runs from a single command in an MCP client config with a MySQL connection URL.

Good for

  • Letting an assistant explore an unfamiliar MySQL schema before writing queries
  • Answering ad hoc business questions against a production replica without write risk
  • Generating reports from live MySQL tables inside an MCP-enabled chat client
  • Debugging application data by asking an LLM to run read-only lookups

Pricing

Open source

Free and open source under the MIT license.

More servers for the same service

mysql-mcp-server FAQ

Can the server modify my database?

No. It allows only SELECT statements, runs queries in READ ONLY transactions, and does not support data modification or schema changes.

What do I need to run mysql-mcp-server?

Node.js version 18 or later and a MySQL connection URL. It is installed with npm and launched through npx in an MCP client configuration.

Which clients can use mysql-mcp-server?

Any LLM system that supports the Model Context Protocol and communicates over stdio.

Is mysql-mcp-server free?

Yes. mysql-mcp-server is open source, so you can use and self-host it for free.

What are the best alternatives to mysql-mcp-server?

The closest alternatives to mysql-mcp-server are mcp-server-mysql, mcp-mysql-server, mysql_mcp_server, Read Only Local Mysql MCP Server and MySQL MCP Server.

Where this comes from

  • Description: written from the project's README.

How AIPoweredBot checks servers