sw-postgres-mcp

io.github.jpka/sw-postgres-mcp

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

Connect this server

Add this to your MCP client config — claude_desktop_config.json (Claude Desktop) or .cursor/mcp.json (Cursor).Suits: Claude Desktop · Cursor.

{
  "mcpServers": {
    "sw-postgres-mcp": {
      "command": "npx",
      "args": [
        "-y",
        "sw-postgres-mcp@0.3.1"
      ],
      "env": {
        "DATABASE_URL_READONLY": "<your DATABASE_URL_READONLY>",
        "DATABASE_URL_WRITER": "<your DATABASE_URL_WRITER>"
      }
    }
  }
}
Environment variables
  • DATABASE_URL_READONLYrequiredsecretPostgres connection string for the read-only role.
  • DATABASE_URL_WRITERrequiredsecretPostgres connection string for the writer role.

A starting point — check the repository for exact arguments and setup. Restart your client after editing the config.

Category
Developer Tools
Version
0.3.1
Registry
active
Published
8/15/2026
Browse all Developer Tools →

Add the badge to your site

Show visitors that sw-postgres-mcp is listed here — it’s also the link we check for a free listing.

sw-postgres-mcp — listed on Serverdex

HTML — for your website

<a href="https://serverdex.io/server/io-github-jpka-sw-postgres-mcp?utm_source=badge"><img src="https://serverdex.io/brand/badge.svg" alt="sw-postgres-mcp — listed on Serverdex" width="123" height="40" loading="lazy"></a>

Recommended. A dofollow link from your own domain is the one that counts for search engines, and it's the link we check for a free listing.

Markdown — for your README

[![sw-postgres-mcp — listed on Serverdex](https://serverdex.io/brand/badge.svg)](https://serverdex.io/server/io-github-jpka-sw-postgres-mcp?utm_source=badge)

Nice for visibility, but GitHub marks README links nofollow, so it doesn't pass authority. Use the HTML badge on your site as well.