Skip to content
Gemini CLI

postgres for Gemini CLI

io.github.marcelo-ochoa/postgres

MCP server for interacting with PostgreSQL databases

client:Gemini CLI transport:stdio runtime:npm

Install postgres in Gemini CLI

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

Held in this page only — never stored, logged, or sent anywhere but back to your screen.

{
  "mcpServers": {
    "postgres": {
      "command": "npx",
      "args": [
        "-y",
        "@marcelo-ochoa/server-postgres"
      ],
      "env": {
        "POSTGRES_USER": "<POSTGRES_USER>",
        "POSTGRES_PASSWORD": "<POSTGRES_PASSWORD>"
      }
    }
  }
}

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