Install
Add to ~/Library/Application Support/Claude/claude_desktop_config.json
Windows / Linux path
%APPDATA%\Claude\claude_desktop_config.json~/.config/Claude/claude_desktop_config.json{
"mcpServers": {
"io-github-shibbirweb-mcp-db-read-only": {
"command": "npx",
"args": [
"-y",
"@shibbirweb/mcp-db-read-only"
],
"env": {
"DB_URL": "<VALUE>",
"DB_PASSWORD": "<YOUR_VALUE>",
"DB_PROFILES": "<YOUR_VALUE>",
"DB_DEFAULT_PROFILE": "<VALUE>",
"DB_CONNECT_TIMEOUT_MS": "10000",
"DB_QUERY_TIMEOUT_MS": "30000",
"DB_LOG": "<VALUE>",
"DB_LOG_FILE": "<VALUE>",
"DB_LOG_DIR": "<VALUE>",
"DB_LOG_FORMAT": "<VALUE>",
"DB_LOG_PORT": "<VALUE>",
"DB_LOG_HISTORY": "<VALUE>",
"MYSQL_HOST": "<VALUE>",
"MYSQL_USER": "<VALUE>",
"MYSQL_PASSWORD": "<YOUR_VALUE>",
"MYSQL_DATABASE": "<VALUE>",
"MYSQL_PROFILES": "<VALUE>",
"MYSQL_DEFAULT_PROFILE": "<VALUE>"
}
}
}
}
Restart Claude Desktop to activate the new server.
Add to .cursor/mcp.json (project) or ~/.cursor/mcp.json (global)
Windows / Linux path
.cursor\mcp.json (project) or %USERPROFILE%\.cursor\mcp.json (global).cursor/mcp.json (project) or ~/.cursor/mcp.json (global){
"mcpServers": {
"io-github-shibbirweb-mcp-db-read-only": {
"command": "npx",
"args": [
"-y",
"@shibbirweb/mcp-db-read-only"
],
"env": {
"DB_URL": "<VALUE>",
"DB_PASSWORD": "<YOUR_VALUE>",
"DB_PROFILES": "<YOUR_VALUE>",
"DB_DEFAULT_PROFILE": "<VALUE>",
"DB_CONNECT_TIMEOUT_MS": "10000",
"DB_QUERY_TIMEOUT_MS": "30000",
"DB_LOG": "<VALUE>",
"DB_LOG_FILE": "<VALUE>",
"DB_LOG_DIR": "<VALUE>",
"DB_LOG_FORMAT": "<VALUE>",
"DB_LOG_PORT": "<VALUE>",
"DB_LOG_HISTORY": "<VALUE>",
"MYSQL_HOST": "<VALUE>",
"MYSQL_USER": "<VALUE>",
"MYSQL_PASSWORD": "<YOUR_VALUE>",
"MYSQL_DATABASE": "<VALUE>",
"MYSQL_PROFILES": "<VALUE>",
"MYSQL_DEFAULT_PROFILE": "<VALUE>"
}
}
}
}
Cursor usually picks up config changes automatically; if the server does not appear, reload the window.
Add to .mcp.json (project) or ~/.claude.json (global)
Windows / Linux path
.mcp.json (project) or %USERPROFILE%\.claude.json (global).mcp.json (project) or ~/.claude.json (global){
"mcpServers": {
"io-github-shibbirweb-mcp-db-read-only": {
"command": "npx",
"args": [
"-y",
"@shibbirweb/mcp-db-read-only"
],
"env": {
"DB_URL": "<VALUE>",
"DB_PASSWORD": "<YOUR_VALUE>",
"DB_PROFILES": "<YOUR_VALUE>",
"DB_DEFAULT_PROFILE": "<VALUE>",
"DB_CONNECT_TIMEOUT_MS": "10000",
"DB_QUERY_TIMEOUT_MS": "30000",
"DB_LOG": "<VALUE>",
"DB_LOG_FILE": "<VALUE>",
"DB_LOG_DIR": "<VALUE>",
"DB_LOG_FORMAT": "<VALUE>",
"DB_LOG_PORT": "<VALUE>",
"DB_LOG_HISTORY": "<VALUE>",
"MYSQL_HOST": "<VALUE>",
"MYSQL_USER": "<VALUE>",
"MYSQL_PASSWORD": "<YOUR_VALUE>",
"MYSQL_DATABASE": "<VALUE>",
"MYSQL_PROFILES": "<VALUE>",
"MYSQL_DEFAULT_PROFILE": "<VALUE>"
}
}
}
}
The server will be available in the next Claude Code session.
Add to .vscode/mcp.json
Windows / Linux path
.vscode\mcp.json.vscode/mcp.json{
"servers": {
"io-github-shibbirweb-mcp-db-read-only": {
"command": "npx",
"args": [
"-y",
"@shibbirweb/mcp-db-read-only"
],
"env": {
"DB_URL": "<VALUE>",
"DB_PASSWORD": "<YOUR_VALUE>",
"DB_PROFILES": "<YOUR_VALUE>",
"DB_DEFAULT_PROFILE": "<VALUE>",
"DB_CONNECT_TIMEOUT_MS": "10000",
"DB_QUERY_TIMEOUT_MS": "30000",
"DB_LOG": "<VALUE>",
"DB_LOG_FILE": "<VALUE>",
"DB_LOG_DIR": "<VALUE>",
"DB_LOG_FORMAT": "<VALUE>",
"DB_LOG_PORT": "<VALUE>",
"DB_LOG_HISTORY": "<VALUE>",
"MYSQL_HOST": "<VALUE>",
"MYSQL_USER": "<VALUE>",
"MYSQL_PASSWORD": "<YOUR_VALUE>",
"MYSQL_DATABASE": "<VALUE>",
"MYSQL_PROFILES": "<VALUE>",
"MYSQL_DEFAULT_PROFILE": "<VALUE>"
}
}
}
}
Reload the VS Code window to activate.
Add to ~/.codeium/windsurf/mcp_config.json
Windows / Linux path
%USERPROFILE%\.codeium\windsurf\mcp_config.json~/.codeium/windsurf/mcp_config.json{
"mcpServers": {
"io-github-shibbirweb-mcp-db-read-only": {
"command": "npx",
"args": [
"-y",
"@shibbirweb/mcp-db-read-only"
],
"env": {
"DB_URL": "<VALUE>",
"DB_PASSWORD": "<YOUR_VALUE>",
"DB_PROFILES": "<YOUR_VALUE>",
"DB_DEFAULT_PROFILE": "<VALUE>",
"DB_CONNECT_TIMEOUT_MS": "10000",
"DB_QUERY_TIMEOUT_MS": "30000",
"DB_LOG": "<VALUE>",
"DB_LOG_FILE": "<VALUE>",
"DB_LOG_DIR": "<VALUE>",
"DB_LOG_FORMAT": "<VALUE>",
"DB_LOG_PORT": "<VALUE>",
"DB_LOG_HISTORY": "<VALUE>",
"MYSQL_HOST": "<VALUE>",
"MYSQL_USER": "<VALUE>",
"MYSQL_PASSWORD": "<YOUR_VALUE>",
"MYSQL_DATABASE": "<VALUE>",
"MYSQL_PROFILES": "<VALUE>",
"MYSQL_DEFAULT_PROFILE": "<VALUE>"
}
}
}
}
Restart Windsurf (or refresh its MCP servers panel) to activate the new server.
Windsurf Next uses ~/.codeium/windsurf-next/mcp_config.json. Devin Desktop (the Windsurf rebrand) uses ~/.config/devin/mcp_config.json and imports the Windsurf file.
Add to ~/Library/Application Support/Code/User/globalStorage/saoudrizwan.claude-dev/settings/cline_mcp_settings.json
Windows / Linux path
%APPDATA%\Code\User\globalStorage\saoudrizwan.claude-dev\settings\cline_mcp_settings.json~/.config/Code/User/globalStorage/saoudrizwan.claude-dev/settings/cline_mcp_settings.json{
"mcpServers": {
"io-github-shibbirweb-mcp-db-read-only": {
"command": "npx",
"args": [
"-y",
"@shibbirweb/mcp-db-read-only"
],
"env": {
"DB_URL": "<VALUE>",
"DB_PASSWORD": "<YOUR_VALUE>",
"DB_PROFILES": "<YOUR_VALUE>",
"DB_DEFAULT_PROFILE": "<VALUE>",
"DB_CONNECT_TIMEOUT_MS": "10000",
"DB_QUERY_TIMEOUT_MS": "30000",
"DB_LOG": "<VALUE>",
"DB_LOG_FILE": "<VALUE>",
"DB_LOG_DIR": "<VALUE>",
"DB_LOG_FORMAT": "<VALUE>",
"DB_LOG_PORT": "<VALUE>",
"DB_LOG_HISTORY": "<VALUE>",
"MYSQL_HOST": "<VALUE>",
"MYSQL_USER": "<VALUE>",
"MYSQL_PASSWORD": "<YOUR_VALUE>",
"MYSQL_DATABASE": "<VALUE>",
"MYSQL_PROFILES": "<VALUE>",
"MYSQL_DEFAULT_PROFILE": "<VALUE>"
}
}
}
}
Cline reloads cline_mcp_settings.json automatically; if the server does not appear, reload the VS Code window.
Open it from Cline's MCP Servers panel → Configure. Roo Code uses a different file and format.
Configuration
Environment variables this server reads. Secrets stay on your machine.
| Name | Required | Description |
|---|---|---|
| DB_URL | No | One connection URL, registered as the profile 'default'. |
| DB_PASSWORD secret | No | Password for DB_URL, so it need not be encoded into the URL. |
| DB_PROFILES secret | No | JSON object of named profiles, e.g. {"app": "postgres://...", "cache": "redis://..."}. |
| DB_DEFAULT_PROFILE | No | Which profile starts active. Must name a real profile, else 'default', else the first one defined. |
| DB_CONNECT_TIMEOUT_MS | No | Connection timeout in milliseconds. Default: 10000 |
| DB_QUERY_TIMEOUT_MS | No | Statement timeout in milliseconds, enforced by each server where it can be. Default: 30000 |
| DB_LOG | No | true logs every tool call, its statements and full output to stderr. Off by default |
| DB_LOG_FILE | No | Log every tool call to this file instead. Implies DB_LOG |
| DB_LOG_DIR | No | Save every tool call as its own JSON file in this folder, permanently. Implies logging |
| DB_LOG_FORMAT | No | pretty (default) or json, one object per line |
| DB_LOG_PORT | No | Serve a live log viewer in the browser on this port. Needs DB_LOG_DIR, DB_LOG or DB_LOG_FILE. No access control |
| DB_LOG_HISTORY | No | Entries the viewer keeps in memory when DB_LOG_DIR is not set. Defaults to 500 |
| MYSQL_HOST | No | Legacy MySQL host (read unchanged for compatibility with mcp-mysql-read-only). |
| MYSQL_USER | No | Legacy MySQL user. |
| MYSQL_PASSWORD secret | No | Legacy MySQL password. |
| MYSQL_DATABASE | No | Legacy MySQL database. |
| MYSQL_PROFILES | No | Legacy MySQL profiles, JSON object of named connections. |
| MYSQL_DEFAULT_PROFILE | No | Legacy MySQL default profile. |