MySQL MCP Server
This project implements an MCP (Model Context Protocol) server for working with MySQL database.
Repository
This project is available on GitHub: https://github.com/vitalyDV/mysql-mcp
Clone the repository
Copy
add config to mcp.json
Copy
Environment Variables
MYSQL_HOST
- MySQL server hostMYSQL_PORT
- MySQL server portMYSQL_USER
- MySQL usernameMYSQL_PASS
- MySQL passwordMYSQL_DB
- MySQL database name
Available MCP tools
query
- execute SQL queries (only SELECT, SHOW, EXPLAIN, DESCRIBE)table-schema
- get table structurelist-tables
- get list of all tables in the database
Available MCP resources
table://{name}
- get data from the specified table (up to 100 rows)
This server cannot be installed
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.