Skip to main content
Glama
liliangshan

MCP MySQL Server

by liliangshan

Server Configuration

Describes the environment variables required to run the server.

NameRequiredDescriptionDefault
READONLYNoIf set to 'true', only SELECT and SHOW commands are allowedfalse
ALLOW_DDLNoWhether to allow DDL operationsfalse
ALLOW_DROPNoWhether to allow DROP operationsfalse
MYSQL_HOSTYesMySQL host addresslocalhost
MYSQL_PORTYesMySQL port3306
MYSQL_USERYesMySQL usernameroot
MCP_LOG_DIRNoLog directory./.setting
TOOL_PREFIXNoOptional tool prefix for tool names and config isolation
ALLOW_DELETENoWhether to allow DELETE operationsfalse
MCP_LOG_FILENoLog filenamemcp-mysql.log
PROJECT_NAMENoOptional project branding for tool descriptions
MYSQL_DATABASEYesDatabase name
MYSQL_PASSWORDYesMySQL password
MCP_DDL_LOG_FILENoDDL SQL log filenameddl.sql

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
}

Tools

Functions exposed to the LLM to take actions

NameDescription
sql_queryC

Execute SQL query, supports DDL and DML operations

get_database_infoA

Get database information, including database list, table list and configuration information

get_operation_logsC

Get operation logs

check_permissionsA

Check database permissions for DDL, DROP, DELETE and other operations. Returns detailed permission status including readonly mode restrictions (only SELECT and SHOW allowed when readonly is enabled)

get_ddl_sql_logsC

Get DDL SQL operation logs

Prompts

Interactive templates invoked by user choice

NameDescription

No prompts

Resources

Contextual data attached and managed by the client

NameDescription

No resources

TDQS

B3.2/5.0

Scored across 5 tools

Disambiguation4/5

Most tools have distinct purposes, but 'get_ddl_sql_logs' and 'get_operation_logs' overlap, as DDL logs are a subset of operation logs. This may cause confusion.

Naming Consistency3/5

Three tools follow the 'get_' prefix pattern, but 'check_permissions' uses 'check_' and 'sql_query' is a noun-verb inversion, breaking consistency.

Tool Count5/5

Five tools cover essential database operations (permissions, info, query, logs) without unnecessary bloat, well-scoped for a MySQL server.

Completeness4/5

Core operations are covered via sql_query for DDL/DML and get_database_info for browsing. Missing explicit user management tools, but sql_query can compensate.

Maintenance

ActivityInactive
ResponsivenessSlow