Back to Home
huangfeng19820712 icon

mcp-mysql-server

Verified Safe

by huangfeng19820712

Overview

Provides an MCP-compliant interface for AI models to securely interact with a MySQL database for CRUD operations, schema inspection, and performance analysis.

Installation

Run Command
npx @fhuang/mcp-mysql-server

Environment Variables

  • MYSQL_HOST
  • MYSQL_USER
  • MYSQL_PASSWORD
  • MYSQL_DATABASE
  • MYSQL_PORT
  • CONNECTION_LIMIT
  • QUEUE_LIMIT

Security Notes

The server demonstrates robust security practices by utilizing parameterized queries to prevent SQL injection. Sensitive database credentials are managed via environment variables or a MySQL connection URL passed as a command-line argument, and passwords are explicitly masked in logging output. Input validation ensures that different tools ('query', 'execute', 'show_statement') are used for their intended SQL command types, preventing misuse. Connection pooling and graceful shutdown on process exit contribute to reliable resource management.

Similar Servers

Stats

Interest Score38
Security Score9
Cost ClassMedium
Avg Tokens500
Stars9
Forks2
Last Update2025-12-01

Tags

databasemysqlmcpAI toolsdata storage