Back to MCP Servers
🐘

PostgreSQL

Execute SQL queries, explore schema, and interact with PostgreSQL databases safely.

databasesqlpostgres

Install

npx @modelcontextprotocol/server-postgres postgresql://localhost/mydb

Install with your client

Terminal
npx @modelcontextprotocol/server-postgres postgresql://localhost/mydb

Run this in a terminal to add the server to Claude Code.

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.

Listed on clauderules.net

Add this badge to your README

Show visitors this server is listed in the ClaudeRules directory. The badge links straight to this listing.

Markdown
[![Listed on clauderules.net](https://clauderules.net/api/badge.svg)](https://clauderules.net/mcp/postgres)
HTML
<a href="https://clauderules.net/mcp/postgres" target="_blank" rel="noopener noreferrer"><img src="https://clauderules.net/api/badge.svg" alt="Listed on clauderules.net" /></a>