Skip to main content
Glama

Server Configuration

Describes the environment variables required to run the server.

NameRequiredDescriptionDefault
MYSQL_HOSTYesMySQL server hostname or IP
MYSQL_PORTNoMySQL server port3306
MYSQL_USERYesMySQL username
MYSQL_DATABASENoDefault database (can be overridden per tool call)
MYSQL_PASSWORDYesMySQL password

Capabilities

Features and capabilities supported by this server

CapabilityDetails
tools
{
  "listChanged": true
}

Tools

Functions exposed to the LLM to take actions

NameDescription
mysql_list_databasesA

List all databases on the MySQL server.

Returns database names the current user has access to.

Returns:

  • markdown: formatted list

  • json: { databases: string[] }

mysql_list_tablesA

List all tables in a MySQL database.

Args:

  • database (string, optional): Database name. Uses MYSQL_DATABASE if omitted.

  • response_format ('markdown' | 'json'): Output format (default: 'markdown')

Returns:

  • markdown: formatted table list

  • json: { database: string, tables: string[], count: number }

mysql_describe_tableA

Get column definitions for a MySQL table (equivalent to DESCRIBE or SHOW COLUMNS).

Args:

  • table (string, required): Table name

  • database (string, optional): Database name. Uses MYSQL_DATABASE if omitted.

  • response_format ('markdown' | 'json'): Output format (default: 'markdown')

Returns column info: Field, Type, Null, Key, Default, Extra

mysql_show_create_tableA

Get the full CREATE TABLE DDL statement for a table.

Args:

  • table (string, required): Table name

  • database (string, optional): Database name. Uses MYSQL_DATABASE if omitted.

Returns the complete CREATE TABLE SQL with all indexes, constraints, and engine settings.

mysql_queryA

Execute a read-only SELECT query against MySQL.

Only SELECT and SHOW/EXPLAIN statements are permitted. Use mysql_execute for write operations.

Args:

  • sql (string, required): SQL SELECT statement. Use ? placeholders for params.

  • params (array, optional): Bind parameters corresponding to ? placeholders.

  • database (string, optional): Database name. Uses MYSQL_DATABASE if omitted.

  • limit (number, optional): Max rows to return (default: 100, max: 1000).

  • response_format ('markdown' | 'json'): Output format (default: 'json')

Returns:

  • json: { rows: object[], count: number, has_more: boolean }

  • markdown: formatted table

Examples:

  • sql: "SELECT * FROM biz_exhaust_yg WHERE jcrq = ? LIMIT 10", params: ["2026-03"]

  • sql: "SELECT COUNT(*) as cnt FROM biz_exhaust_hy"

mysql_executeA

Execute a write SQL statement (INSERT, UPDATE, DELETE, DDL).

WARNING: This tool modifies data. Use with caution.

Args:

  • sql (string, required): SQL statement. Use ? placeholders for parameters.

  • params (array, optional): Bind parameters corresponding to ? placeholders.

  • database (string, optional): Database name. Uses MYSQL_DATABASE if omitted.

Returns: { affectedRows: number, insertId: number, changedRows: number }

Examples:

  • sql: "UPDATE biz_exhaust_hy SET DELETE_FLAG = 'DELETED' WHERE ID = ?", params: [123]

  • sql: "INSERT INTO my_table (name) VALUES (?)", params: ["test"]

mysql_table_statsA

Get row count and size statistics for tables in a database.

Args:

  • database (string, optional): Database name. Uses MYSQL_DATABASE if omitted.

  • table (string, optional): Filter to a specific table. If omitted, returns all tables.

  • response_format ('markdown' | 'json'): Output format (default: 'markdown')

Returns per table: table_name, row_count, data_size_mb, index_size_mb, engine, create_time

Prompts

Interactive templates invoked by user choice

NameDescription

No prompts

Resources

Contextual data attached and managed by the client

NameDescription

No resources

Latest Blog Posts

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/donald-ada/mysql'

If you have feedback or need assistance with the MCP directory API, please join our Discord server