SuperAPI AI Directory

mysql-legacy-mcp

Access legacy MySQL 5.0 to 5.6 databases: schema inspection and SELECT by default, with opt-in INSERT, UPDATE, DELETE and DDL.

Open website

About this tool

MySQL Legacy MCP is an MCP server for connecting to legacy MySQL 5.0 through 5.6 databases, communicating over stdio. The package is published on npm as mysql-legacy-mcp and is listed in the official MCP Registry (io.github.Rufflet/mysql-legacy-mcp).

Purpose This tool is primarily aimed at scenarios where AI agents need to inspect MySQL 5.0, 5.1, 5.5, or 5.6 databases. If your existing MySQL MCP server assumes database version 5.7+, depends on JSON functions or newer information_schema fields, this project provides a legacy-compatible alternative. It is also suitable for workflows that need schema inspection and SELECT queries, and that want write operations disabled by default and enabled per statement type.

Key Capabilities The project uses MySQL 5.1-compatible SQL and SHOW metadata queries and is deliberately kept minimal. By default it provides only read-only capabilities, including a SELECT tool with parser checks and result size limits (wrapped in a read-only transaction on MySQL 5.6.5 and above), as well as SHOW-based inspection of databases, tables, columns, CREATE TABLE, and indexes. INSERT, UPDATE, DELETE, and DDL are provided as optional, with each write operation disabled by default and requiring explicit enablement via its respective MYSQL_LEGACY_ALLOW_* flag, where UPDATE and DELETE always require a WHERE clause. The connection pool is configured via MYSQL_LEGACY_POOL_SIZE, is small in scale, and does not rely on CTEs, JSON functions, or modern metadata columns.

Usage Installation is always via npm and runs locally over stdio with the command npx -y mysql-legacy-mcp. Node.js 18.14.1 or higher is required, and a dedicated MySQL account with only the necessary read and metadata permissions is recommended. For configuration across different clients (such as Claude Desktop, Codex, VS Code, Windsurf, Gemini, Trae, Qoder, etc.), refer to the installation guide in the project. The official MCP Registry is a machine-readable source that includes environment variable metadata from server.json, allowing clients that support the registry to prefill configuration from it.

Use Cases and Verification Status The project originated from a QA/full-stack workflow that needed AI-assisted inspection of a production MySQL 5.1 database, so it is positioned as a focused tool for exploring legacy schemas and preparing migrations. Live MCP testing covers MySQL 5.0.51a, 5.1.73, 5.5.62, and 5.6.51; each test target passed all 11 tools (7 read-only tools plus 4 optional write tools) in a real MCP stdio session, and separately verified both cases where the MYSQL_LEGACY_ALLOW_* flags remained false by default and where they were explicitly enabled. On MySQL 5.6.5 and higher, the actual START TRANSACTION READ ONLY path used by mysql_legacy_select was also tested; below that version, the silent ordinary query fallback path was tested. The exact sources, test conditions, and MySQL 8.0 boundary are recorded in the compatibility audit.

Limitations The tool does not provide TLS configuration and does not support custom authentication or charset options. Its verification scope does not cover pre-4.1 old_password, custom connection charsets, TLS, or the exact patch level of the user's server. Scenarios requiring TLS or modern MySQL features should choose a modern MCP server; this project is differentiated from them by compatibility rather than a performance benchmark.

Troubleshooting Tips If you encounter ER_NOT_SUPPORTED_AUTH_MODE, HANDSHAKE_INSECURE_AUTH, Old password authentication is not supported, legacy TLS errors, or cp1251/latin1 text mojibake, it is recommended to first read the project's troubleshooting documentation; not all of these symptoms can be resolved by this package.