Skip to main content
Glama
raviraj-ntp

mysql-mcp

by raviraj-ntp

Server Configuration

Describes the environment variables required to run the server.

NameRequiredDescriptionDefault
MYSQL_URIYesThe MySQL connection URI for the default connection, e.g., mysql://user:pass@localhost:3306
MYSQL_URI_PRODNoOptional MySQL connection URI for a production connection
MYSQL_URI_STAGINGNoOptional MySQL connection URI for a staging connection
MYSQL_EXTRA_CONNECTIONSNoOptional string defining extra connections in format 'name1:ENV_VAR1,name2:ENV_VAR2'

Capabilities

Features and capabilities supported by this server

CapabilityDetails
tools
{
  "listChanged": true
}

Tools

Functions exposed to the LLM to take actions

NameDescription
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

NameDescription

No prompts

Resources

Contextual data attached and managed by the client

NameDescription

No resources

Latest Blog Posts

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