PostgreSQL

PostgreSQL MCP server for powerful open-source relational database operations. Execute complex queries, manage structured data, support JSON and advanced data types, implement transactions with ACID guarantees, and build scalable database-driven applications. Connect to local databases with: pip install mcpbundles

This PostgreSQL MCP server is compatible with any MCP client including Claude Desktop, Cursor, and other Model Context Protocol implementations.

Developer Tools
API Key

Data Exploration
SKILL.md

PostgreSQL data browsing and sampling

Data Quality
SKILL.md

PostgreSQL data quality checks

Development & Operations
SKILL.md

PostgreSQL DDL, DML, backup

Performance Analysis
SKILL.md

PostgreSQL performance tuning

PostgreSQL
SKILL.md

Domain knowledge for PostgreSQL — queries, schema, performance, data quality

Schema Discovery
SKILL.md

PostgreSQL schema and relationships

Tools From This Provider (38)

Postgres Get Lock Info

Show current database locks and identify blocking queries. Helps diagnose performance issues and deadlocks. Shows which...

Postgres List Functions

List PostgreSQL stored procedures and functions with their parameters, return types, and definitions. Useful for...

Postgres Compare Tables

Compare two tables to find rows that differ. Shows rows present in one table but not the other, and rows with different...

Postgres Data Quality Report

Generate comprehensive data quality report including duplicates, NULLs, constraint violations, and referential...

Postgres Export Table

Export table data to CSV or JSON format. Useful for data migration, backups, or analysis in external tools. Returns...

Postgres Find Null Patterns

Analyze NULL value distribution across columns. Shows which columns have high NULL percentages and identifies data...

Postgres Find Slow Queries

Find slow queries from pg_stat_statements extension. Requires pg_stat_statements extension to be enabled. Returns...

Postgres Search Text

Full-text search across text columns in one or more tables. Finds rows containing the search text in any text column....

Postgres Check Referential Integrity

Find orphaned foreign key references - rows that reference non-existent parent rows. Critical for data integrity...

Postgres Vacuum Analyze

Analyze tables and suggest VACUUM and ANALYZE operations based on dead tuple ratio and last analyze time. Helps...

Postgres Batch Execute

Execute multiple SQL statements in a single transaction. All statements succeed or all fail (atomicity). Useful for...

Postgres Find Unused Tables

Find tables that are not referenced by foreign keys, views, materialized views, or functions. Useful for identifying...

Postgres Detect Outliers

Detect statistical outliers in numeric columns using IQR (Interquartile Range) or z-score methods. Useful for data...

Postgres Rollback Preview

Preview which rows would be affected by a DELETE or UPDATE statement without actually executing it. Shows sample rows...

Postgres Create Table

Create a new table with specified columns and constraints. Generates CREATE TABLE statement from schema definition.

Postgres Alter Table

Perform safe ALTER TABLE operations including adding/dropping columns, changing types, renaming columns, and adding...

Postgres Backup Table

Create a backup copy of a table including structure and optionally data. Useful before making destructive changes.

Postgres Restore Table

Restore table from backup created by postgres_backup_table. Can optionally drop existing table first.

Postgres List Triggers

List PostgreSQL triggers with their event types (INSERT, UPDATE, DELETE), timing (BEFORE, AFTER), and action...

Postgres Check Missing Indexes

Identify potential missing indexes by analyzing foreign keys and columns frequently used in WHERE clauses. Suggests...

Postgres Validate Constraints

Validate that all constraints (CHECK, NOT NULL, UNIQUE, FOREIGN KEY) are satisfied. Finds rows that violate constraints.

Postgres Get Foreign Key Graph

Build a graph representation of foreign key relationships showing which tables reference which other tables. Returns...

Postgres Analyze Table

Run ANALYZE on a table to update query planner statistics. Returns updated statistics after analysis. Essential for...

Postgres Profile Column

Profile a column's data distribution: min, max, avg, median, distinct count, null percentage, and most frequent values....

Postgres Get Table Dependencies

Find all database objects that depend on a table: views, materialized views, triggers, and functions. Critical before...

Postgres Get Table Stats

Get comprehensive table statistics: size on disk, index sizes, row count, last vacuum/analyze time, and dead tuple...

Postgres Explain Query

Analyze query performance with EXPLAIN ANALYZE. Returns execution plan with actual timing, rows processed, and...

Postgres Get Enum Values

Find columns with enum-like behavior (limited distinct values) and show value frequencies. Useful for understanding...

Postgres Sample Data

Get statistically representative random sample from table using TABLESAMPLE. Much faster than LIMIT on large tables....

Postgres Get Ai Description

Get compact, token-efficient database schema description optimized for AI text-to-SQL. Returns tables with columns,...

Postgres Analyze Indexes

Comprehensive index analysis tool. Without table parameter: finds unused/rarely-used indexes across database for...

Postgres Find Duplicates

Find duplicate rows based on specified columns. Returns groups of duplicates with counts. Essential for data quality...

Postgres List Tables

List PostgreSQL tables with rich filtering and metadata options. Supports pattern matching, schema filtering, and...

Postgres List Rows

Browse rows from a PostgreSQL table with filtering, column selection, sorting, and pagination. The workhorse tool for...

Search

Search PostgreSQL database using SQL queries or structured syntax. Returns ranked results with IDs and titles. Supports...

Postgres Execute

Execute SQL statements on PostgreSQL database. Supports all SQL operations including SELECT, INSERT, UPDATE, DELETE,...

Postgres Inspect Schema

Inspect PostgreSQL schema or table in detail. Get comprehensive information about tables, columns, relationships,...

Fetch

Universal fetch tool that retrieves any row, table schema, or metadata using smart ID routing with colon-separated...

Connect PostgreSQL to your AI assistant via MCP

Works with Claude, Cursor, ChatGPT · API Key setup

Set Up Server

Provider Information

CategoryDeveloper Tools
SetupAPI Key
AddedOctober 12, 2025
UpdatedMarch 28, 2026
Used By Tools
38

Quick Links

Need Help?

Having trouble configuring PostgreSQL? Check the available resources below.

PostgreSQL MCP Server - MCP Bundles • MCP Providers