Registry / database / pmlrjyrk-mysql-mcp

pmlrjyrk-mysql-mcp

JSON →
library1.0.2jsnpmunverified

MCP Server for MySQL database schema inspection and interaction. Current stable version is 1.0.2, released with weekly cadence. It provides tools for listing tables, describing table structure, retrieving full schema, generating TypeScript types, and executing read-only queries. Differentiators include native MCP protocol support, simple environment variable configuration, and integration with Codex, Claude Code, Cursor, VS Code, Windsurf, and OpenCode. It is a lightweight alternative to Prisma or TypeORM for AI-assisted database exploration.

npm install pmlrjyrk-mysql-mcp
INSTALL
IMPORT
SIG · PMLRJYRK-MYSQL-MCP
P
pmlrjyrk-mysql-mcp
databasejavascriptv1.0.2
harness data pending
Install & Compatibility
Where this runs

No compatibility data collected yet for this library.

Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

default import (MCP server instance)
npx -y pmlrjyrk-mysql-mcp
npx pmlrjyrk-mysql-mcp (install globally)
Use npx -y to auto-accept package installation. Avoid global install unless specifically needed for CLI tools.
Codex config
Add to ~/.codex/config.toml with command and args as shown in README
Adding incorrect JSON instead of TOML configuration
Codex expects TOML format for MCP server configuration, not JSON.
Claude .mcp.json
Add MCP server entry with command, args, and type: 'stdio'
Missing type field or incorrect command path
The type must be 'stdio' for this package. Do not use environment variables inside args.

Run the MySQL MCP server with environment variables set; server starts and listens on stdio for MCP commands.

npx -y pmlrjyrk-mysql-mcp
Debug
Known issues
gotchaMYSQL_PASSWORD is required; server will fail to connect if not set
fix
Set MYSQL_PASSWORD environment variable or ensure mysql connection without password if allowed.
affects: >=1.0.0
gotchaServer runs as stdio process; may conflict with parallel MCP servers if same transport
fix
Ensure unique transport configuration when running multiple MCP servers.
affects: >=1.0.0
gotchaPackage is unknown; be cautious with third-party MCP servers from untrusted sources
fix
Review source code or pin version to avoid supply chain risks.
affects: *
Errors
Common errors & fixes
Error: Cannot find module '@modelcontextprotocol/sdk'
Missing dependency when running via npx without auto-install
fix
Use npx -y pmlrjyrk-mysql-mcp to auto-install dependencies.
Error: getaddrinfo ENOTFOUND localhost
MYSQL_HOST set to 'localhost' but MySQL not running locally
fix
Set MYSQL_HOST to the correct hostname or IP of your MySQL server.
Error: ER_ACCESS_DENIED_ERROR: Access denied for user 'root'@'localhost'
Incorrect MYSQL_PASSWORD or user privileges
fix
Verify MYSQL_USER and MYSQL_PASSWORD environment variables are correct.
Error: Cannot connect to database 'undefined'
MYSQL_DATABASE not set
fix
Set MYSQL_DATABASE environment variable to your database name.
Upgrade
Version history
1.0.2latest on npm
Audit
Dependencies
@modelcontextprotocol/sdkrequiredMCP server protocol implementation
mysql2requiredMySQL database driver for Node.js
Agent activity
4 hits · last 30 days
node
4
Resources
pmlrjyrk-mysql-mcp — npm install pmlrjyrk-mysql-mcp · libregistry