mcp-server-mysql logo

mcp-server-mysqlA Model Context Protocol server that provides read-only access to MySQL databases. This server enables LLMs to inspect database schemas and execute read-only queries.

(0)
Daniel NikulshynReviewed by Daniel Nikulshyn·Updated July 2026

Overview

A Model Context Protocol server that provides read-only access to MySQL databases. This server enables LLMs to inspect database schemas and execute read-only queries. Key features include read-only by default, write operations that can be opt-in via environment flags, support for Claude Code integration, and SSH tunneling. Additionally, it offers schema-specific permissions, PII redaction, and support for remote databases and multi-DB mode.

Key features

  • Read-only by default
  • Write operations opt-in via env flags
  • Claude Code integration
  • SSH tunnel support
  • Multi-DB mode
  • Schema-specific permissions

Pricing

Model
Free
Category
MCP Servers
Rating
No reviews yet

Use cases

AI-Powered Data Analysis

Use mcp-server-mysql to enable LLMs to analyze data in a MySQL database, inspecting schemas and executing read-only queries.

Data Exploration with Claude

Integrate mcp-server-mysql with Claude Code to allow LLMs to explore and query MySQL databases.

Pros & Cons

Pros

  • Enables LLMs to inspect database schemas and execute read-only queries
  • Supports multiple databases without reconnecting
  • Automatic masking of sensitive data in results
  • Optimized for Anthropic's Claude Code CLI

Cons

  • Write operations are disabled by default and require environment flag configuration
  • Requires Node.js v20+ and MySQL 5.7+ (8.0+ recommended)

Reviews

Sign in to leave a review.

No reviews yet. Be the first!

Q&A

What are the system requirements?

Node.js v20+ and MySQL 5.7+ (8.0 recommended). The MySQL user must have the necessary privileges for the databases you wish to expose. No local setup is needed if you run it in the cloud.

Asked by Victor Nguyen · Jan 22, 2026

Can I protect sensitive data when querying?

Yes. The server automatically redacts PII in query results. Schema‑specific permissions can be configured to restrict access to certain tables or columns, ensuring sensitive information is masked or blocked.

Asked by Xavier Costa · Jan 5, 2026

What integrations does it support?

It is optimized for Anthropic’s Claude Code CLI and can be invoked via the Model Context Protocol. It also works with SSH tunnels, supports remote MySQL over HTTP with bearer token and TLS/mTLS, and can handle multiple databases in a single session.

Asked by Youssef El-Sayed · Jan 6, 2026

How does mcp-server-mysql handle write operations?

By default it is read‑only. Write commands (INSERT, UPDATE, DELETE) can be enabled by setting the environment flag ALLOW_INSERT_OPERATIONS. Without this flag any write attempt will be rejected.

Asked by Tobias Hartmann · Nov 10, 2025

Ask a question

MCP Servers alternatives