myheisenberg/mysql-mcp-server
If you are the rightful owner of mysql-mcp-server and would like to certify it and/or have it hosted online, please leave a comment on the right or send an email to henry@mcphub.com.
A Model Context Protocol (MCP) server for MySQL database operations, enabling seamless interaction with MySQL databases through any MCP-compatible client.
The MySQL MCP Server is a robust solution designed to facilitate database operations using the Model Context Protocol. Built with TypeScript, this server offers a secure and efficient way to interact with MySQL databases. It supports executing SQL queries, listing databases and tables, and describing table structures. The server is configured through environment variables, ensuring no hardcoded credentials are used, enhancing security. Connection pooling is implemented to maintain efficient and secure database connections. The server is compatible with various MCP clients, making it versatile for different development environments. With a focus on security and performance, the MySQL MCP Server is an ideal choice for developers looking to integrate MySQL database operations into their applications seamlessly.
Features
- Execute SQL Queries: Run any SELECT, INSERT, UPDATE, DELETE commands.
- List Databases: View all available databases on the server.
- List Tables: Show tables in any specified database.
- Describe Tables: Get detailed information about a table's structure.
- Secure Configuration: Environment-based setup with no hardcoded credentials.
Usages
usage with claude desktop
{ "mcpServers": { "mysql": { "command": "node", "args": ["path/to/mysql-mcp-server/dist/index.js"], "env": { "DB_HOST": "localhost", "DB_USER": "your_username", "DB_PASSWORD": "your_password", "DB_PORT": "3306" } } } }
usage with cursor ide
{ "mcpServers": { "mysql": { "command": "node", "args": ["path/to/mysql-mcp-server/dist/index.js"], "env": { "DB_HOST": "localhost", "DB_USER": "your_username", "DB_PASSWORD": "your_password", "DB_PORT": "3306" } } } }
Tools
mysql_query
Execute any MySQL query and get formatted results.
mysql_databases
List all available databases on the MySQL server.
mysql_tables
List all tables in a specific database.
mysql_describe
Get detailed information about a table's structure.