Read-only-by-default MCP server for PostgreSQL. Query, introspect schemas, explain plans, health checks.
Setup
Choose your client, copy the config, then fill in any required environment variables.
claude mcp add postgresql-server-yawlabs -- npx -y @yawlabs/postgres-mcp~/.codex/config.toml
[mcp_servers.postgresql-server-yawlabs]
command = "npx"
args = ["-y", "@yawlabs/postgres-mcp"]
# codex mcp add postgresql-server-yawlabs -- npx -y @yawlabs/postgres-mcp~/.cursor/mcp.json
{
"mcpServers": {
"postgresql-server-yawlabs": {
"command": "npx",
"args": [
"-y",
"@yawlabs/postgres-mcp"
]
}
}
}.vscode/mcp.json
{
"servers": {
"postgresql-server-yawlabs": {
"type": "stdio",
"command": "npx",
"args": [
"-y",
"@yawlabs/postgres-mcp"
]
}
}
}~/.gemini/settings.json
{
"mcpServers": {
"postgresql-server-yawlabs": {
"command": "npx",
"args": [
"-y",
"@yawlabs/postgres-mcp"
]
}
}
}claude_desktop_config.json
{
"mcpServers": {
"postgresql-server-yawlabs": {
"command": "npx",
"args": [
"-y",
"@yawlabs/postgres-mcp"
]
}
}
}.trae/mcp.json
{
"mcpServers": {
"postgresql-server-yawlabs": {
"command": "npx",
"args": [
"-y",
"@yawlabs/postgres-mcp"
]
}
}
}