Skip to main content
Glama

Server Configuration

Describes the environment variables required to run the server.

NameRequiredDescriptionDefault
SSH_KEYNoPath to private SSH key; if unset, uses ssh-agent or ~/.ssh/config.
MCP_HOSTNoBind address for network transports, e.g., 0.0.0.0.
MCP_PORTNoPort for network transports, default 8000.8000
SSH_HOSTNoIn ssh mode, the SSH target as 'user@host', or the bastion if MySQL is reached via a jump host.
SSH_JUMPNoOptional SSH jump host, e.g. 'user@bastion', used with `ssh -J`.
MYSQL_HOSTNoMySQL hostname or IP; used when MYSQL_SOCKET is not set, or required in direct mode without a socket.
MYSQL_PORTNoMySQL port, default 3306. Used with MYSQL_HOST.
MYSQL_USERNoDedicated MySQL diagnostic user (e.g., 'mcp_diag'). Required.
MYSQL_SOCKETNoPath to MySQL socket as seen from the DB host (preferred in ssh mode). Alternative to MYSQL_HOST/MYSQL_PORT.
MYSQL_SSL_CANoPath to CA certificate for SSL verification.
MCP_TRANSPORTNoMCP transport: stdio (default), streamable-http (recommended), or sse.stdio
MYSQL_SSL_KEYNoPath to client key for SSL connections.
MYSQL_MAX_ROWSNoMaximum number of rows returned by diagnostic tools, default 200.200
MYSQL_PASSWORDNoMySQL password; optional if using socket peer-auth or .my.cnf.
MYSQL_SSL_CERTNoPath to client certificate for SSL connections.
MYSQL_SSL_MODENoSSL mode for direct connections only: disabled (default), required, verify_ca, or verify_identity.disabled
MCP_AUTH_TOKENSNoComma-separated 'token:label' pairs for bearer authentication. Required for non-stdio transports unless MCP_ALLOW_NO_AUTH=true.
MYSQL_CONN_MODENoConnection mode: 'ssh' (default) or 'direct'.ssh
MCP_ALLOWED_HOSTSNoComma-separated allowed hostnames for DNS-rebinding protection when binding to non-localhost.
MCP_ALLOW_NO_AUTHNoSet to 'true' to explicitly run network transports without token authentication.
MYSQL_TIMEOUT_SECNoTimeout in seconds for MySQL operations, default 8.8
MCP_ALLOWED_ORIGINSNoComma-separated allowed origins for browser-based clients when binding to non-localhost.

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

Features and capabilities supported by this server

Protocol revision2025-11-25

CapabilityDetails
tools
{
  "listChanged": false
}
prompts
{
  "listChanged": false
}
resources
{
  "subscribe": false,
  "listChanged": false
}
experimental
{}

Tools

Functions exposed to the LLM to take actions

NameDescription
mysql_pingA

Check SSH + MySQL reachability; return version, hostname, and server time.

mysql_processlistA

SHOW FULL PROCESSLIST. Truncates Info. Use during a user-facing slowdown.

mysql_active_queriesA

Non-Sleep threads from information_schema.PROCESSLIST, longest first.

mysql_global_statusB

Curated SHOW GLOBAL STATUS keys (threads, tmp tables, InnoDB locks, QPS counters).

mysql_status_deltaC

Two GLOBAL STATUS samples; counters as per-second rates, gauges as t0/t1.

mysql_variablesA

Curated SHOW GLOBAL VARIABLES (buffer pool, connections, slow log, query cache if present).

mysql_innodb_statusA

Parsed SHOW ENGINE INNODB STATUS: history list, deadlocks, semaphores, buffer pool.

mysql_innodb_trxA

Open InnoDB transactions (age, thread, query). Long trx_age_sec pins locks/history.

mysql_lock_waitsB

Blocking chains: performance_schema.data_locks (8.0+) or innodb_locks (<8.0.18). Empty if nobody is waiting.

mysql_digest_topA

Top statement digests by wait time from performance_schema (no application table reads).

mysql_wait_eventsA

Top wait events. Often empty if wait instruments are disabled.

mysql_table_ioA

Hottest application tables by IO wait (excludes mysql/performance_schema/sys).

mysql_monitor_clientsA

Processlist grouped by user/host/command. Use to spot monitoring-agent connection storms.

mysql_replica_statusA

Replica lag, IO/SQL thread state, last IO/SQL error.

SHOW REPLICA STATUS (8.0.22+) or SHOW SLAVE STATUS (older). Replication channel metadata only, never binlog row contents. is_replica: false with empty rows is the normal result on a standalone/primary server.

mysql_replica_topologyA

Replicas connected to this server: SHOW REPLICAS (8.0.22+) or SHOW SLAVE HOSTS (older).

mysql_explainA

EXPLAIN a single SELECT or SHOW. Stacked queries and DML are rejected.

Prompts

Interactive templates invoked by user choice

NameDescription

No prompts

Resources

Contextual data attached and managed by the client

NameDescription
spike_runbookFixed order of diagnostic tools to call during a user-facing MySQL slowdown.

TDQS

B3.4/5.0

Scored across 16 tools

Disambiguation4/5

Most tools target clearly distinct diagnostic areas: connectivity, processlist, status, variables, InnoDB internals, replication, and explain. The only notable overlap is among mysql_processlist, mysql_active_queries, and mysql_monitor_clients, all of which read the processlist but with different filtering/grouping purposes.

Naming Consistency4/5

All tools share the mysql_ prefix and use snake_case with descriptive resource names, making the set predictable. A minor deviation is that mysql_ping and mysql_explain use action-style names while the rest are noun-phrase resources, but this does not create real confusion.

Tool Count4/5

16 tools is slightly above the typical 3-15 range, but the count is justified by the breadth of MySQL diagnostic concerns: processlist, status, InnoDB transactions, locks, wait events, table IO, and replication. Each tool covers a distinct diagnostic probe rather than duplicating existing functionality.

Completeness4/5

The toolkit provides strong coverage for diagnosing MySQL health, performance, locks, transactions, and replication with no obvious dead ends. Minor gaps exist, such as no ability to kill a query or inspect slow query logs, but these are operational actions rather than core diagnostic surface.

Maintenance

ActivityMaintained
ResponsivenessNo issues