Skip to content
Gemini CLI

postgres for Gemini CLI

io.github.ofershap/postgres

PostgreSQL MCP — query databases, inspect schemas, explain queries.

client:Gemini CLI transport:stdio runtime:npm

Install postgres in Gemini CLI

~/.gemini/settings.json · windows: %USERPROFILE%\.gemini\settings.json

{
  "mcpServers": {
    "postgres": {
      "command": "npx",
      "args": [
        "-y",
        "mcp-pg-server"
      ]
    }
  }
}

Gemini expands $VAR and ${VAR} inside env values, so a secret can live in your shell rather than this file. Gemini CLI docs

postgres in other clients