MySQL (read-only, switchable)
Read-only MySQL access, with the database and server switchable mid-conversation.
- Pricing
- Open source
- Runs
- Locally
- Version
- 1.1.6
- Listing updated
- 4 days ago
About MySQL (read-only, switchable)
MySQL (read-only, switchable) is an open-source MCP server for databases. It runs locally on your machine and is started by your AI client.
Install
Run in a terminal
claude mcp add mcp-mysql-read-only --env MYSQL_PASSWORD='<MYSQL_PASSWORD>' --env MYSQL_PROFILES='<MYSQL_PROFILES>' -- npx -y @shibbirweb/mcp-mysql-read-onlyAdd to claude_desktop_config.json
{
"mcpServers": {
"mcp-mysql-read-only": {
"command": "npx",
"args": [
"-y",
"@shibbirweb/mcp-mysql-read-only"
],
"env": {
"MYSQL_PASSWORD": "<MYSQL_PASSWORD>",
"MYSQL_PROFILES": "<MYSQL_PROFILES>"
}
}
}
}Add to ~/.cursor/mcp.json
{
"mcpServers": {
"mcp-mysql-read-only": {
"command": "npx",
"args": [
"-y",
"@shibbirweb/mcp-mysql-read-only"
],
"env": {
"MYSQL_PASSWORD": "<MYSQL_PASSWORD>",
"MYSQL_PROFILES": "<MYSQL_PROFILES>"
}
}
}
}Add to .vscode/mcp.json
{
"servers": {
"mcp-mysql-read-only": {
"type": "stdio",
"command": "npx",
"args": [
"-y",
"@shibbirweb/mcp-mysql-read-only"
],
"env": {
"MYSQL_PASSWORD": "<MYSQL_PASSWORD>",
"MYSQL_PROFILES": "<MYSQL_PROFILES>"
}
}
}
}Add to ~/.codeium/windsurf/mcp_config.json
{
"mcpServers": {
"mcp-mysql-read-only": {
"command": "npx",
"args": [
"-y",
"@shibbirweb/mcp-mysql-read-only"
],
"env": {
"MYSQL_PASSWORD": "<MYSQL_PASSWORD>",
"MYSQL_PROFILES": "<MYSQL_PROFILES>"
}
}
}
}Add to your client's MCP settings (most use this shape)
{
"mcpServers": {
"mcp-mysql-read-only": {
"command": "npx",
"args": [
"-y",
"@shibbirweb/mcp-mysql-read-only"
],
"env": {
"MYSQL_PASSWORD": "<MYSQL_PASSWORD>",
"MYSQL_PROFILES": "<MYSQL_PROFILES>"
}
}
}
}Configuration
MYSQL_HOSTHostname of the MySQL server. Defaults to 127.0.0.1MYSQL_PORTPort of the MySQL server. Defaults to 3306MYSQL_USERMySQL user. Prefer an account holding only SELECT grantsMYSQL_PASSWORDPassword for MYSQL_USER. Empty when the account has noneMYSQL_DATABASEDatabase to open at startup. Can be changed later without restartingMYSQL_PROFILESJSON object of named connections to switch between, keyed by profile nameMYSQL_DEFAULT_PROFILEWhich MYSQL_PROFILES entry to start onMYSQL_CONNECT_TIMEOUT_MSConnection timeout in milliseconds. Defaults to 10000MYSQL_QUERY_TIMEOUT_MSServer-side query timeout in milliseconds. Defaults to 30000MYSQL_HOSTHostname of the MySQL server. Use host.docker.internal to reach the hostMYSQL_PORTPort of the MySQL server. Defaults to 3306MYSQL_USERMySQL user. Prefer an account holding only SELECT grantsMYSQL_PASSWORDPassword for MYSQL_USER. Empty when the account has noneMYSQL_DATABASEDatabase to open at startup. Can be changed later without restartingMYSQL_PROFILESJSON object of named connections to switch between, keyed by profile nameMYSQL_DEFAULT_PROFILEWhich MYSQL_PROFILES entry to start onMYSQL_CONNECT_TIMEOUT_MSConnection timeout in milliseconds. Defaults to 10000MYSQL_QUERY_TIMEOUT_MSServer-side query timeout in milliseconds. Defaults to 30000
Pricing
Open source
MySQL (read-only, switchable) FAQ
Is MySQL (read-only, switchable) free?
Yes. MySQL (read-only, switchable) is open source, so you can use and self-host it for free.
How do I add MySQL (read-only, switchable) to Claude Code?
Run this command in your terminal: claude mcp add mcp-mysql-read-only --env MYSQL_PASSWORD='<MYSQL_PASSWORD>' --env MYSQL_PROFILES='<MYSQL_PROFILES>' -- npx -y @shibbirweb/mcp-mysql-read-only
What are the best alternatives to MySQL (read-only, switchable)?
The closest alternatives to MySQL (read-only, switchable) are Midplane, PlatypusDB, Lorebase, Sovaria and model2data studio.
Alternatives to MySQL (read-only, switchable)

Midplane
MCP serverPostgres gateway for AI agents with table grants, column masking and approval for writes
Runs locally- Open source
- 5 GitHub stars
- Databases

PlatypusDB
MCP serverGives MCP clients access to your PlatypusDB database connections, scoped per agent
Runs locally- Open source
- Databases

Lorebase
MCP serverLets agents read and change a governed, versioned Postgres knowledge graph
Runs locally- Open source
- Knowledge and memory
Sovaria
MCP serverManage a Sovaria backend (Postgres, auth, storage, functions) from an AI assistant
Not checked yet- 4 tools
- Remote
- Freemium
- Databases

model2data studio
MCP serverGenerate realistic connected test data, dbt projects and dashboards from a schema
- Remote
- Freemium
- Databases

semlayer
MCP serverInfers a semantic layer from your data warehouse and serves it to agents
Runs locally- Free
- Databases