Databases (read-only, switchable) MCP Server
io.github.shibbirweb/mcp-db-read-only
What this kind of tool is for
- Query, inspect, or seed a database without writing a one-off script.
- Let your agent look up schema details before it writes migration code.
- Move a small dataset between tools without leaving the terminal.
How to compare servers like this
- Engine match:
- Confirm it speaks your exact database and version, not just the family.
- Access scope:
- Read-only connections are the safe default — start there before granting writes.
- Safety rails:
- Check whether destructive statements need an explicit confirmation before they run.
- Maintenance signal:
- Database drivers change; a recently updated tool is less likely to break mid-query.
This page carries your copy-paste config: pick your MCP client in the install section on this page and use the copy button.
What is the Databases (read-only, switchable) MCP server?
Read-only SQL, MongoDB, Redis and Elasticsearch access, switchable mid-conversation.
How to install Databases (read-only, switchable)
Copy-paste configuration for popular MCP clients.
DB_URLConnection URL to open at startup, e.g. postgres://user@host:5432/db, mongodb://user@host/db, redis://host:6379/0 or sqlite:///data/app.db
DB_PASSWORDsecretPassword for DB_URL, so it need not be percent-encoded inside the URL
DB_PROFILESsecretJSON object of named connections to switch between, each a URL or {"url", "password"}
DB_DEFAULT_PROFILEWhich DB_PROFILES entry to start on
DB_CONNECT_TIMEOUT_MSConnection timeout in milliseconds. Defaults to 10000
DB_QUERY_TIMEOUT_MSServer-side query timeout in milliseconds. Defaults to 30000
DB_LOGtrue logs every tool call, its statements and full output to stderr. Off by default
DB_LOG_FILELog every tool call to this file instead. Implies DB_LOG
DB_LOG_DIRSave every tool call as its own JSON file in this folder, permanently. Implies logging
DB_LOG_FORMATpretty (default) or json, one object per line
DB_LOG_PORTServe 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_HISTORYEntries the viewer keeps in memory when DB_LOG_DIR is not set. Defaults to 500
MYSQL_HOSTLegacy MySQL-only form, kept for drop-in compatibility. Prefer DB_URL
MYSQL_USERLegacy MySQL-only form. Prefer DB_URL
MYSQL_PASSWORDsecretLegacy MySQL-only form. Prefer DB_URL with DB_PASSWORD
MYSQL_DATABASELegacy MySQL-only form. Prefer DB_URL
{
"mcpServers": {
"mcp-db-read-only": {
"command": "npx",
"args": [
"-y",
"@shibbirweb/mcp-db-read-only"
],
"env": {
"DB_URL": "<YOUR_DB_URL>",
"DB_PASSWORD": "<YOUR_DB_PASSWORD>",
"DB_PROFILES": "<YOUR_DB_PROFILES>",
"DB_DEFAULT_PROFILE": "<YOUR_DB_DEFAULT_PROFILE>",
"DB_CONNECT_TIMEOUT_MS": "<YOUR_DB_CONNECT_TIMEOUT_MS>",
"DB_QUERY_TIMEOUT_MS": "<YOUR_DB_QUERY_TIMEOUT_MS>",
"DB_LOG": "<YOUR_DB_LOG>",
"DB_LOG_FILE": "<YOUR_DB_LOG_FILE>",
"DB_LOG_DIR": "<YOUR_DB_LOG_DIR>",
"DB_LOG_FORMAT": "<YOUR_DB_LOG_FORMAT>",
"DB_LOG_PORT": "<YOUR_DB_LOG_PORT>",
"DB_LOG_HISTORY": "<YOUR_DB_LOG_HISTORY>",
"MYSQL_HOST": "<YOUR_MYSQL_HOST>",
"MYSQL_USER": "<YOUR_MYSQL_USER>",
"MYSQL_PASSWORD": "<YOUR_MYSQL_PASSWORD>",
"MYSQL_DATABASE": "<YOUR_MYSQL_DATABASE>"
}
}
}
}Related MCP servers

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

AIDataParser
Extract schema-guaranteed JSON from PDFs, images and messy text. 50 free credits, no card.

Box Admin Analytics MCP
MCP server for Box admin-log analytics — external-sharing visibility, read-only

J-Quants MCP
MCP server for retrieving Japanese stock market data via J-Quants API v2

AISOTools
Search, compare, and find alternatives across a catalog of 3,000+ AI tools.

API Status Check
Live status probes plus published uptime and incident history for 280+ APIs and cloud services.