Skip to main content
Glama
mysql-mcp-lite

mysql-mcp-lite

Server Configuration

Describes the environment variables required to run the server.

NameRequiredDescriptionDefault
MYSQL_HOSTNoMySQL host.127.0.0.1
MYSQL_PORTNoMySQL port.3306
MYSQL_USERNoMySQL user.root
MYSQL_DATABASENoDefault database for list_tables, describe_table, and query. No default database is configured.
MYSQL_MAX_ROWSNoRows returned per call; truncated is true when the result is cut.500
MYSQL_PASSWORDNoMySQL password. Defaults to empty.
MYSQL_TIMEOUT_MSNoPer-SELECT limit using MAX_EXECUTION_TIME.30000
MYSQL_ALLOW_WRITENoSet to true to let query run any statement, committed. Read-only by default.off

Instructions

Guidance the server publishes about itself, which clients place ahead of the tool catalog so the model reads it before choosing anything.

Explore a MySQL database: list_databases -> list_tables -> describe_table, then query. Read-only: only SELECT/SHOW/DESCRIBE/EXPLAIN/WITH run.

Capabilities

Features and capabilities supported by this server

Protocol revision2025-11-25

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

Tools

Functions exposed to the LLM to take actions

NameDescription
list_databasesA

List the databases visible to the configured MySQL user.

list_tablesA

List tables and views in a database (default: MYSQL_DATABASE), with approximate row counts.

describe_tableB

Return the CREATE TABLE statement: columns, types, indexes and foreign keys.

queryA

Run one SQL statement. Returns JSON {columns, rows, truncated}: at most MYSQL_MAX_ROWS rows, truncated true when cut; writes return {rows_affected, last_insert_id}. Read-only (SELECT/SHOW/DESCRIBE/EXPLAIN/WITH) unless the server runs with MYSQL_ALLOW_WRITE=true.

Prompts

Interactive templates invoked by user choice

NameDescription
mysqlAsk about the database in plain words; the agent explores the schema and runs SQL.

Resources

Contextual data attached and managed by the client

NameDescription

No resources

TDQS

A3.8/5.0

Scored across 4 tools

Disambiguation5/5

Each tool has a clear, non-overlapping role: list_databases scopes to the server, list_tables scopes to one database, describe_table details one table, and query executes SQL. An agent can pick correctly without hesitation, and the read-only/write gating on `query` is explicitly stated.

Naming Consistency4/5

list_databases, list_tables, describe_table follow a clean verb_noun pattern, with `query` being a single-verb outlier. That deviation is natural for a generic SQL execution tool and remains readable, so it is a minor inconsistency rather than a structural one.

Tool Count5/5

Four tools is a deliberately lean, well-scoped surface for a 'lite' MySQL server, and each one earns its place as a distinct discovery step. Nothing feels padded, and a generic `query` tool absorbs the long tail of operations without inflating the count.

Completeness4/5

Discovery (databases → tables → schema) plus arbitrary SQL execution covers the read-only exploration workflow end to end, including writes when MYSQL_ALLOW_WRITE is set. Minor gaps exist—no dedicated index/column listing, no EXPLAIN helper, and no separate DDL or transaction tools—but `query` lets an agent work around all of them.

Maintenance

ActivityMaintained
ResponsivenessNo recent community issues