Sezzlee PostgreSQL

v0.2.1
io.github.sezzlee/postgres Checked 1 day ago Published 1 month ago

Explore and query PostgreSQL read-only: catalogue search, schema introspection and bounded queries.

Values you need

VariableWhat it is
SEZZLEE_POSTGRES_SERVERrequired Database host
SEZZLEE_POSTGRES_PORToptional Database port Default: 5432
SEZZLEE_POSTGRES_DATABASErequired Database name
SEZZLEE_POSTGRES_USERrequired Login of a read-only principal
SEZZLEE_POSTGRES_PASSWORDrequired secret Password of that login
SEZZLEE_POSTGRES_SSL_MODEoptional TLS mode Default: verify-full
SEZZLEE_POSTGRES_CONNECT_TIMEOUT_MSoptional Connect timeout in milliseconds Default: 30000
SEZZLEE_POSTGRES_QUERY_TIMEOUT_MSoptional Query timeout in milliseconds Default: 30000

npm (npx) discovery passed

Requires Node.js 18+

Run in a terminal
claude mcp add postgres -e 'SEZZLEE_POSTGRES_DATABASE=<SEZZLEE_POSTGRES_DATABASE>' -e 'SEZZLEE_POSTGRES_PASSWORD=<SEZZLEE_POSTGRES_PASSWORD>' -e 'SEZZLEE_POSTGRES_SERVER=<SEZZLEE_POSTGRES_SERVER>' -e 'SEZZLEE_POSTGRES_USER=<SEZZLEE_POSTGRES_USER>' -- npx -y --package=@sezzlee/postgres-mcp@0.2.1 sezzlee-postgres
Add to claude_desktop_config.json
{
  "mcpServers": {
    "postgres": {
      "args": [
        "-y",
        "--package=@sezzlee/postgres-mcp@0.2.1",
        "sezzlee-postgres"
      ],
      "command": "npx",
      "env": {
        "SEZZLEE_POSTGRES_DATABASE": "<SEZZLEE_POSTGRES_DATABASE>",
        "SEZZLEE_POSTGRES_PASSWORD": "<SEZZLEE_POSTGRES_PASSWORD>",
        "SEZZLEE_POSTGRES_SERVER": "<SEZZLEE_POSTGRES_SERVER>",
        "SEZZLEE_POSTGRES_USER": "<SEZZLEE_POSTGRES_USER>"
      }
    }
  }
}
Add to ~/.cursor/mcp.json
{
  "mcpServers": {
    "postgres": {
      "args": [
        "-y",
        "--package=@sezzlee/postgres-mcp@0.2.1",
        "sezzlee-postgres"
      ],
      "command": "npx",
      "env": {
        "SEZZLEE_POSTGRES_DATABASE": "<SEZZLEE_POSTGRES_DATABASE>",
        "SEZZLEE_POSTGRES_PASSWORD": "<SEZZLEE_POSTGRES_PASSWORD>",
        "SEZZLEE_POSTGRES_SERVER": "<SEZZLEE_POSTGRES_SERVER>",
        "SEZZLEE_POSTGRES_USER": "<SEZZLEE_POSTGRES_USER>"
      }
    }
  }
}
Add to .vscode/mcp.json
{
  "inputs": [
    {
      "description": "SEZZLEE_POSTGRES_DATABASE",
      "id": "sezzlee-postgres-database",
      "password": true,
      "type": "promptString"
    },
    {
      "description": "SEZZLEE_POSTGRES_PASSWORD",
      "id": "sezzlee-postgres-password",
      "password": true,
      "type": "promptString"
    },
    {
      "description": "SEZZLEE_POSTGRES_SERVER",
      "id": "sezzlee-postgres-server",
      "password": true,
      "type": "promptString"
    },
    {
      "description": "SEZZLEE_POSTGRES_USER",
      "id": "sezzlee-postgres-user",
      "password": true,
      "type": "promptString"
    }
  ],
  "servers": {
    "postgres": {
      "args": [
        "-y",
        "--package=@sezzlee/postgres-mcp@0.2.1",
        "sezzlee-postgres"
      ],
      "command": "npx",
      "env": {
        "SEZZLEE_POSTGRES_DATABASE": "${input:sezzlee-postgres-database}",
        "SEZZLEE_POSTGRES_PASSWORD": "${input:sezzlee-postgres-password}",
        "SEZZLEE_POSTGRES_SERVER": "${input:sezzlee-postgres-server}",
        "SEZZLEE_POSTGRES_USER": "${input:sezzlee-postgres-user}"
      },
      "type": "stdio"
    }
  }
}
Add to ~/.codex/config.toml
[mcp_servers.postgres]
command = "npx"
args = ["-y", "--package=@sezzlee/postgres-mcp@0.2.1", "sezzlee-postgres"]
env = { "SEZZLEE_POSTGRES_DATABASE" = "<SEZZLEE_POSTGRES_DATABASE>", "SEZZLEE_POSTGRES_PASSWORD" = "<SEZZLEE_POSTGRES_PASSWORD>", "SEZZLEE_POSTGRES_SERVER" = "<SEZZLEE_POSTGRES_SERVER>", "SEZZLEE_POSTGRES_USER" = "<SEZZLEE_POSTGRES_USER>" }

For AI agents

  1. Ask the user for: SEZZLEE_POSTGRES_SERVER, SEZZLEE_POSTGRES_DATABASE, SEZZLEE_POSTGRES_USER, SEZZLEE_POSTGRES_PASSWORD. Never invent or guess these values; secrets go into the client config, not into chat logs.
  2. Pick the user's MCP client and apply the matching config from the first install method (it is the one verified by the smoke test when available).
  3. Restart or reload the client so it starts the server.
  4. Verify: the server should expose these tools: describe_connection, search_catalog, describe_table, run_query.
  5. If it fails, check that the required runtime is installed (Node.js 18+) and that the values above are set.

Machine-readable: install.md · manifest.json