MySQL MCP Server

by xiangma9712
Verified

Server Configuration

Describes the environment variables required to run the server.

NameRequiredDescriptionDefault
MYSQL_HOSTYesHostname to access MySQL server. Use host.docker.internal to access host services from Docker container.host.docker.internal
MYSQL_PORTYesMySQL server port3306
MYSQL_USERYesMySQL username
MYSQL_PASSWORDYesMySQL password

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
query

読み取り専用のSQLクエリを実行します。

test_execute

SQLが実行可能か確認し、最後にロールバックします。

list_tables

データベース内のテーブル一覧を取得します。

describe_table

テーブルのカラム情報を取得します。