Mysql MCP Server logo

Mysql MCP Server

by davewind

Read-only MySQL access over MCP with schema discovery and SELECT query execution.

Install Mysql MCP Server

Pick your client, then add it in one click or paste the config.

STDIONode.js
~/Library/Application Support/Claude/claude_desktop_config.json
claude_desktop_config.json
{
  "mcpServers": {
    "davewind-mysql-mcp-server": {
      "command": "npx",
      "args": [
        "-y",
        "@davewind/mysql-mcp-server"
      ]
    }
  }
}

Settings → Developer → Edit Config, merge this into mcpServers, then fully quit and reopen Claude Desktop.

We couldn’t confirm it starts correctly

We ran the install command but it didn't respond within our test window — this can mean a slow first-time install rather than a real problem.

npx -y @davewind/mysql-mcp-server

No response to initialize.

This is an experimental automated check and can have false negatives — missing environment variables, a slow cold install, etc. It doesn’t necessarily mean something’s wrong. Last checked .

Overview

davewind/mysql-mcp-server MCP server connects an MCP-compatible LLM to a MySQL database through a stdio process. It exposes read-only SQL querying and publishes discovered table schemas, including column names and data types. Queries are limited to SELECT statements and run inside READ ONLY transactions, excluding data and schema changes. Reach for it when an agent needs to inspect or analyze MySQL data without write access.

Use cases

  • Inspect MySQL table schemas
  • Run read-only SELECT queries
  • Analyze database contents through an MCP client
  • Prevent agent-driven database writes

Key features

  • Read-only MySQL access
  • SELECT query execution
  • SQL validation
  • READ ONLY transactions
  • Automatic table schema discovery
  • JSON-RPC over stdio

Tools1

What Mysql MCP Server lets your agent do. Expand a tool for its parameters.

Self-reported~1 tokens of context

Security & health

What it can reach and how reliably it runs — from our own checks, not the maintainer’s claims.

ActiveLast checked

Recent health check succeeded.

22/22 checks healthy over the last 96d

Supply-chain signal

No high-severity advisories surfaced by our automated scan.

Critical 0High 0Medium 0Low 0

Scanned 8d ago via OSV.dev · @davewind/mysql-mcp-server (npm)

Adoption & maintenance

Factual signals from GitHub, npm, and our automated checks — not a rating.

GitHub stars16Stargazers on the source repository.
npm downloads665Package downloads in the last 30 days.
Last commit5mo agoMost recent push to the default branch.
Install checkInconclusiveDidn't respond in our test window — often a slow first install.
Tools exposed1Callable tools this server registers over MCP.
Directory activity6 viewsConfig copies, upvotes, and views on AllMCPs.

How Mysql MCP Server works

What davewind/mysql-mcp-server MCP server does

davewind/mysql-mcp-server MCP server provides an MCP interface for inspecting MySQL databases and running read-only SQL. The connection is supplied as a MySQL URI, and the server acts as an intermediary between an MCP client and the database.

Its main query capability accepts a SQL string and executes it against the configured database. In either case, the supported operation is read-only query execution rather than mutation.

The server also makes table schema information available as MCP resources. Discovered metadata includes table structures, column names, and data types, allowing an LLM to inspect the database before forming a query.

How it works

The davewind/mysql-mcp-server MCP server communicates with compatible LLM applications using JSON-RPC over standard input and output. An MCP client starts the Node.js process and passes the MySQL connection URI as a command-line argument.

Before execution, SQL is validated to allow SELECT statements. Each accepted query runs in a READ ONLY transaction. The implementation also excludes INSERT, UPDATE, DELETE, and other data modification operations, as well as schema changes such as CREATE, ALTER, and DROP.

Schema resources use a MySQL-style URI, such as mysql://user:password@localhost:3306/database, to identify the connected database. The supplied credentials and host details therefore need to provide access to the target MySQL instance.

Setup and configuration

The package can be installed globally with npm:

Terminal
npm install @davewind/mysql-mcp-server -g

The recommended MCP configuration starts it with npx and passes the database URI as an argument:

config.json
{
  "mcpServers": {
    "mysql": {
      "command": "npx",
      "args": ["-y", "@davewind/mysql-mcp-server", "mysql://user:password@localhost:port/database"]
    }
  }
}

Replace the example connection string with the credentials, host, port, and database for your MySQL deployment. The project communicates over stdio, so the client must support launching local MCP processes.

Tools and capabilities

The davewind/mysql-mcp-server MCP server supports:

  • Executing read-only SQL queries supplied as a string.
  • Validating queries so only SELECT operations are accepted.
  • Running queries inside READ ONLY transactions.
  • Discovering table schemas from database metadata.
  • Returning table column names and data types as schema resources.

The repository describes the server as suitable for Cursor and n8n, while its MCP implementation is intended for LLM systems that support the protocol.

Limitations and notes

This server is not a general-purpose MySQL administration tool. It does not support writes or schema modification, including INSERT, UPDATE, DELETE, CREATE, ALTER, and DROP operations. Access is limited by the permissions and reachability of the MySQL connection supplied at startup.

It does not describe environment variables, OAuth, API-key authentication, or a managed database service. The project is released under the MIT license.

Reviews

No reviews yet — be the first to share how it worked for you.

Frequently Asked Questions about Mysql MCP Server

Install it with npm using `npm install @davewind/mysql-mcp-server -g`, or configure an MCP client to run `npx -y @davewind/mysql-mcp-server` with a MySQL URI argument.

Yes. It accepts SELECT queries, validates them as read-only, and executes them inside READ ONLY transactions.

No. INSERT, UPDATE, DELETE, and schema-changing statements such as CREATE, ALTER, and DROP are not supported.

Yes. It discovers table metadata and provides schema information including column names and data types.

Related MCP servers

Add a badge to your READMEShow it’s listed — live SVG, Markdown or HTML.

AllMCPs Directory Badge

Full Badge Customizer

Showcase your server listing on GitHub or your project documentation. Embed this dynamic SVG badge to highlight official listing status and live engagement.

Badge Style:
Live Dynamic SVG PreviewMysql MCP Server AllMCPs Directory Badge
Markdown (GitHub README)
[![AllMCPs](https://allmcps.com/api/badge/davewind-mysql-mcp-server?style=directory)](https://allmcps.com/mcp/davewind-mysql-mcp-server)
HTML Embed
<a href="https://allmcps.com/mcp/davewind-mysql-mcp-server"><img src="https://allmcps.com/api/badge/davewind-mysql-mcp-server?style=directory" alt="Mysql MCP Server on AllMCPs" /></a>