MCP MySQL Server provides a standardized interface for AI models to interact with MySQL databases, enabling operations like executing queries, listing tables, and describing table structures. Built by f4ww4z, it leverages the Model Context Protocol SDK and mysql2 library to offer secure database connections with prepared statements to prevent SQL injection. The server handles connection management automatically, provides comprehensive error handling, and can be easily configured through environment variables, making it ideal for AI workflows that require database access without leaving the conversation context.
暂无评论. 成为第一个评论的人!
登录以参与讨论
Establish connection to MySQL database using provided credentials. Parameters: host (string), user (string), password (string), database (string)
Execute SELECT queries with optional prepared statement parameters. Parameters: sql (string), params (array of mixed)
Execute INSERT, UPDATE, or DELETE queries with optional prepared statement parameters. Parameters: sql (string), params (array of mixed)
List all tables in the connected database. Parameters: none
Get the structure of a specific table. Parameters: table (string)