← Back to catalog
MCPDatabase↓ 2,360

PostgreSQL

Connects Claude Code to PostgreSQL databases to query and explore data.

Installation
npx claude-code-templates@latest --mcp database/postgresql-integration --yes

This MCP connects Claude Code to a PostgreSQL database. Given a connection string, the assistant can see your tables and data.

It’s meant for richer queries and for understanding the database structure without opening another tool.

You can inspect the schema, run SQL queries, and explore relationships between tables through a natural conversation. It’s handy both for one-off analysis and for daily work on a PostgreSQL project.

When to use

  • When you need to query data without writing the SQL from scratch.
  • To understand the schema of a database you don’t know well.
  • While validating assumptions about your data during development.

How to use

After installing, provide the PostgreSQL connection string and the MCP becomes available. Ask Claude Code to “list the tables” or “pull the latest orders from this table”.