MySQL MCP for VS Code
io.github.gistrec/mcp-mysql-client
MCP server for one MySQL database: schema, read-only queries and guarded writes.
client:VS Code
transport:stdio
runtime:npm
Install MySQL MCP in VS Code
.vscode/mcp.json
{
"inputs": [
{
"type": "promptString",
"id": "mysql-host",
"description": "MYSQL_HOST",
"password": true
},
{
"type": "promptString",
"id": "mysql-port",
"description": "MYSQL_PORT",
"password": true
},
{
"type": "promptString",
"id": "mysql-user",
"description": "MYSQL_USER",
"password": true
},
{
"type": "promptString",
"id": "mysql-pass",
"description": "MYSQL_PASS",
"password": true
},
{
"type": "promptString",
"id": "mysql-db",
"description": "MYSQL_DB",
"password": true
},
{
"type": "promptString",
"id": "mysql-ssl",
"description": "MYSQL_SSL",
"password": true
},
{
"type": "promptString",
"id": "mysql-ssl-ca",
"description": "MYSQL_SSL_CA",
"password": true
},
{
"type": "promptString",
"id": "allow-insert-operation",
"description": "ALLOW_INSERT_OPERATION",
"password": true
},
{
"type": "promptString",
"id": "allow-update-operation",
"description": "ALLOW_UPDATE_OPERATION",
"password": true
},
{
"type": "promptString",
"id": "allow-delete-operation",
"description": "ALLOW_DELETE_OPERATION",
"password": true
},
{
"type": "promptString",
"id": "mysql-max-rows",
"description": "MYSQL_MAX_ROWS",
"password": true
},
{
"type": "promptString",
"id": "mysql-timeout-ms",
"description": "MYSQL_TIMEOUT_MS",
"password": true
}
],
"servers": {
"mcp-mysql-client": {
"type": "stdio",
"command": "npx",
"args": [
"-y",
"mcp-mysql-client"
],
"env": {
"MYSQL_HOST": "${input:mysql-host}",
"MYSQL_PORT": "${input:mysql-port}",
"MYSQL_USER": "${input:mysql-user}",
"MYSQL_PASS": "${input:mysql-pass}",
"MYSQL_DB": "${input:mysql-db}",
"MYSQL_SSL": "${input:mysql-ssl}",
"MYSQL_SSL_CA": "${input:mysql-ssl-ca}",
"ALLOW_INSERT_OPERATION": "${input:allow-insert-operation}",
"ALLOW_UPDATE_OPERATION": "${input:allow-update-operation}",
"ALLOW_DELETE_OPERATION": "${input:allow-delete-operation}",
"MYSQL_MAX_ROWS": "${input:mysql-max-rows}",
"MYSQL_TIMEOUT_MS": "${input:mysql-timeout-ms}"
}
}
}
}
VS Code prompts for each input the first time the server starts, so no secret is written to the file. VS Code docs