Labsco
MCP SERVER

MySQL-Ops MCP

by call518

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.

Relational SQL DatabasesVerified
Summary
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 server itself declares no credential variable.

Setup effort

One command plus a key — uvx --python 3.11 mcp-mysql-ops, then supply credentials