MCP directory
D(

Databases (read-only, switchable)

by github.com/shibbirweb · v1.1.0 · updated Sep 24, 2026

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

npmDocker

Run it locally

Install the package and point your AI client at it.

npm

npx -y @shibbirweb/[email protected]

Environment variables

  • DB_URL

    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_PASSWORDsecret

    Password for DB_URL, so it need not be percent-encoded inside the URL

  • DB_PROFILESsecret

    JSON object of named connections to switch between, each a URL or {"url", "password"}

  • DB_DEFAULT_PROFILE

    Which DB_PROFILES entry to start on

  • DB_CONNECT_TIMEOUT_MS

    Connection timeout in milliseconds. Defaults to 10000

  • DB_QUERY_TIMEOUT_MS

    Server-side query timeout in milliseconds. Defaults to 30000

  • DB_LOG

    true logs every tool call, its statements and full output to stderr. Off by default

  • DB_LOG_FILE

    Log every tool call to this file instead. Implies DB_LOG

  • DB_LOG_DIR

    Save every tool call as its own JSON file in this folder, permanently. Implies logging

  • DB_LOG_FORMAT

    pretty (default) or json, one object per line

  • DB_LOG_PORT

    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

    Entries the viewer keeps in memory when DB_LOG_DIR is not set. Defaults to 500

  • MYSQL_HOST

    Legacy MySQL-only form, kept for drop-in compatibility. Prefer DB_URL

  • MYSQL_USER

    Legacy MySQL-only form. Prefer DB_URL

  • MYSQL_PASSWORDsecret

    Legacy MySQL-only form. Prefer DB_URL with DB_PASSWORD

  • MYSQL_DATABASE

    Legacy MySQL-only form. Prefer DB_URL

Docker

docker run -i --rm docker.io/shibbirweb/mcp-db-read-only:1.1.0

Environment variables

  • DB_URL

    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. Use host.docker.internal to reach the host

  • DB_PASSWORDsecret

    Password for DB_URL, so it need not be percent-encoded inside the URL

  • DB_PROFILESsecret

    JSON object of named connections to switch between, each a URL or {"url", "password"}

  • DB_DEFAULT_PROFILE

    Which DB_PROFILES entry to start on

  • DB_CONNECT_TIMEOUT_MS

    Connection timeout in milliseconds. Defaults to 10000

  • DB_QUERY_TIMEOUT_MS

    Server-side query timeout in milliseconds. Defaults to 30000

  • DB_LOG

    true logs every tool call, its statements and full output to stderr. Off by default

  • DB_LOG_FILE

    Log every tool call to this file instead, on a mounted volume. Implies DB_LOG

  • DB_LOG_DIR

    Save every tool call as its own JSON file in this folder, on a mounted volume. Implies logging

  • DB_LOG_FORMAT

    pretty (default) or json, one object per line

  • DB_LOG_PORT

    Serve a live log viewer on this port (publish it with -p). Needs DB_LOG_DIR, DB_LOG or DB_LOG_FILE. No access control

  • DB_LOG_HISTORY

    Entries the viewer keeps in memory when DB_LOG_DIR is not set. Defaults to 500

  • MYSQL_HOST

    Legacy MySQL-only form, kept for drop-in compatibility. Prefer DB_URL

  • MYSQL_USER

    Legacy MySQL-only form. Prefer DB_URL

  • MYSQL_PASSWORDsecret

    Legacy MySQL-only form. Prefer DB_URL with DB_PASSWORD

  • MYSQL_DATABASE

    Legacy MySQL-only form. Prefer DB_URL

More from github.com/shibbirweb

More MCP servers