Skip to content
Claude Code

MySQL (read-only, switchable) for Claude Code

io.github.shibbirweb/mcp-mysql-read-only

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

client:Claude Code transport:stdio runtime:npm

Install MySQL (read-only, switchable) in Claude Code

run in your project directory

Held in this page only — never stored, logged, or sent anywhere but back to your screen.

claude mcp add mcp-mysql-read-only -e MYSQL_HOST=<MYSQL_HOST> -e MYSQL_PORT=<MYSQL_PORT> -e MYSQL_USER=<MYSQL_USER> -e MYSQL_PASSWORD=<MYSQL_PASSWORD> -e MYSQL_DATABASE=<MYSQL_DATABASE> -e MYSQL_PROFILES=<MYSQL_PROFILES> -e MYSQL_DEFAULT_PROFILE=<MYSQL_DEFAULT_PROFILE> -e MYSQL_CONNECT_TIMEOUT_MS=<MYSQL_CONNECT_TIMEOUT_MS> -e MYSQL_QUERY_TIMEOUT_MS=<MYSQL_QUERY_TIMEOUT_MS> -- npx -y @shibbirweb/mcp-mysql-read-only

Adds it for this project only. Append --scope user to make it available everywhere. Claude Code docs

MySQL (read-only, switchable) in other clients