Pg-Mcp
Createdstuzero
Exposes PostgreSQL databases to AI agents via the Model Context Protocol, offering rich schema discovery and query capabilities.
About
PG-MCP is a server implementation of the Model Context Protocol for PostgreSQL databases, designed to facilitate AI agent interaction. It extends the reference Postgres MCP implementation with features like full server capabilities, multi-database support, detailed catalog information, extension context for tools like PostGIS and pgvector, query plan analysis, and robust connection management. It provides a comprehensive API for AI agents to discover, connect to, query, and understand PostgreSQL databases, making it easier to integrate database insights into AI-driven applications.
Key Features
- Provides a complete server implementation with SSE transport.
- 448 GitHub stars
- Enables query plan analysis for optimization.
- Offers rich catalog information, including table and column descriptions.
- Includes detailed YAML-based knowledge about PostgreSQL extensions.
- Supports connections to multiple PostgreSQL databases simultaneously.
Use Cases
- Connecting AI agents to PostgreSQL databases for data analysis.
- Exploring database schemas and understanding data relationships programmatically.
- Analyzing query execution plans to improve database performance.