DatabasePython

pg-mcp-server

PG-MCP is a server that enables AI agents to interact with PostgreSQL databases using the Model Context Protocol.

Free
N/A rating (0 reviews)0 installs537 GitHub stars
PostgreSQLMCPAIDatabase Management

The PG-MCP server provides a comprehensive API that allows AI agents to discover, connect to, query, and understand PostgreSQL databases. It enhances the Model Context Protocol by offering features like multi-database support, rich catalog information, and detailed insights into PostgreSQL extensions. Additionally, it includes tools for executing SQL queries and analyzing query execution plans, making it a robust solution for database interaction. With features such as secure connection management, connection pooling, and a dedicated tool for query explanation, PG-MCP ensures efficient and effective communication between AI agents and PostgreSQL databases. This server is designed for production use, providing a reliable and scalable solution for organizations looking to leverage AI capabilities in their database operations.

Compatible with

Claude DesktopCursor

Install

Claude Desktop

Add to your claude_desktop_config.json:

{
  "mcpServers": {
    "pg-mcp-server": {
      "command": "npx",
      "args": [
        "-y",
        "@modelcontextprotocol/server-pg-mcp-server"
      ]
    }
  }
}

Config File Location

Mac: ~/Library/Application Support/Claude/claude_desktop_config.json

Windows: %APPDATA%\Claude\claude_desktop_config.json

Linux: ~/.config/claude/claude_desktop_config.json

Some servers require additional setup - check the GitHub README for specific instructions.

Permissions

ok0
ok1
pg-mcp-server MCP Server — MCPNest — MCPNest