Back to MCP Servers
🐘
PostgreSQL
Execute SQL queries, explore schema, and interact with PostgreSQL databases safely.
databasesqlpostgres
Install
npx @modelcontextprotocol/server-postgres postgresql://localhost/mydbclaude_desktop_config.json
claude_desktop_config.json
{
"mcpServers": {
"postgres": {
"command": "npx",
"args": [
"-y",
"@modelcontextprotocol/server-postgres",
"postgresql://localhost/mydb"
]
}
}
}Add this to your Claude Desktop config file. Find it at ~/Library/Application Support/Claude/claude_desktop_config.json on macOS.
What this does
PostgreSQL exposes a set of tools to Claude over the Model Context Protocol. After you add it to claude_desktop_config.json (snippet above) and restart Claude Desktop, those tools become callable inside any conversation.