Skip to main content
Glama
81832310

mcp-mysql-server

by 81832310

Server Configuration

Describes the environment variables required to run the server.

NameRequiredDescriptionDefault
MAX_ROWSNoMaximum query result rows (default: 1000)
READONLYNoRead-only mode (default: true)
ALLOW_DDLNoAllow DDL statements (default: false)
MYSQL_DSNNoDSN connection string mysql://user:pass@host:port/db, mutually exclusive with individual variables
POOL_SIZENoConnection pool size (default: 5)
MYSQL_HOSTNoDatabase host (default: 127.0.0.1)
MYSQL_PORTNoDatabase port (default: 3306)
MYSQL_USERNoDatabase user (required if not using DSN)
QUERY_TIMEOUTNoQuery timeout in milliseconds (default: 30000)
MYSQL_DATABASENoDefault database
MYSQL_PASSWORDNoDatabase password (required if not using DSN)
MYSQL_PROFILES_FILENoPath to profiles.yml file (overrides default ~/.mcp-mysql/profiles.yml)

Capabilities

Features and capabilities supported by this server

CapabilityDetails
tools
{
  "listChanged": true
}

Tools

Functions exposed to the LLM to take actions

NameDescription
list_profilesA

List all available database profiles (passwords hidden)

use_profileA

Switch the current database profile (validates connectivity before switching)

current_profileA

Show the current active database profile info

queryC

Execute SQL query (SELECT, SHOW, etc. In readonly mode, only reads are allowed)

list_databasesB

List all accessible databases

list_tablesB

List tables in a database with row counts

describe_tableA

Show table structure: columns, types, indexes

explain_queryC

Run EXPLAIN on a SELECT query and provide analysis

generate_schema_docB

Generate Markdown documentation for database tables

analyze_relationsB

Analyze table relationships via foreign keys and indexes

table_statsB

Show table statistics: row counts, data/index sizes, update 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/81832310/mcp-mysql-server'

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