MCP directory
M

MySQL

by github.com/burakdirin · v0.2.0 · updated Dec 4, 2026

Query MySQL databases from AI assistants, read-only by default with opt-in writes.

PyPI

Run it locally

Install the package and point your AI client at it.

PyPI

uvx mysqldb-mcp-server==0.2.0

Environment variables

  • MYSQL_HOSTrequired

    MySQL host name or IP address.

  • MYSQL_PORT

    TCP port of the MySQL server.

  • MYSQL_USERrequired

    User name; use a dedicated user with SELECT and SHOW VIEW grants only.

  • MYSQL_PASSWORDsecret

    Password of the MySQL user.

  • MYSQL_DATABASE

    Default schema for unqualified table names.

  • MYSQL_SSL_MODE

    TLS mode, as in the mysql client: DISABLED, PREFERRED, REQUIRED, VERIFY_CA or VERIFY_IDENTITY. Defaults to VERIFY_CA when MYSQL_SSL_CA is set.

  • MYSQL_SSL_CA

    CA certificate file that VERIFY_CA and VERIFY_IDENTITY trust in addition to the system's CAs.

  • MYSQL_ALLOW_WRITE

    Offer the mysql_execute tool, which can change data and schema.

  • MYSQL_QUERY_TIMEOUT

    Seconds a call may take before its statement is stopped.

  • MYSQL_MAX_ROWS

    Most rows mysql_query returns.

More from github.com/burakdirin

More MCP servers