Skip to content

PostgreSQL (hardened, read-only) for Zed

io.github.eszetael/postgres-mcp-hardened

Read-only PostgreSQL over MCP. Writes refused at the parsed SQL, plus a READ ONLY transaction.

client:Zed transport:stdio runtime:npm

Install PostgreSQL (hardened, read-only) in Zed

~/.config/zed/settings.json · windows: %APPDATA%\Zed\settings.json

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

{
  "context_servers": {
    "postgres-mcp-hardened": {
      "command": "npx",
      "args": [
        "-y",
        "postgres-mcp-hardened"
      ],
      "env": {
        "DATABASE_URL": "<DATABASE_URL>",
        "MCP_STATEMENT_TIMEOUT": "<MCP_STATEMENT_TIMEOUT>",
        "MCP_ALLOW_TABLES": "<MCP_ALLOW_TABLES>",
        "MCP_AUDIT_LOG": "<MCP_AUDIT_LOG>"
      }
    }
  }
}

Merge this into your existing settings object — do not replace the file. Zed docs

PostgreSQL (hardened, read-only) in other clients