MCP directory
M(

MySQL (read-only, switchable)

by github.com/shibbirweb · v1.1.6 · updated Sep 24, 2026

Read-only MySQL access, with the database and server switchable mid-conversation.

npmDocker

Run it locally

Install the package and point your AI client at it.

npm

npx -y @shibbirweb/[email protected]

Environment variables

  • MYSQL_HOST

    Hostname of the MySQL server. Defaults to 127.0.0.1

  • MYSQL_PORT

    Port of the MySQL server. Defaults to 3306

  • MYSQL_USER

    MySQL user. Prefer an account holding only SELECT grants

  • MYSQL_PASSWORDsecret

    Password for MYSQL_USER. Empty when the account has none

  • MYSQL_DATABASE

    Database to open at startup. Can be changed later without restarting

  • MYSQL_PROFILESsecret

    JSON object of named connections to switch between, keyed by profile name

  • MYSQL_DEFAULT_PROFILE

    Which MYSQL_PROFILES entry to start on

  • MYSQL_CONNECT_TIMEOUT_MS

    Connection timeout in milliseconds. Defaults to 10000

  • MYSQL_QUERY_TIMEOUT_MS

    Server-side query timeout in milliseconds. Defaults to 30000

Docker

docker run -i --rm docker.io/shibbirweb/mcp-mysql-read-only:1.1.6

Environment variables

  • MYSQL_HOST

    Hostname of the MySQL server. Use host.docker.internal to reach the host

  • MYSQL_PORT

    Port of the MySQL server. Defaults to 3306

  • MYSQL_USER

    MySQL user. Prefer an account holding only SELECT grants

  • MYSQL_PASSWORDsecret

    Password for MYSQL_USER. Empty when the account has none

  • MYSQL_DATABASE

    Database to open at startup. Can be changed later without restarting

  • MYSQL_PROFILESsecret

    JSON object of named connections to switch between, keyed by profile name

  • MYSQL_DEFAULT_PROFILE

    Which MYSQL_PROFILES entry to start on

  • MYSQL_CONNECT_TIMEOUT_MS

    Connection timeout in milliseconds. Defaults to 10000

  • MYSQL_QUERY_TIMEOUT_MS

    Server-side query timeout in milliseconds. Defaults to 30000

More from github.com/shibbirweb

More MCP servers