Ask a MySQL server what it is running, who is connected, which tables are biggest, which queries are slowest and what is holding locks — without opening a SQL client.
Read-only by construction: every tool here is a get_, and none of them runs a query you wrote or changes a setting.
The coverage maps onto the questions actually asked during an incident: what is connected (get_active_connections, get_connection_info), what is blocked (get_lock_monitoring), what is slow (get_slow_queries, get_table_io_stats) and what is big (get_table_size_info, get_database_size_info). The filters keep responses usable — search_term on the configuration and status reads, db_filter and user_filter on connections, limit on the size and statistics calls. What it will not give you is the fix: there is no call to kill a session, add an index or change a variable, so it ends at the diagnosis and hands over from there.
What it is
A read-only operations view over a MySQL server: version and configuration, connections and locks, database and table inventory with sizes, index statistics, and slow-query and I/O counters from Performance Schema.
What you get
Server identity and settings: get_server_info returns version, edition, uptime, available storage engines and the default one; get_mysql_config returns configuration variables narrowed by search_term; get_server_status returns status variables and performance counters.
Who is connected right now: get_active_connections lists connections with process ID, user, host, database and the command each is running, filtered by db_filter or user_filter, and get_connection_info adds duration and state with system processes filtered out.
Inventory with sizes attached: get_database_list returns databases with character sets and sizes, get_table_list returns tables with type, engine, row counts, sizes and timestamps, and get_current_database_info returns one database's character set, collation, size, table count and engine distribution.
Schema detail on demand: get_table_schema_info returns a table's columns, indexes and foreign keys with comments and default values, or an overview of every table in the database when table_name is left out.
Storage analysis: get_table_size_info splits table size into data and index with row counts and average row sizes ordered largest first, and get_database_size_info compares databases by total, data and index size.
Performance Schema reads: get_slow_queries returns the slowest queries with execution counts, timings and rows examined against rows returned; get_table_io_stats returns per-table fetch, insert, update and delete counts ordered by total I/O time; get_lock_monitoring shows lock types and modes with the sessions holding or waiting for them.
Index efficiency: get_index_usage_stats returns index cardinality and selectivity and points at indexes that look unused or inefficient.
Requirements
A reachable MySQL server and an account on it, plus the database_name the calls should read against; the connection is set with MYSQL_HOST, MYSQL_PORT, MYSQL_USER, MYSQL_PASSWORD and MYSQL_DATABASE.
Setup effort
One command plus credentials — uvx --python 3.11 mcp-mysql-ops, then supply credentials
Counted once with only startup setup. Other versions, modes or optional credentials may expose a different list.
get_active_connections
[Tool Purpose]: Monitor active MySQL connections and processes
[Exact Functionality]:
List all active connections with process ID, user, host, database
Show current command being executed by each connection
Display connection time and state information
Filter by user or database name
[Required Use Cases]:
When user requests "active connections", "current sessions", "process list"
When diagnosing connection issues or monitoring user activity
When checking for long-running queries
get_connection_info
[Tool Purpose]: Get current connection and process information
[Exact Functionality]:
Show active connections with detailed process information
Display connection duration, state, and current operations
Include user, host, and database context for each connection
Filter out system processes for clarity
[Required Use Cases]:
When user requests "connection info", "active processes", "session details"
When monitoring database activity and user sessions
When diagnosing connection issues
get_current_database_info
[Tool Purpose]: Get information about the currently connected or specified database
[Exact Functionality]:
Show database name, character set, and collation
Display database size and table count
Show creation time if available
Include storage engine distribution
[Required Use Cases]:
When user requests "current database", "database info", "database details"
When getting context about the working database
get_database_list
[Tool Purpose]: List all databases in MySQL server
[Exact Functionality]:
Show all databases with names and character sets
Display database size information if available
Show collation and default character set
[Required Use Cases]:
When user requests "database list", "show databases", "available databases"
When exploring server structure
get_database_size_info
[Tool Purpose]: Get database size information and storage distribution
[Exact Functionality]:
Show database sizes with table counts
Display total, data, and index size breakdown
Compare databases by storage usage
Include average table sizes
[Required Use Cases]:
When user requests "database sizes", "storage usage", "database capacity"
When planning database resources
When monitoring growth trends
get_index_usage_stats
[Tool Purpose]: Get index usage statistics and efficiency analysis
[Exact Functionality]:
Show index information with cardinality and selectivity
Display index types and usage patterns
Identify potentially unused or inefficient indexes
Order by cardinality and selectivity metrics
[Required Use Cases]:
When user requests "index stats", "index analysis", "index optimization"
When optimizing query performance
When identifying redundant indexes
get_lock_monitoring
[Tool Purpose]: Monitor current locks in MySQL
[Exact Functionality]:
Show current lock information from Performance Schema
Display lock types, modes, and status
Show which sessions are holding or waiting for locks
Include query information for lock holders
[Required Use Cases]:
When user requests "lock monitoring", "deadlock check", "blocked sessions"
When diagnosing locking issues
When checking for lock contention
get_mysql_config
[Tool Purpose]: Get MySQL server configuration variables
[Exact Functionality]:
Show server configuration variables and their values
Filter by search term if provided
Display both global and session variables
Show variable descriptions where available
[Required Use Cases]:
When user requests "MySQL config", "server variables", "configuration"
When diagnosing configuration issues
When checking specific settings
get_server_info
[Tool Purpose]: Get MySQL server version and basic information
[Exact Functionality]:
Show MySQL server version, edition, and compilation info
Display server uptime and basic configuration
Show available storage engines and default engine
Provide server connection details (sanitized)
[Required Use Cases]:
When user requests "server info", "MySQL version", "server status"
When diagnosing compatibility issues
When checking server capabilities
get_server_status
[Tool Purpose]: Get MySQL server status variables and performance counters
[Exact Functionality]:
Show server status variables with current values
Display performance counters and operational metrics
Filter by search term if provided
Include connection, query, and resource statistics
[Required Use Cases]:
When user requests "server status", "MySQL status", "performance metrics"
When monitoring server health and performance
When diagnosing operational issues
get_slow_queries
[Tool Purpose]: Get slow queries from Performance Schema
[Exact Functionality]:
Show slowest queries with execution statistics
Display query text, execution count, and timing information
Show rows examined and returned
Order by total execution time
[Required Use Cases]:
When user requests "slow queries", "performance analysis", "query optimization"
When diagnosing performance issues
When identifying problematic queries
get_table_io_stats
[Tool Purpose]: Get table I/O statistics from Performance Schema
[Exact Functionality]:
Show I/O statistics for tables including reads, writes, and timing
Display fetch, insert, update, delete operations
Order by total I/O time
Show both request counts and timing information
[Required Use Cases]:
When user requests "table I/O", "table performance", "I/O statistics"
When analyzing table access patterns
When identifying heavily used tables
get_table_list
[Tool Purpose]: List all tables in specified database or all databases
[Exact Functionality]:
If database_name provided: Show tables in that specific database
If database_name empty: Show tables from all user databases with database names
Display table type (BASE TABLE, VIEW), engine, rows count, and size information
Show creation and update timestamps
Filter by table type if specified
[Required Use Cases]:
When user requests "table list", "show tables", "database tables"
When exploring database structure
get_table_schema_info
[Tool Purpose]: Get detailed schema information for a specific table or entire database
[Exact Functionality]:
If table_name provided: Show all columns, indexes, foreign keys for that table
If table_name empty: Show overview of all tables in the database
Display table statistics, constraints, and engine information
Include column comments and default values
[Required Use Cases]:
When user requests "table schema", "table structure", "describe table"
When analyzing table design and constraints
When requesting database-wide schema analysis with empty table_name
get_table_size_info
[Tool Purpose]: Get table size information and storage analysis
[Exact Functionality]:
Show table sizes with data and index breakdown
Display size ratios and storage efficiency
Order by total size (largest first)
Include row counts and average row sizes
[Required Use Cases]:
When user requests "table sizes", "largest tables", "storage analysis"
When planning database optimization
When monitoring storage usage
get_user_list
[Tool Purpose]: List all MySQL users and their privileges
[Exact Functionality]:
Show all MySQL users with their host patterns
Display account status and authentication info
Show password expiration and locking status
Include SSL and resource limit information
[Required Use Cases]:
When user requests "user list", "MySQL users", "account info"
When managing user access and security
When auditing user accounts
BEFORE YOU INSTALL
What to know first
Tools you get
16 tools when we connected; the project documents 19. get_database_overview, get_all_databases_tables and get_all_databases_table_sizes are documented but did not register; no documented flag enables them, and the documentation is likely ahead of the published build.
These values are the project's bundled test database (port 13306, user root, password changeme!@34, database test_ecommerce). For your own MySQL server, put in its host, port (3306 by default), user, password and database.
Open WebUI
OPEN WEBUI · TERMINAL
git clone https://github.com/call518/MCP-MySQL-Ops.git
cd MCP-MySQL-Ops
cp .env.example .env
To use your own MySQL server instead of the bundled test database, set MYSQL_HOST, MYSQL_PORT, MYSQL_USER, MYSQL_PASSWORD and MYSQL_DATABASE in .env, and comment out the mysql and mysql-init-data services in docker-compose.yml.
OPEN WEBUI · TERMINAL
docker-compose up -d
Wait 2–3 minutes for the containers to start, then open Open WebUI at http://localhost:3004/ and log in with an admin account.
Go to Settings → Tools and enter the mysql-ops Tool address (e.g., http://localhost:8004/mysql-ops) to connect MCP Tools.
Ask your marketing data warehouse a question in plain language and get read-only SQL run against BigQuery, Snowflake, Redshift or Synapse.Read full description