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.
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
- Maintenance checked
Packages and installation
Source-provided package data. Koskamo has not executed or live-probed this package.
sw-postgres-mcp 0.3.1
{
"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.
Connect from your client
Each snippet configures the same source-provided package; replace placeholders before use.
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>"
}
}
}
}Cline
{
"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
{
"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
{
"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.