Install
$ agentstack add mcp-iamdylanngo-mysql-mcp-server ✓ scanned · ✓ verified — works with Claude Code, Cursor, and more.
Security review
✓ PassedNo issues found. Passed automated security review. · v0.1.0 How review works →
- ✓ Prompt-injection patterns
- ✓ Secret / credential exfiltration
- ✓ Dangerous shell & filesystem operations
- ✓ Untrusted network calls
- ✓ Known-malicious package signatures
What it can access
- ✓ Network access No
- ✓ Filesystem access No
- ✓ Shell / process execution No
- ● Environment & secrets Used
- ✓ Dynamic code execution No
From automated source analysis of v0.1.0. “Used” means the capability is present in the source — more access means more to trust, not that it’s unsafe.
About
MySQL MCP Server
A Model Context Protocol (MCP) server that connects Claude (or any MCP-compatible client) to a MySQL database. It exposes tools for schema inspection and running read/write queries over a stdio transport.
Tools
| Tool | Description | |------|-------------| | select_mysql_version | Returns the connected MySQL server version | | list_tables | Lists all tables in the connected database | | describe_table | Shows columns, types, and constraints for a given table | | query | Runs a read-only SELECT query with optional ? placeholder params | | mutate | Runs an INSERT, UPDATE, or DELETE statement with optional params |
> Note: mutate rejects SELECT statements — use query for reads.
Requirements
- Node.js 18+
- A running MySQL instance
Quick Install (Recommended)
1. Download the plugin
Go to the Releases page and download the latest .mcpb file (e.g. mysql-mcp-server-v1.0.1.mcpb).
2. Install the plugin
Via Claude Code CLI:
claude plugin install mysql-mcp-server-v1.0.1.mcpb
Via Claude Desktop:
Double-click the .mcpb file — Claude Desktop will prompt you to install it.
3. Configure your database connection
After installation, Claude will prompt you to fill in your connection details:
| Field | Default | Description | |-------|---------|-------------| | Database Host | 127.0.0.1 | MySQL hostname or IP | | Database Port | 3306 | MySQL port | | Database User | root | MySQL username | | Database Password | (empty) | MySQL password | | Database Name | (required) | Database to connect to | | Connection Pool Limit | 10 | Max concurrent connections |
You can update these settings at any time in Claude's plugin settings under MySQL MCP Server.
Manual Setup (from source)
1. Clone and install dependencies
git clone https://github.com/iamdylanngo/mysql-mcp-server
cd mcp
npm install
2. Configure environment
Copy the sample env file and fill in your database credentials:
cp .env.sample .env
DB_HOST=127.0.0.1
DB_PORT=3306
DB_USER=root
DB_PASSWORD=root
DB_NAME=mydb
DB_POOL_LIMIT=10
3. Build
npm run build
Usage
Run directly
node --env-file=.env build/index.js
Inspect with MCP Inspector
npm run mcp
Connect to Claude Desktop
Add the following to your claude_desktop_config.json:
{
"mcpServers": {
"mysql": {
"command": "node",
"args": ["/[absolute-path]/mysql-mcp-server/build/index.js"],
"env": {
"DB_HOST": "127.0.0.1",
"DB_PORT": "3306",
"DB_USER": "root",
"DB_PASSWORD": "your_password",
"DB_NAME": "your_database",
"DB_POOL_LIMIT": "10"
}
}
}
}
Environment Variables
| Variable | Default | Description | |----------|---------|-------------| | DB_HOST | localhost | MySQL host | | DB_PORT | 3306 | MySQL port | | DB_USER | root | MySQL user | | DB_PASSWORD | (empty) | MySQL password | | DB_NAME | mydb | Database name | | DB_POOL_LIMIT | 10 | Connection pool size |
Tech Stack
- MCP SDK — MCP server framework
- mysql2 — MySQL client with promise support
- Zod — Input schema validation
- TypeScript
License
[MIT](./LICENSE)
Source & license
This open-source MCP server is cataloged on AgentStack and links to its original source — we do not rehost the code.
- Author: iamdylanngo
- Source: iamdylanngo/mysql-mcp-server
- License: MIT
Install and usage instructions live in the source repository linked above.
Reviews
No reviews yet — be the first.
Write a review
Versions
- v0.1.0 Imported from the upstream source.