MCP server for MySQL that enables Cursor and other MCP clients to interact with MySQL databases via config file or environment variables. Current stable version is 1.2.0. Release cadence is irregular. Key differentiators: read-only protection for production connections, full EXPLAIN support, server-side query timeout via MAX_EXECUTION_TIME hint, and automatic LIMIT on SELECT queries. Ships TypeScript types.
npm install mysql-mcp-toolkitNo compatibility data collected yet for this library.
Verified import paths — ran on the pinned version, not inferred.
Shows how to configure and run the MySQL MCP server with a config file and integrate with Cursor.
Run `npx -y mysql-mcp-toolkit init` to generate the new JSON config and replace old credentials.
Use import syntax or dynamic import(). For CJS projects, use dynamic require with await import() or switch to ESM.
Replace all placeholder values in the config file with actual credentials.
Set MYSQL_READ_ONLY to 'false' or omit to allow writes.
Sanitize identifiers before passing them as arguments.
Use 'execute_query' instead of 'run_sql'.
Edit config file and replace any field containing 'your-' with actual values.
Use import syntax or set type: 'module' in package.json.
Use ? placeholders in SQL and pass parameters as an array in the 'params' option.
Set MYSQL_READ_ONLY to false or connect to a non-read-only connection.
Use only alphanumeric characters, dollar signs, hyphens, and unicode letters. No backticks.