mcp-mysql-ops

v1.5.8
mcp-mysql-ops Checked 4 hours ago Published 19 days ago

MCP server for MySQL database operations and monitoring

These tools were reported by the server itself during our smoke test (tools/list), not copied from the README.

get_server_info 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

ParameterTypeDescription
database_nameDatabase name to connect to (uses default if omitted)

get_active_connections 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

ParameterTypeDescription
database_nameDatabase name to connect to (uses default if omitted)
db_filterFilter connections by database name
user_filterFilter connections by username

get_database_list 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

ParameterTypeDescription
database_nameDatabase name to connect to (uses default if omitted)

get_table_list 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

ParameterTypeDescription
database_nameDatabase name to analyze (if empty, shows tables from all databases)
table_typeFilter by table type ("BASE TABLE", "VIEW")

get_table_schema_info 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

ParameterTypeDescription
table_name *stringName of the table to analyze (empty string for database overview)
database_nameDatabase containing the table (uses current database if omitted)

get_mysql_config 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

ParameterTypeDescription
database_nameDatabase name to connect to (uses default if omitted)
search_termFilter variables by name containing this term

get_user_list 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

ParameterTypeDescription
database_nameDatabase name to connect to (uses default if omitted)

get_server_status 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

ParameterTypeDescription
database_nameDatabase name to connect to (uses default if omitted)
search_termFilter status variables by name containing this term

get_table_size_info 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

ParameterTypeDescription
database_nameDatabase name to analyze (uses current database if omitted, shows all if none)
limitintegerMaximum number of tables to return (default: 20)

get_database_size_info 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

ParameterTypeDescription
database_nameSpecific database name to analyze (analyzes all databases if omitted)

get_index_usage_stats 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

ParameterTypeDescription
database_nameDatabase name to analyze (uses current database if omitted)
limitintegerMaximum number of indexes to return (default: 20)

get_connection_info 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

ParameterTypeDescription
database_nameDatabase name to connect to (uses default if omitted)

get_slow_queries 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

ParameterTypeDescription
database_nameDatabase name to connect to (uses default if omitted)
limitintegerMaximum number of queries to return (default: 20)

get_table_io_stats 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

ParameterTypeDescription
database_nameDatabase name to connect to (uses default if omitted)
limitintegerMaximum number of tables to return (default: 20)

get_lock_monitoring 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

ParameterTypeDescription
database_nameDatabase name to connect to (uses default if omitted)

get_current_database_info 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

ParameterTypeDescription
database_nameDatabase name to analyze (uses current database if omitted, shows available databases if none)