MySQL-Performance-Tuner-Mcp
Server Configuration
Describes the environment variables required to run the server.
| Name | Required | Description | Default |
|---|---|---|---|
| MYSQL_SSL | No | Enable SSL/TLS connection | false |
| MYSQL_URI | Yes | MySQL connection URI (required). Format: mysql://user:password@host:3306/database | |
| MYSQL_SSL_CA | No | Path to CA certificate file | |
| MYSQL_SSL_KEY | No | Path to client private key file | |
| MYSQL_SSL_CERT | No | Path to client certificate file | |
| MYSQL_POOL_SIZE | No | Connection pool size | 5 |
| MYSQL_SSL_VERIFY_CERT | No | Verify server certificate | true |
| MYSQL_SSL_VERIFY_IDENTITY | No | Verify server hostname matches certificate | false |
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
Server capabilities have not been inspected yet.
Tools
Functions exposed to the LLM to take actions
| Name | Description |
|---|---|
| get_slow_queriesA | Retrieve slow queries from MySQL performance_schema. Returns the top N slowest queries with detailed statistics:
Requires performance_schema to be enabled (default in MySQL 5.6+). For older versions, use the slow query log instead. Note: This tool excludes queries against MySQL system schemas (mysql, information_schema, performance_schema, sys) to focus on user/application query performance. |
| analyze_queryA | Analyze a MySQL query's execution plan using EXPLAIN. Provides detailed analysis of:
Supports EXPLAIN FORMAT=JSON for MySQL 5.6+ for detailed cost analysis. Use EXPLAIN ANALYZE (MySQL 8.0.18+) for actual execution statistics. WARNING: With analyze=true, the query is actually executed! |
| get_table_statsA | Get detailed statistics for MySQL user tables. Returns information about:
Helps identify tables that may need:
Note: This tool only analyzes user/custom tables and excludes MySQL system tables (mysql, information_schema, performance_schema, sys). |
| get_index_recommendationsA | Get AI-powered index recommendations for MySQL user tables. Analyzes query patterns from performance_schema to recommend indexes:
Note: This tool only analyzes user/custom tables and excludes MySQL system tables (mysql, information_schema, performance_schema, sys). Based on MySQL performance_schema statistics and query patterns. Similar to MySQLTuner's index analysis but with more detailed recommendations. |
| find_unused_indexesA | Find unused and duplicate indexes in MySQL user tables. Identifies:
Removing unused indexes can:
Note: This tool only analyzes user/custom tables and excludes MySQL system tables (mysql, information_schema, performance_schema, sys). Based on information_schema and performance_schema statistics. |
| get_index_statsA | Get detailed index statistics for MySQL user tables. Returns:
Helps identify:
Note: This tool only analyzes user/custom tables and excludes MySQL system tables (mysql, information_schema, performance_schema, sys). |
| check_database_healthA | Perform a comprehensive MySQL database health check. Analyzes multiple aspects of MySQL health:
Returns a health score with detailed breakdown and recommendations. Based on MySQLTuner analysis concepts. |
| get_active_queriesA | Get currently active queries in MySQL. Shows:
Useful for:
|
| review_settingsA | Review MySQL configuration settings and get recommendations. Analyzes key performance-related settings:
Compares against best practices and system resources. |
| analyze_wait_eventsA | Analyze MySQL wait events to identify bottlenecks. Wait events indicate what processes are waiting for:
This helps identify:
|
| get_innodb_statusA | Analyze InnoDB engine status from SHOW ENGINE INNODB STATUS. Parses and analyzes:
Based on MySQLTuner's InnoDB analysis patterns. Provides actionable recommendations for InnoDB optimization. |
| analyze_buffer_poolA | Detailed analysis of InnoDB buffer pool usage. Analyzes:
Note: When analyzing by schema/table, this tool only shows user/custom tables and excludes MySQL system tables (mysql, information_schema, performance_schema, sys). Uses sys schema views for detailed breakdown when available. |
| analyze_innodb_transactionsA | Analyze InnoDB transactions and locking. Identifies:
Helps identify transaction-related performance issues. |
| analyze_statementsA | Analyze SQL statements from performance_schema/sys schema. Provides comprehensive analysis of:
Based on MySQLTuner's performance schema analysis. Requires performance_schema enabled. Note: This tool excludes queries against MySQL system schemas (mysql, information_schema, performance_schema, sys) to focus on user/application query analysis. |
| get_statements_with_temp_tablesA | Get statements that create temporary tables. Temporary tables can cause performance issues when:
Identifies queries that should be optimized. Note: This tool excludes queries against MySQL system schemas (mysql, information_schema, performance_schema, sys) to focus on user/application query analysis. |
| get_statements_with_sortingA | Get statements that perform sorting operations. Identifies queries with:
High file sort ratios indicate need for index optimization or sort_buffer_size increase. Note: This tool excludes queries against MySQL system schemas (mysql, information_schema, performance_schema, sys) to focus on user/application query analysis. |
| get_statements_with_full_scansA | Get statements that perform full table scans. Full table scans can severely impact performance on large tables. Identifies queries that:
These queries are prime candidates for index optimization. Note: This tool excludes queries against MySQL system schemas (mysql, information_schema, performance_schema, sys) to focus on user/application query analysis. |
| get_statements_with_errorsA | Get statements that produce errors or warnings. Identifies queries with:
Helps identify problematic application queries. Note: This tool excludes queries against MySQL system schemas (mysql, information_schema, performance_schema, sys) to focus on user/application query analysis. |
| calculate_memory_usageA | Calculate MySQL memory usage and provide recommendations. Analyzes:
Based on MySQLTuner's memory calculation methodology. Helps identify memory-related configuration issues. |
| get_memory_by_hostA | Get memory usage breakdown by host or user. Uses sys schema or performance_schema to show:
Requires performance_schema memory instrumentation enabled. |
| get_table_memory_usageA | Analyze memory usage for user tables and caches. Shows:
Note: Buffer pool breakdown by table only shows user/custom tables and excludes MySQL system tables (mysql, information_schema, performance_schema, sys). Helps optimize table caching parameters. |
| analyze_storage_enginesA | Analyze storage engine usage and statistics for user tables. Provides:
Note: This tool only analyzes user/custom tables and excludes MySQL system tables (mysql, information_schema, performance_schema, sys) by default. Based on MySQLTuner's engine analysis patterns. |
| get_fragmented_tablesA | Find user tables with significant fragmentation. Fragmentation occurs when:
Note: This tool only analyzes user/custom tables and excludes MySQL system tables (mysql, information_schema, performance_schema, sys) by default. High fragmentation wastes disk space and can slow queries. |
| analyze_auto_incrementA | Analyze auto-increment columns for potential overflow. Checks:
Note: This tool only analyzes user/custom tables and excludes MySQL system tables (mysql, information_schema, performance_schema, sys) by default. Based on MySQLTuner's auto-increment analysis. |
| get_replication_statusA | Get MySQL replication status and health. Analyzes:
Works with both MySQL and MariaDB terminology. |
| get_galera_statusA | Get Galera cluster status for MariaDB/Percona XtraDB Cluster. Analyzes:
Only applicable to Galera-enabled MySQL variants. |
| get_group_replication_statusA | Get MySQL Group Replication status. Analyzes:
Only applicable to MySQL with Group Replication enabled. |
| analyze_securityA | Perform comprehensive MySQL security analysis. Checks:
Based on MySQLTuner's security_recommendations() function. |
| analyze_user_privilegesA | Analyze privileges for a specific user or all users. Shows:
Helps identify excessive or missing privileges. |
| check_audit_logA | Check MySQL audit log configuration and status. Analyzes:
Supports MySQL Enterprise Audit, MariaDB Audit Plugin, and Percona Audit Log Plugin. |
Prompts
Interactive templates invoked by user choice
| Name | Description |
|---|---|
| optimize_slow_query | Analyze and optimize a slow SQL query |
| health_check | Perform a comprehensive MySQL health check |
| index_review | Review indexes for a database schema |
| performance_audit | Full performance audit of MySQL server |
Resources
Contextual data attached and managed by the client
| Name | Description |
|---|---|
| MySQL Best Practices | Best practices for MySQL performance tuning |
| Index Guidelines | Guidelines for MySQL index optimization |
| Configuration Guide | MySQL configuration optimization guide |
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/isdaniel/mysqltuner_mcp'
If you have feedback or need assistance with the MCP directory API, please join our Discord server