by Anthropic
Connects to PostgreSQL databases with read-only access. Run SQL queries, inspect schemas, list tables, and analyze database structure safely.
npx -y @modelcontextprotocol/server-postgres postgresql://localhost/mydb{
"mcpServers": {
"postgres": {
"command": "npx",
"args": [
"npx", "-y",
""@modelcontextprotocol/server-postgres",
"postgresql://localhost/mydb"
]
}
}
}Config file location: ~/Library/Application Support/Claude/claude_desktop_config.json