An MCP server for querying PostgreSQL and MySQL databases, currently at version 1.0.6. It enables AI assistants in editors like Cursor and Windsurf to explore database schemas, execute queries, and generate database-aware code. The server connects to PostgreSQL and MySQL databases via environment variables, supports connection pooling, parameterized queries, and auto-connect on startup. It can be run directly with npx without installation. Release cadence is not documented; it's a single-instance server intended for local or dev use. Differentiates from other MCP servers by supporting both PostgreSQL and MySQL in one package, with a simple configuration model.
npm install postgres-mysql-mcp-serverNo compatibility data collected yet for this library.
Verified import paths — ran on the pinned version, not inferred.
Configures and runs the MCP SQL server with npx, connecting to a PostgreSQL database via environment variables.
Use .env files or secure secret management; avoid hardcoding credentials in JSON config.
Pin version (e.g., `npx postgres-mysql-mcp-server@1.0.6`) to avoid unexpected updates.
You don't need to import the SDK; just run `npx postgres-mysql-mcp-server` directly.
Set DB_TYPE to either 'postgresql' or 'mysql' in your environment.
Ensure database is running and accessible; check DB_HOST and DB_PORT values.