Mysql Mcp — independently scanned and version-tracked by SaferSkills.
SaferSkills independently audited Mysql Mcp (Agent Skill) and scored it 96/100 (green). The audit ran 55 deterministic rules across Security, Supply Chain, Maintenance, Transparency, and Community; it found 0 high-severity and 1 lower-severity findings. The full rule-by-rule trace and per-finding evidence are below. Free, methodology-open.
Findings & checks · 1 flagged
A bulleted imperative like {match} tells the agent to never reveal, disclose, or mention something to the user. Used adversarially it can instruct the agent to hide its tool calls or lie about what it did — stripping the transparency a user relies on to trust the agent.
Every scanned point with the score it earned and what moved between them.
First recorded scan — no prior version to compare against.
The primary manifest — the file an agent reads to learn what this artifact does.
A comprehensive MySQL Model Context Protocol (MCP) server that provides database operations for Cursor IDE.
Before setting up this MySQL MCP server, ensure you have:
📁 Repository Note: This repository follows Node.js best practices by excludingnode_modules/anddist/folders. You'll generate these locally after cloning.
Important: This repository does not include node_modules/ or dist/ folders to keep it lightweight. You'll need to generate them:
git clone https://github.com/binoy154/mysql-mcp.git
cd mysql-mcp⚠️ Important Path Considerations:
C:/Projects/mysql-mcp or E:/mysql-mcp)YOUR_PATH/dist/index.js npm installThis will create the `node_modules/` folder with all required packages.
npm run buildThis will create the `dist/` folder with compiled JavaScript files.
cp .env.example .env
# Edit .env with your MySQL credentialsNote: You can also configure credentials directly in Cursor MCP settings.
🔧 IMPORTANT: Update the file path below with your actual clone location!
A single MCP server instance can switch between local, staging, preproduction and production environments at runtime. The local environment allows full read/write access, while staging, preproduction, and production are configured as read-only for safety. Supply their credentials through environment variables:
{
"mcpServers": {
"mysql": {
"command": "node",
"args": ["YOUR_ABSOLUTE_PATH/mysql-mcp/dist/index.js"],
"env": {
"MYSQL_LOCAL_HOST": "localhost",
"MYSQL_LOCAL_PORT": "3306",
"MYSQL_LOCAL_USER": "root",
"MYSQL_LOCAL_PASSWORD": "localPassword",
"MYSQL_LOCAL_DATABASE": "localDatabase",
"MYSQL_STAGING_HOST": "staging.db.example.com",
"MYSQL_STAGING_PORT": "3306",
"MYSQL_STAGING_USER": "staging_user",
"MYSQL_STAGING_PASSWORD": "staging_pw",
"MYSQL_STAGING_DATABASE": "staging_db",
"MYSQL_PREPRODUCTION_HOST": "preprod-db.example.com",
"MYSQL_PREPRODUCTION_PORT": "3306",
"MYSQL_PREPRODUCTION_USER": "preprod_user",
"MYSQL_PREPRODUCTION_PASSWORD": "preprod_pw",
"MYSQL_PREPRODUCTION_DATABASE": "preprod_db"
}
}
}
}📝 Path Examples - Replace `YOUR_ABSOLUTE_PATH/mysql-mcp` with:
"C:/Projects/mysql-mcp/dist/index.js""E:/mysql-mcp/dist/index.js""/home/username/mysql-mcp/dist/index.js"⚠️ Critical: Use forward slashes (/) even on Windows, and ensure the path points to where you actually cloned the repository.
Database Safety: The production credentials should point to a read-only slave or replica to guarantee safety. Additionally, staging and preproduction environments are enforced as read-only at the code level to prevent accidental data modifications.
local, staging, preproduction, production)Write operations & permission levels
| Tool | Local | Staging | Pre-production | Production |
|---|---|---|---|---|
insert_data, update_data, delete_data, execute_query | ✅ Immediate | ❌ READ-ONLY | ❌ READ-ONLY | ❌ READ-ONLY |
Note: Only the local environment allows write operations. All other environments (staging, preproduction, production) are configured as read-only for data safety and integrity.
Example (local only):
{
"name": "update_data",
"arguments": {
"table": "users",
"data": { "status": "active" },
"where": "id = 42"
}
}Use the connect_database tool with:
- host: localhost
- port: 3306
- user: myuser
- password: mypassword
- database: myapp_dbUse select_query with query: "SELECT * FROM users WHERE active = 1"Use insert_data with:
- table: "users"
- data: {"name": "John Doe", "email": "[email protected]"}Automatic PII Protection (Production Environment Only):
Environment Behavior:
Example Output in Production:
{
"id": 1,
"name": "John Doe",
"email": "jo***@example.com",
"sin": "12*8",
"birth_date": "19**-**-**"
}Security Status Messages:
Simply copying the project folder to another computer will not work without proper setup.
git clone https://github.com/binoy154/mysql-mcp.git
cd mysql-mcp npm install npm run build"E:/mySqlMcp/dist/index.js" to the correct path on the new computer✅ Included in this repository:
src/ folder)package.json, tsconfig.json, README.md).gitignore (protects against accidentally committing large folders)🔨 What you need to build after cloning:
node_modules/ folder → Run npm installdist/ folder → Run npm run build⚙️ What you need to customize:
💡 Why this approach?
npm install to install dependenciesnpm run build to compile TypeScriptnpm install to create itnpm run build to create itGrant appropriate MySQL privileges:
GRANT SELECT, INSERT, UPDATE, DELETE ON your_database.* TO 'your_user'@'localhost';
FLUSH PRIVILEGES;npm install and npm run build completed successfully~30 seconds. Free. No account. Every finding cites a rule and a line of evidence.