mcp-server-mysql

mcp-server-mysql

Provides read-only access to MySQL databases, supporting queries and schema inspection.

MCPDataOpen source
Type
MCP
Transport
stdio
Open source
Yes
GitHub Stars
★ 1.9k
Source
mcp-github

Overview

mcp-server-mysql is a Model Context Protocol server that enables LLMs to inspect MySQL database schemas and perform read-only queries. It supports SSH tunneling, multiple database schemas, and automatic PII data masking. Through the MCP protocol, AI can seamlessly connect to MySQL databases, making it suitable for applications requiring data analysis and querying. Ideal for developers and data analysts.

Capabilities

  • Read-only query MySQL databases
  • Inspect database schemas
  • SSH tunneling support
  • Multiple database schemas
  • Automatic PII data masking

Use cases

Data analysisDatabase queryingSchema inspectionSensitive data handling

Setup

Requires: Node.js v20+MySQL 5.7+MySQL 用户权限
claude mcp add mcp_server_mysql -e MYSQL_HOST="127.0.0.1" -e MYSQL_PORT="3306" -e MYSQL_USER="root" -e MYSQL_PASS="your_password" -e MYSQL_DB="your_database" -- npx @benborla29/mcp-server-mysql

This information was compiled by AI from public sources and may contain inaccuracies — please refer to the source.

FAQ

How to enable write operations?

Set the environment variables ALLOW_INSERT_OPERATION=true, ALLOW_UPDATE_OPERATION=true, ALLOW_DELETE_OPERATION=true.

What transport protocols are supported?

Supports stdio and HTTP transport protocols.

Related skills