MCP directory
MM

MySQL MCP

by github.com/gistrec · v1.1.1 · updated Nov 4, 2026

MCP server for one MySQL database: schema, read-only queries and guarded writes.

npm

Run it locally

Install the package and point your AI client at it.

Environment variables

  • MYSQL_HOST

    Database host.

  • MYSQL_PORT

    Database port.

  • MYSQL_USERrequired

    MySQL user. Use one with the least privileges the task needs, never root.

  • MYSQL_PASSsecret

    Password for that user. Treat it as a secret; MYSQL_PASS_FILE reads it from a file instead.

  • MYSQL_DBrequired

    The one database this server is bound to. No tool can leave it.

  • MYSQL_SSL

    Require a TLS connection to the server.

  • MYSQL_SSL_CA

    Path to the CA bundle verifying the server certificate; implies MYSQL_SSL.

  • ALLOW_INSERT_OPERATION

    Allow INSERT statements through the execute tool.

  • ALLOW_UPDATE_OPERATION

    Allow UPDATE statements through the execute tool.

  • ALLOW_DELETE_OPERATION

    Allow DELETE statements through the execute tool.

  • MYSQL_MAX_ROWS

    Row cap for one read; the result is marked truncated when it is hit.

  • MYSQL_TIMEOUT_MS

    Statement timeout in milliseconds; the connection is dropped on expiry.

More from github.com/gistrec

More MCP servers