mysql

v1.0.7
io.github.marcelo-ochoa/mysql Checked 13 hours ago Published 8 months ago

An MCP server for MySQL databases.

These tools were reported by the server itself during our smoke test (tools/list), not copied from the README.

mysql-query

This tool executes SQL queries in a READ ONLY session connected to a MySQL database. If no active connection exists, it uses MCP server registration argument and environment variables MYSQL_USER and MYSQL_PASSWORD. You should: Execute the provided SQL query. Return the results in Toon format. Args: sql: The SQL query to execute. The `model` argument should specify only the name and version of the LLM (Large Language Model) you are using, with no additional information. The `mcp_client` argument should specify only the name of the MCP (Model Context Protocol) client you are using, wit…

ParameterTypeDescription
mcp_client *stringSpecify the name and version of the MCP client implementation being used (e.g. Copilot, Claude, Cline...)
model *stringThe name (and version) of the language model being used by the MCP client to process requests (e.g. gpt-4.1, claude-sonnet-4, llama4...)
sql *stringThe SQL query to execute

mysql-stats

Get comprehensive statistics for a specific MySQL table. This tool retrieves detailed information including row counts, table size, index information, column statistics, and other metadata that can help optimize queries and understand data distribution. Args: name: The name of the table to get statistics for. The `model` argument should specify only the name and version of the LLM (Large Language Model) you are using, with no additional information. The `mcp_client` argument should specify only the name of the MCP (Model Context Protocol) client you are using, with no additional informati…

ParameterTypeDescription
name *stringThe name of the table to get statistics for
mcp_clientstringSpecify the name and version of the MCP client implementation being used (e.g. Copilot, Claude, Cline...)
modelstringThe name (and version) of the language model being used by the MCP client to process requests (e.g. gpt-4.1, claude-sonnet-4, llama4...)

mysql-explain

Generate and display the execution plan for a given SQL query using MySQL's EXPLAIN command. This tool helps you understand how MySQL will execute your query, including information about table scans, joins, indexes used, and estimated costs. Args: sql: The SQL query to explain. The `model` argument should specify only the name and version of the LLM (Large Language Model) you are using, with no additional information. The `mcp_client` argument should specify only the name of the MCP (Model Context Protocol) client you are using, with no additional information. Returns: Detailed executi…

ParameterTypeDescription
mcp_client *stringSpecify the name and version of the MCP client implementation being used (e.g. Copilot, Claude, Cline...)
model *stringThe name (and version) of the language model being used by the MCP client to process requests (e.g. gpt-4.1, claude-sonnet-4, llama4...)
sql *stringThe SQL query to explain

mysql-connect

Provides an interface to connect to a specified MySQL database. If a database connection is already active, the tool will close the existing connection before establishing a new one. This tool accepts three required parameters: connectionString: The MySQL connection string without embedded credentials (e.g., mysql://host:port/dbname or host:port/dbname) user: The MySQL username password: The MySQL password The credentials are stored in environment variables MYSQL_USER and MYSQL_PASSWORD for the session. The `model` argument should only be used to specify the name and version of the LLM…

ParameterTypeDescription
connectionString *stringThe MySQL connection string (e.g. mysql://host:port/dbname or host:port/dbname)
password *stringThe MySQL password
user *stringThe MySQL user (e.g. root)
mcp_clientstringSpecify the name and version of the MCP client implementation being used (e.g. Copilot, Claude, Cline...)
modelstringThe name (and version) of the language model being used by the MCP client to process requests (e.g. gpt-4.1, claude-sonnet-4, llama4...)

mysql-awr

Generate a MySQL performance report similar to Oracle AWR. Includes database statistics, InnoDB metrics, top queries (requires performance_schema), table/index statistics, connection info, and optimization recommendations.

ParameterTypeDescription
mcp_clientstringSpecify the name and version of the MCP client implementation being used (e.g. Copilot, Claude, Cline...)
modelstringThe name (and version) of the language model being used by the MCP client to process requests (e.g. gpt-4.1, claude-sonnet-4, llama4...)