MySQL MCP Server
by arifulislamatio.github.arifulislamat/database-mcp-mysqlv0.4.2
MCP server for MySQL. Read-only by default, row caps, statement timeouts, secrets never logged.
context tax
queued
security
queued
cold start
queued
freshness
Maintained3mo ago
Install MySQL MCP server
Install in Claude Code
claude mcp add mysql-arifulislamat -e MYSQL_HOST='<mysql-host>' -e MYSQL_USER='<mysql-user>' -e MYSQL_PASSWORD='<mysql-password>' -e MYSQL_DATABASE='<mysql-database>' -- npx -y @database-mcp/mysqlInstall in Cursor
{
"mcpServers": {
"mysql-arifulislamat": {
"command": "npx",
"args": [
"-y",
"@database-mcp/mysql"
],
"env": {
"MYSQL_HOST": "<mysql-host>",
"MYSQL_USER": "<mysql-user>",
"MYSQL_PASSWORD": "<mysql-password>",
"MYSQL_DATABASE": "<mysql-database>"
}
}
}
}Add to ~/.cursor/mcp.json (global) or .cursor/mcp.json (project).
Install in Claude Desktop
{
"mcpServers": {
"mysql-arifulislamat": {
"command": "npx",
"args": [
"-y",
"@database-mcp/mysql"
],
"env": {
"MYSQL_HOST": "<mysql-host>",
"MYSQL_USER": "<mysql-user>",
"MYSQL_PASSWORD": "<mysql-password>",
"MYSQL_DATABASE": "<mysql-database>"
}
}
}
}Settings → Developer → Edit Config (claude_desktop_config.json), then restart.
Install in VS Code
{
"servers": {
"mysql-arifulislamat": {
"type": "stdio",
"command": "npx",
"args": [
"-y",
"@database-mcp/mysql"
],
"env": {
"MYSQL_HOST": "<mysql-host>",
"MYSQL_USER": "<mysql-user>",
"MYSQL_PASSWORD": "<mysql-password>",
"MYSQL_DATABASE": "<mysql-database>"
}
}
}
}Add to .vscode/mcp.json in your workspace.
Install in Windsurf
{
"mcpServers": {
"mysql-arifulislamat": {
"command": "npx",
"args": [
"-y",
"@database-mcp/mysql"
],
"env": {
"MYSQL_HOST": "<mysql-host>",
"MYSQL_USER": "<mysql-user>",
"MYSQL_PASSWORD": "<mysql-password>",
"MYSQL_DATABASE": "<mysql-database>"
}
}
}
}Add to ~/.codeium/windsurf/mcp_config.json.
Configuration
| Variable | Required | Secret | Description |
|---|---|---|---|
| MYSQL_HOST | yes | — | Database host |
| MYSQL_USER | yes | — | Database user (a read-only user is recommended) |
| MYSQL_PASSWORD | — | yes | Database password (or use MYSQL_PASSWORD_FILE) |
| MYSQL_DATABASE | yes | — | Database name |
Freshness
Maintained — last maintenance signal 3mo ago. The newest of the signals below sets the band.
Last commit (default branch)
2026-07-17 · 3mo ago · GitHub
Latest release
2026-07-16 · 3mo ago · GitHub · postgres-ts-v0.4.2
Package published
no data · npm/PyPI
Registry entry updated
2026-07-16 · 3mo ago · official registry · v0.4.2
FAQ
›How do I install the MySQL MCP server in Claude Code?
Run: claude mcp add mysql-arifulislamat -e MYSQL_HOST='<mysql-host>' -e MYSQL_USER='<mysql-user>' -e MYSQL_PASSWORD='<mysql-password>' -e MYSQL_DATABASE='<mysql-database>' -- npx -y @database-mcp/mysql. For Cursor, VS Code, Claude Desktop and Windsurf, use the install tabs above.
›Does MySQL require an API key?
Yes. It expects MYSQL_HOST, MYSQL_USER, MYSQL_DATABASE, MYSQL_PASSWORD, of which 1 is a secret.
›Can I use MySQL as a remote (hosted) MCP server?
No hosted endpoint is published; it runs locally over stdio.
›Is MySQL in the official MCP registry?
Yes, as io.github.arifulislamat/database-mcp-mysql.
Alternatives to MySQL
Other database MCP servers.