MySql MCP Server

by sussa3007
Verified

Server Configuration

Describes the environment variables required to run the server.

NameRequiredDescriptionDefault
MYSQL_HOSTYesDatabase server hostname or IP addresslocalhost
MYSQL_PORTNoDatabase server port3306
MYSQL_USERYesDatabase username
MYSQL_DATABASEYesDatabase name to connect to
MYSQL_PASSWORDYesDatabase password
MYSQL_READONLYNoSet to true for read-only accesstrue

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
status

Check the current database connection status.

connect

Connect to a MySQL database.

disconnect

Close the current MySQL database connection.

query

Execute an SQL query on the connected database.

list_tables

Get a list of tables in the current database.

describe_table

Get the structure of a specific table.

list_databases

Get a list of all accessible databases on the server.

use_database

Switch to a different database.

set_readonly

Enable or disable read-only mode

ID: o2hcex46qi