Koskamo

sw-postgres-mcp

A community-built MCP server that provides safe database operations by requiring a preview-before-execute workflow. It uses a TwoPhaseWrite mechanism where write tools (delete, insert, update, migration) first preview changes in a rolled-back transaction to generate a plan token. The agent must then call execute_plan with that token to commit, ensuring no accidental data loss. It includes read-only tools for schema description and querying, and maintains an audit log of all actions.

Package and access

Local package with source-attributed installation metadata. Koskamo does not execute packages during review.

sw-postgres-mcp logo, by jpkaCommunity listingLocal stdioSource reviewed; not executedPublished by jpka
Vendor documentation

What you can do with it

  • Preview database changes before committing
  • Execute safe write operations with rollback safety
  • Query database schema and data safely
  • Run migrations with approval workflows

Source and maintenance

Community listingRegistry 0.3.1
Maintenance checked

Packages and installation

Source-provided package data. Koskamo has not executed or live-probed this package.

sw-postgres-mcp 0.3.1

npm
sw-postgres-mcp package definition
{
  "version": "0.3.1",
  "transport": "stdio",
  "identifier": "sw-postgres-mcp",
  "registryType": "npm",
  "environmentVariables": [
    {
      "name": "DATABASE_URL_READONLY",
      "format": "string",
      "isRequired": true,
      "description": "Postgres connection string for the read-only role."
    },
    {
      "name": "DATABASE_URL_WRITER",
      "format": "string",
      "isRequired": true,
      "description": "Postgres connection string for the writer role."
    }
  ]
}

Tools

Reported by the attributed source; not independently observed by Koskamo.

No tool definitions available.

Connect from your client

Each snippet configures the same source-provided package; replace placeholders before use.

This server is operated by the named third party. Listing and endpoint checks are not an endorsement or a security audit. Review the operator's permissions, terms, and data handling before connecting. How listings are checked and corrected.

Cursor

Merge this local stdio configuration, replace every placeholder environment value, and restart Cursor. Koskamo has not executed this package.
Cursor configuration
{
  "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>"
      }
    }
  }
}

Cline

Merge this local stdio configuration, replace every placeholder environment value, and restart Cline. Koskamo has not executed this package.
Cline configuration
{
  "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>"
      }
    }
  }
}

VS Code

Merge this local stdio configuration, replace every placeholder environment value, and restart VS Code. Koskamo has not executed this package.
VS Code configuration
{
  "servers": {
    "sw-postgres-mcp": {
      "type": "stdio",
      "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>"
      }
    }
  }
}

Claude Desktop

Merge this local stdio configuration, replace every placeholder environment value, and restart Claude Desktop. Koskamo has not executed this package.
Claude Desktop configuration
{
  "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>"
      }
    }
  }
}

Let your agent find its tools

Find servers like sw-postgres-mcp from your agent. Add Koskamo once to search the index for endpoints, access requirements, and client setup. Public discovery needs no key.