Postgres MCP
Query relational data from agent workflows
Install Postgres MCP
Choose the tracked registry command or the raw command.
Tracked wget install
Counts the install in MCP Haus and runs the published command.
wget -qO- https://mcphaus.com/api/install/postgres-mcp | shDirect install command
Use this when you want to paste the command into an MCP client config manually.
npx -y @modelcontextprotocol/server-postgres postgresql://user:pass@localhost:5432/dbWhat Postgres MCP does
Connect AI agents to PostgreSQL with schema inspection, read-only query controls, and concise table context for safer database exploration. The reference implementation also supports restricted write access for migrations.
How to use Postgres MCP
Copy the tracked install command to record the download in MCP Haus.
Run it in your terminal, or copy the raw command into an MCP client config.
Open your AI client and add the server to the MCP servers list.
Which AI clients does Postgres MCP work with?
Postgres MCP works with every MCP-compatible client, including Claude Desktop, Cursor, Continue, Windsurf, Cline, OpenHands, and Claude Code. Add the install command to your client's MCP configuration and restart the session.
Read the MCP guide