Skip to main content
Glama
designcomputer

MySQL MCP Server

Server Configuration

Describes the environment variables required to run the server.

NameRequiredDescriptionDefault
MYSQL_HOSTYesDatabase hostlocalhost
MYSQL_PORTNoDatabase port (defaults to 3306 if not specified)3306
MYSQL_USERYesMySQL username
MYSQL_DATABASEYesMySQL database name
MYSQL_PASSWORDYesMySQL password

Capabilities

Features and capabilities supported by this server

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

Tools

Functions exposed to the LLM to take actions

NameDescription
execute_sqlA

Execute a SQL statement against the MySQL server. Use for SELECT, DML (INSERT/UPDATE/DELETE), SHOW, DESCRIBE, and ad-hoc queries. Supports cross-database queries using database.table notation. Single statements only — use fully qualified names instead of USE statements.

get_schema_infoA

Get column metadata for a table or all tables in the configured database: column names, data types, nullability, default values, and comments. Call this before querying an unfamiliar table. Omit table_name to see all tables at once. Accepts bare table names (uses MYSQL_DATABASE) or database.table for cross-database lookups.

get_table_sampleA

Fetch a small sample of rows from a table to understand its data format and content. Use alongside get_schema_info before writing complex queries. Accepts bare table names (uses MYSQL_DATABASE) or database.table for cross-database lookups.

Prompts

Interactive templates invoked by user choice

NameDescription
explore_databaseSystematically explore the database: discover available tables, inspect their schemas, sample the data, and summarize what's there.
analyze_tableDeep-dive into a specific table: retrieve its schema, sample its data, and suggest useful queries.

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/designcomputer/mysql_mcp_server'

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