Read MySQL
About
Access MySQL databases to inspect schemas and execute SQL queries via a NodeJS-based server.
Details
- Author
- benborla
- Repository
- benborla/mcp-server-mysql
- GitHub stars
- 279
- Downloads
- 31,345
- License
- MIT License
- Categories
- Database, Other, Design, Developer Tools, AI, Security, Frontend
- Tags
- #mobile
Jump to
- Read-only by default — write operations opt-in via env flags
- Claude Code integration — optimized for Anthropic's Claude Code CLI
- SSH tunnel support — built-in support for remote databases
- Multi-DB mode — query across multiple databases without reconnecting
- Schema-specific permissions — per-database read/write control
- PII redaction — automatic masking of sensitive data in results
- Remote mode — HTTP transport with bearer token auth
- SSL/TLS support — encrypted connections with mTLS option
Setting up with Highlight
This MCP is not yet compatible with Highlight’s one-click setup. However, you can still use it with Highlight by following these steps:
- Download and install Highlight from highlightai.com/download
- Navigate to the plugins tab and select "Add Custom Plugin"
-
Configure the plugin with the settings below
Plugin Name
Read MySQLCommand (node, npx, python, etc.)npxArguments-
Argument 1
-y -
Argument 2
@benborla29/mcp-server-mysql
Environment-
MYSQL_DB
your_database -
MYSQL_HOST
127.0.0.1 -
MYSQL_PASS
your_password -
MYSQL_PORT
3306 -
MYSQL_USER
root
Please refer to the README for specific instructions on how to obtain API keys or other required environment variables.
-
Argument 1
- Enable "Start Automatically" if you want the plugin to start when Highlight launches
From the repository
Claude Code (simplest):
claude mcp add mcp_server_mysql \
-e MYSQL_HOST="127.0.0.1" \
-e MYSQL_PORT="3306" \
-e MYSQL_USER="root" \
-e MYSQL_PASS="your_password" \
-e MYSQL_DB="your_database" \
-- npx @benborla29/mcp-server-mysql
Claude Desktop / other clients:
{
"mcpServers": {
"mcp_server_mysql": {
"command": "npx",
"args": ["-y", "@benborla29/mcp-server-mysql"],
"env": {
"MYSQL_HOST": "127.0.0.1",
"MYSQL_PORT": "3306",
"MYSQL_USER": "root",
"MYSQL_PASS": "your_password",
"MYSQL_DB": "your_database"
}
}
}
}
All write operations are disabled by default. Enable with ALLOW_INSERT_OPERATION=true, ALLOW_UPDATE_OPERATION=true, ALLOW_DELETE_OPERATION=true.
mysql_query
Execute SQL queries. Read-only by default. Write operations enabled per flag.
Claude Desktop / Cursor
Paste into your MCP client config file to install this server.
{
"mcpServers": {
"read mysql": {
"env": {
"MYSQL_DB": "your_database",
"MYSQL_HOST": "127.0.0.1",
"MYSQL_PASS": "your_password",
"MYSQL_PORT": "3306",
"MYSQL_USER": "root"
},
"args": [
"-y",
"@benborla29/mcp-server-mysql"
],
"command": "npx"
}
}
}
Linux
{
"env": {
"MYSQL_DB": "your_database",
"MYSQL_HOST": "127.0.0.1",
"MYSQL_PASS": "your_password",
"MYSQL_PORT": "3306",
"MYSQL_USER": "root"
},
"args": [
"-y",
"@benborla29/mcp-server-mysql"
],
"command": "npx"
}
Macos
{
"env": {
"MYSQL_DB": "your_database",
"MYSQL_HOST": "127.0.0.1",
"MYSQL_PASS": "your_password",
"MYSQL_PORT": "3306",
"MYSQL_USER": "root"
},
"args": [
"-y",
"@benborla29/mcp-server-mysql"
],
"command": "npx"
}
Windows
{
"env": {
"MYSQL_DB": "your_database",
"MYSQL_HOST": "127.0.0.1",
"MYSQL_PASS": "your_password",
"MYSQL_PORT": "3306",
"MYSQL_USER": "root"
},
"args": [
"/c",
"npx",
"-y",
"@benborla29/mcp-server-mysql"
],
"command": "cmd"
}
Sign in to leave a review
Use Google, GitHub, or an email account so ratings stay tied to real people.
No reviews posted yet.





