Install sw-postgres in Claude Code
claude mcp add sw-postgres -e DATABASE_URL_READONLY=... -e DATABASE_URL_WRITER=... -- npx -y sw-postgres-mcp{
"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 allvalv
valv-dev/valv
Let coding agents query any SQL database safely. Read-only by default and scoped by your policies.
Spreadsheet DB
ManddarinShop/Hikoutei
SQLite-authoritative entity database with an async Google Sheets projection for AI agents.
Igdb
bielacki/igdb-mcp-server
Explore and discover video games from the Internet Game Database. Search titles, view detailed inf…
Showboard
rohanbeingsocial/showboard
Your coding agent answers with dashboards: charts and tables from read-only SQL, Excel and CSV.
PlanetScale
planetscale/mcp-server
Connect to PlanetScale databases, branches, schema, query insights, and execute SQL
Primavera P6
nizarhamza/p6-mcp
Primavera P6 MCP server: critical path, DCMA checks, what-if and safe write-back to the P6 database