mysql_mcp_server
by psetiawan
Overview
This server allows Continue.dev to interact with a MySQL database by providing resources (tables, rows) and tools (SQL query execution) via the MCP 2024 protocol.
Installation
node server.js --mysql --host localhost --database DBNAME --user USERNAME --password YOURPASSSecurity Notes
CRITICAL: The `tools/call` handler executes user-provided SQL queries (restricted to SELECT) directly via `pool.query(sql)` without parameterization for values. This makes it vulnerable to SQL injection within SELECT statements, allowing for data exfiltration or logic bypass. Additionally, database credentials (especially password) are passed as command-line arguments, which is insecure as they can be exposed in process listings (e.g., `ps aux`).
Similar Servers
mcp-mysql-server
Provides an MCP-compliant interface for AI models to securely interact with a MySQL database for CRUD operations, schema inspection, and performance analysis.
postgres-mysql-mcp-server
A Model Context Protocol (MCP) server that enables AI assistants to query PostgreSQL and MySQL databases for schema introspection and data retrieval.
mcp-server-generator
Generate Model Context Protocol (MCP) servers from database datasources for integration with AI agents, using a visual canvas interface for tool creation and management.
mcp_sql_demo
Provides secure, multi-database access for LLMs to inspect MySQL schemas and execute SQL queries, supporting both read and configurable write operations with fine-grained schema-specific permissions.