MySQL AIops
Governed MySQL/MariaDB DBA ops: slow-query, lock-wait, replication & fragmentation RCA; 35 tools.
Connector by AIops-tools · GitHub account verified by the MCP Registry
Install
Works with Claude Code, Codex, VS Code, Cursor, Windsurf, Claude Desktop. Read the repository before you give any tool access to your data.
npx agentmarket install connector/aiops-tools-mysql-aiops
Asks which of your tools to add it to (Claude Code, Codex, Cursor, VS Code, Windsurf, Gemini CLI, Claude Desktop) and shows the change first. See https://agentmart.dev/cli.
Get the weekly diff
The weekly diff: one email a week with new agent tools, notable updates and grade changes, plus security alerts for tools you follow. Double opt-in, one-click unsubscribe.
About
Reviews
Write a reviewNo reviews yet. Installed it? Reviews come from verified installers only. How reviews work
Permissions
What this server can do and what it asks for, from its tool list, install config and code. Checked Oct 25, 2026.
- Tools
- 24 read · 6 write · 4 delete · 1 not yet classified
- Secrets
- None asked for
- Install scripts
- None found
- Runs as
- Python package
Tools by what they do 35
Read from the source code; the running server may list different tools.
Read 24 · Look things up without changing anything.
binlog_statusconnection_statsexplain_queryfragmentation_analysisindex_statslist_databaseslist_engineslist_sessionslist_transactionslong_running_queriesoverviewredundant_indexes
Show 12 more tools
replica_statusreplication_lag_rcaserver_versionshow_statusshow_variablesslow_query_rcatable_fragmentationtable_sizestable_statustop_queriesundo_listunused_indexes
Write 6 · Create, change, send or run things.
create_indexlock_wait_rcalock_waitsoptimize_tableset_global_variableundo_apply
Delete 4 · Delete, drop, revoke or wipe things.
drop_indexkill_querykill_sessionreset_query_stats
Not yet classified 1 · We could not tell from the name and description.
analyze_table
Network hosts it talks to 3
anthropic.com· found in codegithub.com· found in codeglama.ai· found in code
Files it touches
~/.mysql-aiops~/.mysql-aiops/audit.db~/.mysql-aiops/secrets.enc~/.mysql-aiops/undo.db
Tools (35)
Read from the source code; the running server may differ. Descriptions are the server’s own words; hidden characters are shown as [U+…].
analyze_table[WRITE][risk=medium] ANALYZE TABLE to refresh index statistics. No undo; captures prior stats for audit. Takes a brief read lock while sampling. Pass dry_run=True to preview. Args: table: Table name (optionally schema-qualified). dry_run: If True, preview without running. target: Target name from config; omit for the default.
binlog_status[READ] Binary-log configuration, GTID mode, and connected downstream replicas. Args: target: Target name from config; omit for the default.
connection_stats[READ] Connection counters vs max_connections (exhaustion early warning). Args: target: Target name from config; omit for the default.
create_index[WRITE][risk=medium] Create an index. Reversible: undo drops the created index. The created (table, name) is returned so the harness records an undo that drops exactly this index. Pass dry_run=True to preview. Alternatively pass ``definition`` (a captured CREATE INDEX statement — this is how drop_index's undo descriptor replays) INSTEAD of table/columns. Args: table: Table to index (optionally schema-qualified). Required unless ``definition`` is given. columns: Column names to index. Required unless ``definition`` is given. name: Index name (auto-generated from table+colu…
drop_index[WRITE][risk=high] Drop an index. Reversible: captures its definition first. Before dropping, the exact index definition is rebuilt from SHOW CREATE TABLE so the harness records an undo that recreates it. Pass dry_run=True to preview. Args: table: Table the index belongs to (optionally schema-qualified). name: Index name to drop. dry_run: If True, preview without dropping. target: Target name from config; omit for the default.
explain_query[READ] Return the JSON execution plan for ``sql`` (EXPLAIN FORMAT=JSON). The statement is planned, not executed. Args: sql: A single SQL statement to EXPLAIN. target: Target name from config; omit for the default.
fragmentation_analysis[READ] Rank tables by reclaimable data_free into OPTIMIZE TABLE candidates. Pass 'tables' (as from table_fragmentation) for pure/offline analysis, or omit to pull the worst-fragmented tables live. Each recommendation cites its numbers. Args: tables: Injected fragmentation rows; if omitted, pulled live. limit: How many tables to pull when not injected (default 50). target: Target name from config; omit for the default.
index_stats[READ] Per-index column lists and cardinality (selectivity screening). Args: target: Target name from config; omit for the default.
kill_query[WRITE][risk=high] Cancel a session's running statement (KILL QUERY). No inverse. The session stays connected; only its current statement is aborted. Captures the session's user/host/query for audit. Pass dry_run=True to preview. Refuses this tool's own session id — the statement it would cancel is this very call. Enforced under dry_run too. Args: session_id: Session/connection id (from list_sessions). dry_run: If True, preview without cancelling. target: Target name from config; omit for the default.
kill_session[WRITE][risk=high] Terminate a session (KILL CONNECTION). No safe inverse. Captures the session's user/host/query for the audit trail; a kill cannot be undone, so no undo is offered. Pass dry_run=True to preview. Refuses this tool's own session id — including under dry_run, which must report a refusal rather than preview a call that will be refused. Args: session_id: Session/connection id (from list_sessions). dry_run: If True, preview without killing. target: Target name from config; omit for the default.
list_databases[READ] User schemas with table count and data/index size (largest first). Args: target: Target name from config; omit for the default.
list_engines[READ] Storage engines and which is the default (SHOW ENGINES). Args: target: Target name from config; omit for the default.
list_sessions[READ] Current sessions (processlist) with per-command counts. Flags sleeping sessions (connection-pool leak suspects). Args: include_sleeping: Include sessions in command=Sleep (default True). target: Target name from config; omit for the default.
list_transactions[READ] Open InnoDB transactions, oldest first (stuck-transaction hunting). Args: target: Target name from config; omit for the default.
lock_wait_rca[READ] Build the InnoDB wait-for tree, name the root blocker, and parse the last deadlock out of SHOW ENGINE INNODB STATUS. Pass 'pairs' (as from lock_waits) for pure/offline analysis, or omit to pull the current lock-wait graph live. Args: pairs: Injected lock-wait pairs {blockedId, blockingId, ...}; if omitted, pulled live (flavor-branched). include_deadlock: Also parse the LATEST DETECTED DEADLOCK section from SHOW ENGINE INNODB STATUS (default True). target: Target name from config; omit for the default.
Show 20 more tools
lock_waits[READ] InnoDB wait-for edges (blocked session -> blocking session). Reads performance_schema.data_lock_waits on MySQL 8.x, or information_schema.innodb_lock_waits on MariaDB (flavor-branched). Args: target: Target name from config; omit for the default.
long_running_queries[READ] Active statements running at least ``min_seconds``, oldest first. Args: min_seconds: Minimum age in seconds (default 60). target: Target name from config; omit for the default.
optimize_table[WRITE][risk=medium] OPTIMIZE TABLE (rebuild, reclaim data_free). Records prior stats. No undo (a rebuild has no inverse); the prior size/fragmentation stats are captured for the audit trail. InnoDB maps this to ALTER TABLE ... FORCE (online DDL, brief locks) — schedule off-peak for hot tables. Pass dry_run=True to preview. Args: table: Table name (optionally schema-qualified, e.g. shop.orders). dry_run: If True, preview without running. target: Target name from config; omit for the default.
overview[READ] One-shot server health snapshot. Version + flavor (mysql/mariadb) + uptime, connection headroom vs max_connections, sessions by command, the longest-running query, the most fragmented table, and the replica role — each section captured defensively so one failing probe does not sink the rest. Args: target: Target name from config; omit for the default.
redundant_indexes[READ] Indexes whose columns are a leading prefix of another index (dupes). Args: target: Target name from config; omit for the default.
replica_status[READ] Replica thread state and lag (SHOW REPLICA/SLAVE STATUS, flavor-branched). Empty on a primary/standalone server. MySQL 8.x uses SHOW REPLICA STATUS; MariaDB uses SHOW SLAVE STATUS — the result is normalised either way. Args: target: Target name from config; omit for the default.
replication_lag_rca[READ] Map replica thread state / lag / error fields to cause + action. Pass 'status' (as from replica_status) for pure/offline analysis, or omit to pull the live replica status (flavor-branched). Args: status: Injected replica status record; if omitted, pulled live. target: Target name from config; omit for the default.
reset_query_stats[WRITE][risk=medium] Reset statement-digest accumulators (irreversible). Truncates performance_schema.events_statements_summary_by_digest; the counters cannot be restored, so no undo is recorded. Pass dry_run=True to preview. Args: dry_run: If True, preview without resetting. target: Target name from config; omit for the default.
server_version[READ] Server version, flavor (mysql/mariadb), uptime and read-only state. Args: target: Target name from config; omit for the default.
set_global_variable[WRITE][risk=medium] SET GLOBAL a server variable. Reversible: captures prior value. Runtime-only: the change does not survive a restart (persist it in my.cnf — or SET PERSIST on MySQL 8 — yourself); reported but NOT performed automatically. The prior value (from SHOW GLOBAL VARIABLES) is captured so the harness records an undo that sets it back. Pass dry_run=True to preview. Refuses the globals that would lock this tool out of the server (init_connect, max_connections, max_user_connections, read_only, super_read_only, skip_networking, require_secure_transport, and wait_timeout/interactive_t…
show_status[READ] Global status counters (SHOW GLOBAL STATUS). Args: pattern: Optional substring to filter counter names (e.g. 'Threads', 'Innodb_buffer_pool'). target: Target name from config; omit for the default.
show_variables[READ] Global variables (SHOW GLOBAL VARIABLES). Args: pattern: Optional substring to filter variable names (e.g. 'innodb_buffer', 'max_connections'). target: Target name from config; omit for the default.
slow_query_rca[READ] RCA for the worst statement digest, with cause + action. Picks the digest with the greatest total time and maps its numbers (no-index share, lock-time share, examined/sent ratio, tmp-disk spill, calls) — plus an optional EXPLAIN plan — to cited causes and concrete actions. Pass 'statements' for pure/offline analysis, or omit to pull the top digests live from performance_schema. Args: statements: Injected digest rows (as from top_queries); if omitted, the worst statements are pulled live. explain_sql: Optional SQL to EXPLAIN so plan access types feed the RCA. limit:…
table_fragmentation[READ] data_free per table (space OPTIMIZE TABLE could reclaim), worst first. Args: limit: Number of tables to inspect (default 50). target: Target name from config; omit for the default. Returns an envelope: {"tables": [...], "returned": N, "limit": L, "truncated": bool}. When "truncated" is true there is more beyond what was returned — re-run with a higher limit rather than treating this as the complete picture.
table_sizes[READ] Largest tables by data + index size. Args: limit: Number of tables to return, largest first (default 20). target: Target name from config; omit for the default. Returns an envelope: {"tables": [...], "returned": N, "limit": L, "truncated": bool}. When "truncated" is true there is more beyond what was returned — re-run with a higher limit rather than treating this as the complete picture.
table_status[READ] Per-table engine, row format, row estimate and last update time. Flags non-InnoDB tables (no row-level locking / crash recovery). Args: limit: Number of tables to inspect (default 50). target: Target name from config; omit for the default. Returns an envelope: {"tables": [...], "returned": N, "limit": L, "truncated": bool}. When "truncated" is true there is more beyond what was returned — re-run with a higher limit rather than treating this as the complete picture.
top_queries[READ] Top statement digests from performance_schema by a whitelisted metric. Args: order_by: One of total_time, mean_time, calls, rows_examined, lock_time, no_index. limit: Number of statements to return (1..200, default 20). target: Target name from config; omit for the default. Returns an envelope: {"statements": [...], "returned": N, "limit": L, "truncated": bool}. When "truncated" is true there is more beyond what was returned — re-run with a higher limit rather than treating this as the complete picture.
undo_apply[WRITE][risk=medium] Apply a recorded undo by dispatching its inverse tool. The inverse runs through its own governed tool, so its own risk tier and audit row are recorded there. Pass dry_run=True to preview the inverse call without executing it. A token can only be applied once. Args: undo_id: The undoId from undo_list (or an ``_undo_id`` in a write result). dry_run: If True, preview the inverse tool + params without running it. target: Passed through to the inverse tool when it accepts a target.
undo_list[READ] List recorded, not-yet-applied undo tokens (most recent first). Each entry names the original tool, the inverse tool that ``undo_apply`` would run, and a human note. Use the ``undoId`` with ``undo_apply``. Returns {"undos": [...], "returned": N, "limit": L, "truncated": bool}. ``truncated`` is *measured* (one extra row is fetched), not guessed from a length coincidence: when it is true there are MORE tokens than shown, so re-run with a higher ``limit`` rather than reporting the list as complete. Each entry carries ``effectVerified``. False means the original write lost its response, …
unused_indexes[READ] Secondary indexes with zero I/O events since restart (drop candidates). From performance_schema.table_io_waits_summary_by_index_usage — counters reset on server restart, so confirm over a full business cycle. Args: target: Target name from config; omit for the default.
Signals
- Stars
- 0
- Forks
- 0
- Open issues
- 0
- Weekly downloads
- 194
- Last commit
- Oct 15, 2026 (13 days ago)
- Last release
- Oct 15, 2026 (13 days ago)
- Last package publish
- Oct 15, 2026 (13 days ago)
From GitHub (fetched Oct 24, 2026) and the package registry.
Details
- Registry name
io.github.AIops-tools/mysql-aiops- Version
- 0.12.0
- Auth
- No auth
- Packages
- pypi mysql-aiops
- License
- MIT
- Repository
- github.com/AIops-tools/MySQL-AIops
- First seen
- Oct 24, 2026
- Last checked
- Oct 25, 2026
More from AIops-tools
- 0.569score
OT AIops
AIops-tools
Governed OT tap (57 tools): OPC-UA/Modbus/S7/MC/MTConnect/MQTT/EtherNet-IP/EtherCAT.
ConnectorAFreshness: ALocal★ 7↓ 81/wkClaude Code +5 - 0.567score
Proxmox AIops
AIops-tools
Governed Proxmox VE VM/container ops — 43 MCP tools with audit, budget, undo & risk-tier guards.
ConnectorAFreshness: ALocal★ 3↓ 221/wkClaude Code +5 - 0.558score
Firewall AIops
AIops-tools
Governed OPNsense + pfSense firewall ops: rules, NAT, VPN, DHCP, RCA.
ConnectorAFreshness: ALocal★ 1↓ 231/wkClaude Code +5 - 0.550score
Veeam AIops
AIops-tools
Governed Veeam Backup & Replication ops — 27 MCP tools with audit, budget, undo guards.
ConnectorAFreshness: ALocal↓ 267/wkClaude Code +5 - 0.550score
Proxy AIops
AIops-tools
Governed Traefik + Caddy + HAProxy ops: routes, upstreams, certs, 5xx RCA.
ConnectorAFreshness: ALocal↓ 250/wkClaude Code +5 - 0.550score
Identity AIops
AIops-tools
Governed Keycloak + authentik identity ops: users, events, clients, MFA, RCA.
ConnectorAFreshness: ALocal↓ 242/wkClaude Code +5
Cite this page
MySQL AIops MCP server. Agent Mart. https://agentmart.dev/connectors/aiops-tools-mysql-aiops (last updated 2026-10-25)