What is the sw-postgres-mcp MCP server?
Safe-write Postgres MCP server with preview-before-execute writes and rollback safety.
How to install sw-postgres-mcp
Copy-paste configuration for popular MCP clients.
transport: stdio
Config generated by PluginBench — verify against the source before use.Environment / auth
DATABASE_URL_READONLYrequiredsecretPostgres connection string for the read-only role.
DATABASE_URL_WRITERrequiredsecretPostgres connection string for the writer role.
Claude Desktop
~/Library/Application Support/Claude/claude_desktop_config.json
{
"mcpServers": {
"sw-postgres-mcp": {
"command": "npx",
"args": [
"-y",
"sw-postgres-mcp"
],
"env": {
"DATABASE_URL_READONLY": "<YOUR_DATABASE_URL_READONLY>",
"DATABASE_URL_WRITER": "<YOUR_DATABASE_URL_WRITER>"
}
}
}
}Cursor
~/.cursor/mcp.json
{
"mcpServers": {
"sw-postgres-mcp": {
"command": "npx",
"args": [
"-y",
"sw-postgres-mcp"
],
"env": {
"DATABASE_URL_READONLY": "<YOUR_DATABASE_URL_READONLY>",
"DATABASE_URL_WRITER": "<YOUR_DATABASE_URL_WRITER>"
}
}
}
}Windsurf
~/.codeium/windsurf/mcp_config.json
{
"mcpServers": {
"sw-postgres-mcp": {
"command": "npx",
"args": [
"-y",
"sw-postgres-mcp"
],
"env": {
"DATABASE_URL_READONLY": "<YOUR_DATABASE_URL_READONLY>",
"DATABASE_URL_WRITER": "<YOUR_DATABASE_URL_WRITER>"
}
}
}
}VS Code
.vscode/mcp.json
{
"servers": {
"sw-postgres-mcp": {
"type": "stdio",
"command": "npx",
"args": [
"-y",
"sw-postgres-mcp"
],
"env": {
"DATABASE_URL_READONLY": "<YOUR_DATABASE_URL_READONLY>",
"DATABASE_URL_WRITER": "<YOUR_DATABASE_URL_WRITER>"
}
}
}
}Claude Code
claude mcp add sw-postgres-mcp --env DATABASE_URL_READONLY=<YOUR_DATABASE_URL_READONLY> --env DATABASE_URL_WRITER=<YOUR_DATABASE_URL_WRITER> -- npx -y sw-postgres-mcpRelated MCP servers
shopify-operations-mcp
Active
Safe-write Shopify operations: plan-before-execute writes with out-of-band approval and audit.
0
View repository →TypeScript
MIT