Loading...
pip install mysql-mcp-server{
"mcpServers": {
"mysql": {
"command": "uv",
"args": [
"--directory",
"path/to/mysql_mcp_server",
"run",
"mysql_mcp_server"
],
"env": {
"MYSQL_HOST": "localhost",
"MYSQL_PORT": "3306",
"MYSQL_USER": "your_username",
"MYSQL_PASSWORD": "your_password",
"MYSQL_DATABASE": "your_database"
}
}
}
}list_tablesLists available tables in the connected MySQL database.
Read-only operation that does not modify data.
read_tableReads the contents of a specified table.
Read-only operation; retrieves data without modification.
execute_queryExecutes a provided SQL query against the database.
Can potentially modify or delete data, depending on the query.
This server is relatively safe for read operations and simple queries when properly configured with restricted user permissions. However, it becomes risky when executing complex or user-provided SQL queries without proper input validation and query whitelisting.