Skip to main content
Glama
Rufflet

mysql-legacy-mcp

Server Configuration

Describes the environment variables required to run the server.

NameRequiredDescriptionDefault
MYSQL_LEGACY_HOSTYesDatabase host or local tunnel endpoint
MYSQL_LEGACY_PORTNoTCP port, 1–655353306
MYSQL_LEGACY_USERYesDedicated reader account
MYSQL_LEGACY_DATABASENoOptional default database for SELECT queries
MYSQL_LEGACY_MAX_ROWSNoSELECT response row limit, 1–1000200
MYSQL_LEGACY_PASSWORDYesNonempty account password
MYSQL_LEGACY_QUERY_TIMEOUTNoDriver query timeout, 100–60000 ms10000
MYSQL_LEGACY_MAX_RESULT_BYTESNoSELECT row-data JSON byte limit, 1024–1048576262144
MYSQL_LEGACY_HIDE_SYSTEM_DATABASESNoHide mysql and information_schema in listings; true / falsetrue

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": true
}

Tools

Functions exposed to the LLM to take actions

NameDescription
mysql_legacy_pingA

Checks the MySQL connection with SELECT VERSION() AS version and returns {connected, version}. Call this first after connecting. For schema use mysql_legacy_list_tables; for row data use mysql_legacy_select.

mysql_legacy_selectA

Runs exactly one SELECT supplied in sql. Rejects SELECT INTO and locking reads; truncates by MYSQL_LEGACY_MAX_ROWS and MYSQL_LEGACY_MAX_RESULT_BYTES. On MySQL 5.6.5+ wraps in START TRANSACTION READ ONLY unless MYSQL_LEGACY_DISABLE_READ_ONLY_TRANSACTIONS=true. For columns use mysql_legacy_describe_table; for CREATE TABLE text use mysql_legacy_show_create_table; for writes use mysql_legacy_insert, mysql_legacy_update, or mysql_legacy_delete.

mysql_legacy_insertA

Runs exactly one INSERT supplied in sql. Off unless MYSQL_LEGACY_ALLOW_INSERT=true. Returns insertId and affectedRows. INSERT ... ON DUPLICATE KEY UPDATE is accepted and can overwrite existing rows. For UPDATE/DELETE/DDL use mysql_legacy_update, mysql_legacy_delete, or mysql_legacy_ddl.

mysql_legacy_updateA

Runs exactly one UPDATE supplied in sql. WHERE is required and cannot be disabled. Off unless MYSQL_LEGACY_ALLOW_UPDATE=true. Returns affectedRows and changedRows. To empty a table use TRUNCATE via mysql_legacy_ddl, not a WHERE-less UPDATE.

mysql_legacy_deleteA

Runs exactly one DELETE supplied in sql. WHERE is required and cannot be disabled. Off unless MYSQL_LEGACY_ALLOW_DELETE=true. Returns affectedRows. To empty a table use TRUNCATE via mysql_legacy_ddl, not a WHERE-less DELETE.

mysql_legacy_ddlA

Runs exactly one table-level CREATE, ALTER, DROP, TRUNCATE, or RENAME supplied in sql. Off unless MYSQL_LEGACY_ALLOW_DDL=true. DROP and TRUNCATE are irreversible. Rejects DROP DATABASE, views, and indexes. For row changes use mysql_legacy_insert, mysql_legacy_update, or mysql_legacy_delete.

mysql_legacy_list_databasesA

Lists database names via SHOW DATABASES. Hides mysql and information_schema unless include_system_databases=true (or MYSQL_LEGACY_HIDE_SYSTEM_DATABASES=false). Then pass a name to mysql_legacy_list_tables. Does not list tables or columns.

mysql_legacy_list_tablesA

Lists base tables and views in one database via SHOW FULL TABLES FROM database. Pass database. For column types use mysql_legacy_describe_table; for CREATE TABLE text use mysql_legacy_show_create_table; for keys use mysql_legacy_list_indexes. To list databases first, use mysql_legacy_list_databases.

mysql_legacy_describe_tableA

Lists columns for database.table via SHOW FULL COLUMNS, including type, nullability, keys, comments, and collation. Use this for per-column metadata. For the full CREATE TABLE text and default charset use mysql_legacy_show_create_table. For index column order use mysql_legacy_list_indexes.

mysql_legacy_show_create_tableA

Returns SHOW CREATE TABLE for database.table plus the parsed default charset. Use this for DDL text. For per-column types and collation use mysql_legacy_describe_table. For unique/non-unique keys use mysql_legacy_list_indexes.

mysql_legacy_list_indexesA

Lists indexes for database.table via SHOW INDEX (key name, columns, uniqueness, type). Use this for keys. For column types use mysql_legacy_describe_table; for full DDL use mysql_legacy_show_create_table.

Prompts

Interactive templates invoked by user choice

NameDescription

No prompts

Resources

Contextual data attached and managed by the client

NameDescription

No resources

TDQS

A4.6/5.0

Scored across 11 tools

Disambiguation5/5

Each tool targets a distinct operation: query, write, schema change, database/table listing, schema introspection, and connection check. The descriptions explicitly cross-reference each other to prevent confusion between similar metadata tools like describe_table and show_create_table.

Naming Consistency4/5

All tools share the mysql_legacy_ prefix and use snake_case, with most following a verb_noun pattern like list_tables and describe_table. The mysql_legacy_ddl tool is a minor deviation since it uses a noun/acronym rather than a clear verb.

Tool Count5/5

Eleven tools is well-scoped for a MySQL database server covering connection, querying, writing, schema changes, and metadata inspection. Each tool has a clear role and none feel redundant or excessive.

Completeness4/5

The tool surface covers the core CRUD lifecycle, DDL operations, database/table discovery, column introspection, index listing, and connection verification. Minor gaps exist such as lack of transaction control, index creation/dropping, and view management, but these appear to be intentional safety restrictions.

Maintenance

ActivityMaintained
ResponsivenessNo issues