Db MCP Server

connect a read-only replica, analytics database, or staging database. Keep credentials on your machine while the tool discovers schema, generates

Local serverstdioPython

What is the Db MCP Server?

connect a read-only replica, analytics database, or staging database. Keep credentials on your machine while the tool discovers schema, generates safe SQL, previews

What it actually does

Local-first SQL insight CLI and MCP server for Postgres and SQLite.

More MCP options

Compare MCP servers by category, or browse hosted MCP servers if you prefer an endpoint over a local process.

Maintainer setup documentation.

Recorded tools

Check the linked publisher documentation and your connected client's tool list. Names and availability can vary with the server version and account permissions.

ToolWhat it does
plan_tool_callsdiscover_schema
refresh_schema_memoryschema_memory_status
catalog_overviewinspect_table
explain_sqlgenerate_safe_sql
run_approved_sqlask_database

How to install the Db MCP Server

{
  "mcpServers": {
    "db-insight": {
      "command": "docker",
      "args": [
        "run",
        "-i",
        "--rm",
        "--add-host=host.docker.internal:host-gateway",
        "-e",
        "DATABASE_URL",
        "-e",
        "DB_INSIGHT_MODEL",
        "-e",
        "DB_INSIGHT_OLLAMA_URL",
        "ghcr.io/enclavex-labs/db-insight:latest"
      ],
      "env": {
        "DATABASE_URL": "postgresql://readonly:password@host.docker.internal:5432/app_db",
        "DB_INSIGHT_MODEL": "gemma3:latest",
        "DB_INSIGHT_OLLAMA_URL": "http://host.docker.internal:11434"
      }
    }
  }
}

From the project documentation. Replace placeholders and example paths before connecting.

Configuration

VariableDescriptionRequired
DATABASE_URLDeclared in the maintainer’s client configuration.Check documentation
DB_INSIGHT_MODELDeclared in the maintainer’s client configuration.Check documentation
DB_INSIGHT_OLLAMA_URLDeclared in the maintainer’s client configuration.Check documentation

Example prompts to try

  • “Use Db to plan tool calls.”
  • “Use Db to refresh schema memory.”
  • “Use Db to catalog overview.”

Frequently asked questions

connect a read-only replica, analytics database, or staging database. Keep credentials on your machine while the tool discovers schema, generates safe SQL, previews Confirm the tools offered by your installed version in the connected client. Tool availability and permissions depend on the server and account configuration.