LocalFree

sw-postgres MCP server

jpka/sw-postgres-mcp

Safe-write Postgres MCP server with preview-before-execute writes and rollback safety.

0 GitHub stars136 npm downloads / month

Install sw-postgres in Claude Code

Claude Code
claude mcp add sw-postgres -e DATABASE_URL_READONLY=... -e DATABASE_URL_WRITER=... -- npx -y sw-postgres-mcp
mcp.json (Claude Desktop, Cursor, VS Code, Windsurf)
{
  "mcpServers": {
    "sw-postgres": {
      "command": "npx",
      "args": [
        "-y",
        "sw-postgres-mcp"
      ],
      "env": {
        "DATABASE_URL_READONLY": "...",
        "DATABASE_URL_WRITER": "..."
      }
    }
  }
}

Replace each ... with your own value.

Frequently asked questions

What does the sw-postgres MCP server do?

Safe-write Postgres MCP server with preview-before-execute writes and rollback safety.

Is the sw-postgres MCP server free?

Yes, most likely. Open source and no paid account or API key is mentioned in the listing. Check the provider for current pricing.

Does sw-postgres run locally or remotely?

Local. Runs on your machine (stdio). You install it with npx, uvx, Docker or from source.

How do I add sw-postgres to Claude Code?

Run: claude mcp add sw-postgres -e DATABASE_URL_READONLY=... -e DATABASE_URL_WRITER=... -- npx -y sw-postgres-mcp

More databases MCP servers

View all