MySQL MCP Server

Server Configuration

Describes the environment variables required to run the server.

NameRequiredDescriptionDefault
MYSQL_HOSTNoMySQL server hostnamelocalhost
MYSQL_PORTNoMySQL server port3306
MYSQL_USERNoMySQL usernamemcp101
MYSQL_DATABASENoMySQL database namemcpdb
MYSQL_PASSWORDNoMySQL password123qwe

Schema

Prompts

Interactive templates invoked by user choice

NameDescription

No prompts

Resources

Contextual data attached and managed by the client

NameDescription

No resources

Tools

Functions exposed to the LLM to take actions

NameDescription
run_sql_query

Executes a read-only SQL query (SELECT statements only) against the MySQL database.

create_table

Creates a new table in the MySQL database.

insert_data

Inserts data into a table in the MySQL database.

update_data

Updates data in a table in the MySQL database.

delete_data

Deletes data from a table in the MySQL database.

execute_sql

Executes any non-SELECT SQL statement (e.g., ALTER TABLE, DROP, etc.)

ID: chaok7d5bx