mysql-mcp
Server Configuration
Describes the environment variables required to run the server.
| Name | Required | Description | Default |
|---|---|---|---|
| MYSQL_URI | Yes | The MySQL connection URI for the default connection, e.g., mysql://user:pass@localhost:3306 | |
| MYSQL_URI_PROD | No | Optional MySQL connection URI for a production connection | |
| MYSQL_URI_STAGING | No | Optional MySQL connection URI for a staging connection | |
| MYSQL_EXTRA_CONNECTIONS | No | Optional string defining extra connections in format 'name1:ENV_VAR1,name2:ENV_VAR2' |
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": true
} |
Tools
Functions exposed to the LLM to take actions
| Name | Description |
|---|---|
| list_connectionsA | List all configured MySQL/MariaDB connections (names only, no URIs). |
| pingB | Ping a MySQL/MariaDB connection (SELECT 1). |
| server_infoB | Server version, vendor, capabilities, and host metadata. |
| connectC | Add or replace a runtime connection by URI. Use a unique name. |
| list_databasesB | List databases on the server (respects allowed_databases). |
| list_tablesC | List tables and views in a database. |
| describe_tableC | Column definitions for a table (information_schema + SHOW FULL COLUMNS). |
| show_create_tableC | Return CREATE TABLE DDL. |
| list_indexesC | List indexes for a table. |
| list_foreign_keysC | List foreign key constraints for a table. |
| table_statsC | Table size and row estimates from information_schema. |
| list_viewsC | List views in a database. |
| list_triggersB | List triggers in a database. |
| list_eventsB | List scheduled events in a database. |
| queryC | Run a parameterized SELECT query. Use ? placeholders for params. |
| query_oneC | Run a SELECT and return the first row only. |
| explainC | EXPLAIN a SELECT query (JSON format when supported). |
| countB | COUNT rows in a table with optional WHERE clause. |
| sample_rowsC | Sample rows from a table. |
| distinct_valuesC | Distinct values for a column (capped). |
| export_queryC | Run a SELECT and return truncated JSON for large results. |
| executeB | Execute a single DML statement (INSERT/UPDATE/DELETE) with ? placeholders. |
| execute_batchB | Execute multiple DML statements in a single transaction. |
| insert_rowsA | Bulk insert rows from a JSON array of objects (column keys must match). |
| delete_rowsB | DELETE rows with a required WHERE clause. |
| truncate_tableC | TRUNCATE a table (requires confirmed=true). |
| list_proceduresC | List stored procedures in a database. |
| list_functionsB | List stored functions in a database. |
| describe_procedureC | Parameter list and metadata for a stored procedure. |
| show_create_procedureC | Return CREATE PROCEDURE DDL. |
| show_create_functionC | Return CREATE FUNCTION DDL. |
| call_procedureB | Call a stored procedure with JSON params; captures result sets and OUT parameters. |
| call_functionC | Call a stored function with positional params. |
| test_procedureA | Test a stored procedure in a sandbox transaction (ROLLBACK by default). |
| create_procedureC | Deploy a stored procedure from SQL (CREATE PROCEDURE body). |
| drop_procedureC | Drop a stored procedure. |
| routine_overviewA | List all procedures and functions with parameter summaries. |
| split_scriptA | Parse a SQL script into individual statements (DELIMITER-aware). Does not execute. |
| validate_scriptC | Parse and classify script statements without executing. |
| run_scriptC | Execute a multi-statement SQL script. Use confirmed=true to commit writes. |
| test_scriptB | Execute a script inside a sandbox transaction (ROLLBACK by default). |
| load_script_fileB | Read a SQL file from disk and optionally execute it (sandbox by default). |
| run_script_with_varsC | Prepend SET @var statements then run a script. |
| execute_ddlB | Execute a DDL statement (CREATE/ALTER/DROP). Requires confirmed=true. |
| create_databaseC | Create a database. |
| drop_databaseC | Drop a database. Requires confirmed=true. |
| create_indexC | Create an index on a table. |
| drop_indexC | Drop an index from a table. |
| show_grantsB | Show grants for the current user. |
| processlistB | SHOW FULL PROCESSLIST — active connections and queries. |
| statusC | Key global status variables. |
| variablesC | Server system variables. |
| innodb_statusA | SHOW ENGINE INNODB STATUS (InnoDB only). |
| replication_statusC | Replication status (SHOW REPLICA/SLAVE STATUS). |
| kill_queryC | Kill a query by connection id. |
| health_checkC | Composite health: ping, version, engine, replication snippet. |
| explore_tableC | Composite: columns, indexes, foreign keys, stats, and sample rows. |
| database_overviewA | Composite: all tables with row estimates, engine, and sizes. |
| analyze_queryC | Composite: EXPLAIN with human-readable summary. |
| compare_tablesA | Compare column definitions between two tables (same or different connections). |
| index_healthB | List indexes with cardinality and flag possible duplicates. |
Prompts
Interactive templates invoked by user choice
| Name | Description |
|---|---|
No prompts | |
Resources
Contextual data attached and managed by the client
| Name | Description |
|---|---|
No resources | |
Latest Blog Posts
- Who's Calling? MCP Hosts Are an Identity Blind Spot (And the Spec Knows It)By Om-Shree-0709 on .mcpAgent IdentityOAuth 2.1
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
MCP directory API
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/raviraj-ntp/mysql-mcp'
If you have feedback or need assistance with the MCP directory API, please join our Discord server