PostgreSQL

•

Browse PostgreSQL schemas/tables and execute safe SELECT queries from any Model Context Protocol-compatible client.

The PostgreSQL tool provides a secure, read-only interface for interacting with PostgreSQL databases through Model Context Protocol (MCP) clients like Claude Desktop. It enables users to explore database schemas, view table details, and run validated SELECT queries safely. With a robust two-level security mechanism, including query text validation and database-level read-only connections, it ensures no data modification is possible, making it ideal for AI-driven database exploration and analysis.

主要功能

01View column details (name, type, nullability) for any table via `postgres://tables/{schema}/{table}` resource
02Built-in `db_health_check` prompt for assessing database health
03Execute `SELECT` and `WITH ... SELECT` queries with a configurable row limit via `run_query` tool
04Two-level read-only security: query validation and database-level read-only connections
05List tables within a specified schema via `postgres://tables/{schema}` resource
060 GitHub stars

使用案例

01Safely explore PostgreSQL database schemas and data using AI-powered MCP clients
02Perform database health checks to identify empty tables, duplicates, or anomalies
03Integrate read-only PostgreSQL data access into AI workflows for analysis and querying