mcp-mysql-server
If you are the rightful owner of mcp-mysql-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 interacting with a MySQL database, allowing MCP clients to query and modify data.
The MySQL MCP Server is designed to facilitate interaction between MCP clients and a MySQL database. It allows clients, such as AI assistants, to perform both read and write operations on a configured MySQL database. The server connects using standard MySQL connection parameters and communicates over standard input/output. It supports read-only queries like SELECT, SHOW, and DESCRIBE, and can also handle write operations such as INSERT, UPDATE, and DELETE, provided the environment variable MYSQL_ALLOW_WRITE_OPS is set to true. This server is particularly useful for applications that require dynamic data interaction with a MySQL database, offering a structured and secure way to execute SQL commands.
Features
- Connects to a MySQL database using standard connection parameters.
- Provides MCP tools for executing SQL queries and statements.
- Supports read-only queries (SELECT, SHOW, DESCRIBE).
- Supports write operations (INSERT, UPDATE, DELETE) via separate tools, gated by an environment variable (MYSQL_ALLOW_WRITE_OPS).
- Communicates over standard input/output (stdio).
Tools
query
Executes a read-only SQL query (SELECT, SHOW, DESCRIBE) against the configured database.
insert
Executes an INSERT SQL statement. Requires MYSQL_ALLOW_WRITE_OPS to be set to true.
update
Executes an UPDATE SQL statement. Requires MYSQL_ALLOW_WRITE_OPS to be set to true.
delete
Executes a DELETE SQL statement. Requires MYSQL_ALLOW_WRITE_OPS to be set to true.