Registry / database / mcpp-mysql

mcpp-mysql

JSON →
library1.1.0jsnpmunverified

MCPP MySQL is an MCP (Model Context Protocol) server that enables AI assistants (e.g., Cursor, Claude) to directly interact with MySQL databases. Version 1.1.0 supports direct connections and SSH tunnels for private databases like Alibaba Cloud RDS. It provides tools for listing databases/tables, describing schemas, executing read/write queries, and creating tables. Security features include 30s query timeout, 500-row limit, mandatory WHERE clause for UPDATE/DELETE, and blocking DROP/TRUNCATE. Requires an access key from https://mcp.hxstudio.website and Node.js >=18. ESM-only, ships TypeScript types.

npm install mcpp-mysql
INSTALL
IMPORT
SIG · MCPP-MYSQL
M
mcpp-mysql
databasejavascriptv1.1.0
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.

mcpp-mysql
npx -y mcpp-mysql (no programmatic import, used as CLI/MCP server)
import mcpp from 'mcpp-mysql' or const mcpp = require('mcpp-mysql')
This package is an MCP server binary, not a library. It is invoked via npx or installed globally and configured as an MCP server in your tool's config file.

Minimal configuration to connect mcpp-mysql to a MySQL database via MCP server config.

{ "mcpServers": { "mysql": { "command": "npx", "args": ["-y", "mcpp-mysql"], "env": { "MCP_ACCESS_KEY": "your-access-key", "MYSQL_HOST": "localhost", "MYSQL_PORT": "3306", "MYSQL_USER": "root", "MYSQL_PASSWORD": "your_password", "MYSQL_DATABASE": "your_database" } } } }
Debug
Known issues
gotchaMCP_ACCESS_KEY is required; without it the server will fail to start.
fix
Obtain a valid access key from https://mcp.hxstudio.website and set it in the MCP_ACCESS_KEY environment variable.
affects: >=1.0.0
gotchaUPDATE/DELETE queries must include a WHERE clause; otherwise they are rejected.
fix
Always add a WHERE condition to UPDATE/DELETE statements. Example: UPDATE users SET name='test' WHERE id=1.
affects: >=1.0.0
breakingDROP/TRUNCATE operations are disabled by default.
fix
Use write_query with INSERT/UPDATE/DELETE only. For DDL operations, connect directly via mysql client.
affects: >=1.0.0
deprecatedNot applicable; no deprecated features known in current version.
affects: >=1.0.0
Errors
Common errors & fixes
MCP_ACCESS_KEY is not set
Missing required environment variable MCP_ACCESS_KEY.
fix
Set MCP_ACCESS_KEY in the env section of your MCP configuration.
ETIMEDOUT: connection timed out
MySQL host/port unreachable (e.g., firewall, wrong host, or SSH tunnel not configured for private DB).
fix
Verify MYSQL_HOST and MYSQL_PORT are correct and accessible. For private databases, configure SSH tunnel variables.
ER_PARSE_ERROR: You have an error in your SQL syntax
Malformed SQL query sent to write_query or read_query.
fix
Check the SQL syntax. Use database-specific SQL standards.
Upgrade
Version history
1.1.0latest on npm
Audit
Dependencies
mysql2requiredMySQL client library for database connections
ssh2optionalSSH tunnel support for private databases
Agent activity
6 hits · last 30 days
node
6
Resources
mcpp-mysql — npm install mcpp-mysql · libregistry