An MCP server that allows working with MySQL databases by providing tools for executing read-only SQL queries, getting table schemas, and listing database tables.
This project implements an MCP (Model Context Protocol) server for working with MySQL database.
This project is available on GitHub: https://github.com/vitalyDV/mysql-mcp
git clone https://github.com/vitalyDV/mysql-mcp.git cd mysql-mcp npm install
{ "mcpServers": { "mysql_mcp_readonly": { "command": "node", "args": [ "./mysql-mcp/index.js" ], "env": { "MYSQL_HOST": "127.0.0.1", "MYSQL_PORT": "3306", "MYSQL_USER": "root", "MYSQL_PASS": "", "MYSQL_DB": "db", } } } }
MYSQL_HOST
- MySQL server hostMYSQL_PORT
- MySQL server portMYSQL_USER
- MySQL usernameMYSQL_PASS
- MySQL passwordMYSQL_DB
- MySQL database namequery
- execute SQL queries (only SELECT, SHOW, EXPLAIN, DESCRIBE)table-schema
- get table structurelist-tables
- get list of all tables in the databasetable://{name}
- get data from the specified table (up to 100 rows)Discover shared experiences
Shared threads will appear here, showcasing real-world applications and insights from the community. Check back soon for updates!