mysql-mcp-server
v0.4.5A Model Context Protocol (MCP) server that enables secure interaction with MySQL databases.
These tools were reported by the server itself during our smoke test (tools/list), not copied from the README.
execute_sql
Execute a SQL statement against the MySQL server. Use for SELECT, DML (INSERT/UPDATE/DELETE), SHOW, DESCRIBE, and ad-hoc queries. Supports cross-database queries using database.table notation. Single statements only — use fully qualified names instead of USE statements.
| Parameter | Type | Description |
|---|---|---|
query * | string | The SQL statement to execute. Single statements only. |
get_schema_info
Get column metadata for a table or all tables in the configured database: column names, data types, nullability, default values, and comments. Call this before querying an unfamiliar table. Omit table_name to see all tables at once. Accepts bare table names (uses MYSQL_DATABASE) or database.table for cross-database lookups.
| Parameter | Type | Description |
|---|---|---|
table_name | string | Optional: bare table name, or database.table for a cross-database lookup. |
get_table_sample
Fetch a small sample of rows from a table to understand its data format and content. Use alongside get_schema_info before writing complex queries. Accepts bare table names (uses MYSQL_DATABASE) or database.table for cross-database lookups.
| Parameter | Type | Description |
|---|---|---|
table_name * | string | Table to sample. Use database.table notation for cross-database queries. |
limit | integer | Number of rows to return (default 5, max 20). |