MySQL MCP Server
Server Configuration
Describes the environment variables required to run the server.
| Name | Required | Description | Default |
|---|---|---|---|
| MYSQL_HOST | Yes | Database host | localhost |
| MYSQL_PORT | No | Database port (defaults to 3306 if not specified) | 3306 |
| MYSQL_USER | Yes | MySQL username | |
| MYSQL_DATABASE | Yes | MySQL database name | |
| MYSQL_PASSWORD | Yes | MySQL password |
Instructions
Guidance the server publishes about itself, which clients place ahead of the tool catalog so the model reads it before choosing anything.
This server publishes no instructions, or was last inspected before Glama recorded them.
Capabilities
Features and capabilities supported by this server
Protocol revision2025-11-25
| Capability | Details |
|---|---|
| tools | {
"listChanged": false
} |
| prompts | {
"listChanged": false
} |
| resources | {
"subscribe": false,
"listChanged": false
} |
| experimental | {} |
Tools
Functions exposed to the LLM to take actions
| Name | Description |
|---|---|
| execute_sqlA | 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. |
| get_schema_infoA | 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. |
| get_table_sampleA | 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. |
Prompts
Interactive templates invoked by user choice
| Name | Description |
|---|---|
| explore_database | Systematically explore the database: discover available tables, inspect their schemas, sample the data, and summarize what's there. |
| analyze_table | Deep-dive into a specific table: retrieve its schema, sample its data, and suggest useful queries. |
Resources
Contextual data attached and managed by the client
| Name | Description |
|---|---|
No resources | |
TDQS
Scored across 3 tools
Each tool has a distinct and clear purpose: executing SQL, retrieving schema metadata, and fetching sample data. No overlap in functionality.
All tool names follow a consistent verb_noun pattern in snake_case (execute_sql, get_schema_info, get_table_sample), making them predictable.
Three tools is appropriate for the server's scope—covering query execution, schema inspection, and data sampling. Not too few or excessive.
Covers core database interaction needs (query, schema, sample). Minor gaps like database listing or DDL support exist but are acceptable for the stated purpose.