Back to Home
derricksiawor icon

mav-mysql-mcp-server

Verified Safe

by derricksiawor

Overview

Enables Large Language Models (LLMs) to securely interact with MySQL and MariaDB databases through a standardized Model Context Protocol (MCP) interface, supporting both read and optional write operations.

Installation

Run Command
node build/index.js

Environment Variables

  • MYSQL_HOST
  • MYSQL_USER
  • MYSQL_PASSWORD
  • MYSQL_DATABASE

Security Notes

The server demonstrates robust security features. It defaults to read-only mode, with write operations requiring explicit environment variable enablement. It implements SQL injection protection through parameterized queries and strict validation/escaping of all table and column identifiers. Access to sensitive system tables (e.g., `mysql.user`, `information_schema`) is explicitly blocked, and dangerous operations like file I/O or permission changes (GRANT/REVOKE) are prohibited even in write mode. The `validateQuery` function performs checks for sensitive patterns in SQL, and critical DDL/DML operations are safeguarded with identifier validation. Rate limiting and query timeouts prevent abuse and resource exhaustion, while comprehensive audit logging ensures traceability. There are no apparent `eval` statements or obfuscation. The dependency tree primarily consists of standard, well-maintained libraries.

Similar Servers

Stats

Interest Score0
Security Score9
Cost ClassMedium
Avg Tokens1500
Stars0
Forks0
Last Update2025-12-13

Tags

MySQLDatabaseLLM IntegrationSecurityMCP