Skip to main content

Databases (read-only, switchable)

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

v1.1.0Updated Sep 24, 2026stdio · npmstdio · Docker

Read-only SQL, MongoDB, Redis and Elasticsearch access, switchable mid-conversation.

Install

Nothing to fill in: copy and run.

Run in your terminal

claude mcp add mcp-db-read-only -- npx -y @shibbirweb/[email protected]

Configuration

16 settings.

  • DB_PASSWORD
    Env var· optional· secret
    Password for DB_URL, so it need not be percent-encoded inside the URL
  • DB_PROFILES
    Env var· optional· secret
    JSON object of named connections to switch between, each a URL or {"url", "password"}
  • MYSQL_PASSWORD
    Env var· optional· secret
    Legacy MySQL-only form. Prefer DB_URL with DB_PASSWORD
  • DB_URL
    Env var· optional
    Connection 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_DEFAULT_PROFILE
    Env var· optional
    Which DB_PROFILES entry to start on
  • DB_CONNECT_TIMEOUT_MS
    Env var· optional
    Connection timeout in milliseconds. Defaults to 10000
Show 10 more
  • DB_QUERY_TIMEOUT_MS
    Env var· optional
    Server-side query timeout in milliseconds. Defaults to 30000
  • DB_LOG
    Env var· optional
    true logs every tool call, its statements and full output to stderr. Off by default
  • DB_LOG_FILE
    Env var· optional
    Log every tool call to this file instead. Implies DB_LOG
  • DB_LOG_DIR
    Env var· optional
    Save every tool call as its own JSON file in this folder, permanently. Implies logging
  • DB_LOG_FORMAT
    Env var· optional
    pretty (default) or json, one object per line
  • DB_LOG_PORT
    Env var· optional
    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
    Env var· optional
    Entries the viewer keeps in memory when DB_LOG_DIR is not set. Defaults to 500
  • MYSQL_HOST
    Env var· optional
    Legacy MySQL-only form, kept for drop-in compatibility. Prefer DB_URL
  • MYSQL_USER
    Env var· optional
    Legacy MySQL-only form. Prefer DB_URL
  • MYSQL_DATABASE
    Env var· optional
    Legacy MySQL-only form. Prefer DB_URL

Listed in the official MCP Registry since Sep 24, 2026. Mirrored daily; last checked Nov 26, 2026.