Skip to main content
Glama

PostgreSQL MCP Servers & Connectors

PostgreSQL is an advanced open source relational database management system that offers robustness, scalability, and performance.

1942 open-source servers · 6 connectors · postgresql.org ↗

Open-source servers

Code you run yourself, locally or on your own infrastructure.

Built for PostgreSQL (542)

  • Why this server?

    Provides governed access to PostgreSQL databases: users query as their own mapped Postgres role, with access controlled by grants, row-level security, and masking views. Reads run in read-only transactions with row and byte caps, writes are proposed and require named approval, and all tool calls, sign-ins, approvals, and admin changes are recorded in a hash-chained audit log.

    A
    license
    Not graded
    quality
    B
    maintenance
    Enables AI assistants to query Postgres as the signed-in person through OAuth 2.1/OIDC, with database-enforced read-only queries, PII masking, human-approved writes, and a tamper-evident audit log.
    36
    Apache 2.0
  • Why this server?

    Allows execution of SQL queries against a PostgreSQL database, access to database schema information, and use of query templates, enabling AI assistants to retrieve and manipulate data in PostgreSQL databases.

  • Why this server?

    Enables AI-driven database administration, observability, and querying with support for schema management, SQL execution, JSONB operations, text processing, statistical analysis, query optimization, and extensions including pgvector, PostGIS, and pg_stat_statements.

  • Why this server?

    Provides over 200 tools for managing and monitoring PostgreSQL databases, including core operations, performance analysis, user and role management, replication monitoring, lock analysis, and advanced diagnostics.

    A
    license
    Not graded
    quality
    D
    maintenance
    Enables AI assistants to manage, monitor, and optimize PostgreSQL databases with over 200 specialized tools for operations, security, performance tuning, and diagnostics.
    12
    MIT
  • Why this server?

    Provides tools for interacting with PostgreSQL databases, enabling management of database operations, queries, and schema manipulation.

  • Why this server?

    Provides tools for interacting with PostgreSQL databases, including CRUD operations, schema management (listing databases and tables, describing table structures, creating and altering tables), and executing SQL queries with optional query plan validation and read-only mode protection.

    A
    license
    Not graded
    quality
    D
    maintenance
    what is go-mcp-postgres? go-mcp-postgres is a Model Context Protocol (MCP) server designed for interacting with Postgres databases, allowing for easy CRUD operations and automation without the need for a Node.js or Python environment.
    7
    MIT
  • Why this server?

    Allows interaction with PostgreSQL databases, providing tools for schema listing, table/column/index/foreign key inspection, and executing DQL, DML, DDL, DCL queries.

    A
    license
    Not graded
    quality
    D
    maintenance
    Enables interaction with PostgreSQL databases through MCP, supporting queries, DDL, DML, and schema inspection.
    35 PyPI
    6
    MIT
  • Why this server?

    Provides a structured, safe interface for PostgreSQL databases, enabling read-only schema introspection, query execution (read-only by default), and optional write operations via explicit opt-in.

    A
    license
    Not graded
    quality
    D
    maintenance
    Native MCP server for PostgreSQL that reads credentials from .env at runtime with flexible key mapping, configurable tool selection, and read-only mode by default, providing a structured, safe interface for LLMs to interact with databases.
    153 npm
    5
    MIT
  • Why this server?

    Provides tools for connecting to and querying PostgreSQL databases, including listing tables, retrieving schemas, executing SELECT queries, describing table structures with indexes and constraints, and sampling table data. Includes automatic SSL configuration for AWS RDS instances.

    A
    license
    Not graded
    quality
    B
    maintenance
    Enables secure read-only access to PostgreSQL databases, allowing users to list tables, query schemas, execute SELECT statements, and inspect table structures through natural language interactions.
    650 npm
    4
    MIT
  • Why this server?

    Provides read-only SQL querying of PostgreSQL database tables, with tools to list tables, describe table schemas, and execute SELECT queries with security constraints.

    A
    license
    Not graded
    quality
    C
    maintenance
    Provides a read-only PostgreSQL SQL surface for LLM agents via MCP, with defense-in-depth security layers for safe database queries.
    190 PyPI
    4
    MIT
  • Why this server?

    Provides read-only access to a PostgreSQL database, allowing SQL queries, table listing, and retrieval of table schemas and descriptions.

  • Why this server?

    Provides full read-write access to PostgreSQL databases, enabling LLMs to query and modify database content with transaction management and safety controls.

    A
    license
    Not graded
    quality
    D
    maintenance
    Enables full read-write access to PostgreSQL databases with transaction management and safety controls, allowing LLMs to query and modify database content.
    10 npm
    3
    MIT
  • Why this server?

    Provides safe disposable Postgres databases for coding agents, allowing creation, use, and cleanup of real Postgres databases with scoped roles and TTLs.

    A
    license
    Not graded
    quality
    B
    maintenance
    PGSandbox MCP is a local Rust MCP server for disposable Postgres databases. It creates tracked database/role pairs, returns scoped sandbox credentials, supports bounded SQL and schema tools, and cleans up expired sandboxes with TTLs.
    3
    MIT
  • Why this server?

    Provides read-only access to PostgreSQL databases, enabling schema exploration, querying, relationship discovery, and PostgreSQL-specific features like materialized views, extensions, and enum types.

    A
    license
    Not graded
    quality
    D
    maintenance
    Enables AI assistants to safely query and explore SQL Server and PostgreSQL databases with read-only access, supporting schema discovery, relationship exploration, and query execution.
    3
    MIT
  • Why this server?

    Provides guarded read/write access to PostgreSQL databases, including query validation, schema exploration, two-phase write confirmation, and audit logging.

    A
    license
    Not graded
    quality
    D
    maintenance
    Connects AI assistants to PostgreSQL databases with production-grade safety features including query validation, guarded writes, rate limiting, and audit logging.
    3
    MIT
  • Why this server?

    Provides tools for PostgreSQL database exploration and querying, including executing SELECT queries, listing tables, retrieving table schemas, filtering records, and getting database statistics.

    A
    license
    Not graded
    quality
    D
    maintenance
    Enables exploration and querying of PostgreSQL databases through natural language. Supports listing tables, viewing schemas, executing SELECT queries, filtering records, and retrieving database statistics.
    2
    MIT
  • Why this server?

    Enables AI assistants to analyze and optimize PostgreSQL database performance by identifying performance issues, providing missing index recommendations with SQL commands, and suggesting query rewrites for better performance.

    A
    license
    Not graded
    quality
    D
    maintenance
    Enables AI assistants to analyze and optimize PostgreSQL database performance by identifying missing indexes and suggesting query rewrites. It allows users to retrieve database projects and implement performance fixes directly through natural language in their code editor.
    16 npm
    2
    MIT
  • Why this server?

    Provides tools for interacting with PostgreSQL databases, including schema inspection, table listing, search, query execution (read-only and modification), and performance analysis via EXPLAIN.

    A
    license
    Not graded
    quality
    D
    maintenance
    Enables AI assistants to safely interact with PostgreSQL databases, perform queries, inspect schemas, and analyze query performance.
    2
    ISC
  • Why this server?

    Provides tools for securely interacting with PostgreSQL databases, including schema inspection, SELECT/INSERT/UPDATE/DELETE query execution, transaction management, admin monitoring, and AI-powered SQL generation, validation, explanation, and optimization.

  • Why this server?

    Provides read-only access to the e-SUS APS/PEC Data Warehouse stored in PostgreSQL, enabling clinical auditing, patient care tracking, and monitoring of primary health care indicators through specialized MCP tools.

    A
    license
    Not graded
    quality
    B
    maintenance
    Enables secure, read-only querying of the e-SUS APS/PEC PostgreSQL data warehouse for clinical extraction, care-line tracking, audit, and public-health indicator monitoring through LGPD-compliant anonymization.
    2
    MIT
  • Why this server?

    Provides read-only analysis of PostgreSQL databases, including schema introspection, table and relationship exploration, SELECT/EXPLAIN/SHOW/CTE query execution, index and constraint inspection, performance and health monitoring, and data quality checks.

    A
    license
    Not graded
    quality
    D
    maintenance
    Enables AI assistants to safely explore and analyze a database in read-only mode: introspecting schemas and relationships, running SELECT/EXPLAIN analytics queries, and inspecting performance, locks, indexes, and data quality with no risk of modification.
    2
    MIT
  • Why this server?

    Provides comprehensive read-only access to PostgreSQL databases with multi-tenant support, enabling schema introspection, table structure analysis, function definition retrieval, and flexible SQL querying across different tenant schemas.

    A
    license
    Not graded
    quality
    Not graded
    maintenance
    Enables read-only access to PostgreSQL databases with multi-tenant support, allowing users to query data, explore schemas, inspect table structures, and view function definitions across different tenant schemas safely.
    55 npm
    1
    -
  • Why this server?

    Enables connection to PostgreSQL databases for BSim function similarity matching and analysis

    A
    license
    Not graded
    quality
    D
    maintenance
    Enables LLMs to autonomously reverse engineer binaries using Ghidra's capabilities including decompilation, function analysis, automatic renaming, and BSim integration for function similarity matching.
    1
    AGPL 3.0
  • Why this server?

    Provides safe, controlled access to PostgreSQL databases with tools for executing queries, schema introspection, query analysis, and database statistics. Features granular permission control, query safety mechanisms, and AI-powered query optimization suggestions.

    A
    license
    Not graded
    quality
    Not graded
    maintenance
    Provides AI assistants with safe, controlled access to PostgreSQL databases with read-only defaults, granular permissions, query safety features, and schema introspection capabilities.
    1
    -
  • Why this server?

    Provides tools for querying, monitoring, and analyzing PostgreSQL databases, including schema exploration, performance metrics tracking, and optional write operations for data management.

    A
    license
    Not graded
    quality
    D
    maintenance
    An MCP server for Microsoft SQL Server integration that enables users to query, monitor, and analyze databases directly through Claude. It supports schema exploration, performance analysis, and optional write operations via natural language commands.
    10 npm
    1
    MIT
  • Why this server?

    Allows AI assistants to interact with PostgreSQL databases by executing SQL queries and managing data through the Model Context Protocol.

  • Why this server?

    Provides read-only access to PostgreSQL databases, allowing users to execute SELECT queries, inspect table structures, and list schemas or tables while ensuring security through query validation and parameterization.

    A
    license
    Not graded
    quality
    D
    maintenance
    Provides secure, read-only access to PostgreSQL databases for schema inspection and data querying. It enables users to list tables, describe structures, and execute SELECT statements while strictly blocking destructive operations.
    1
    MIT
  • Why this server?

    Provides tools for executing SQL queries, exploring database schemas, analyzing query performance, and managing PostgreSQL databases. Supports streaming large result sets to CSV, automatic reconnection, and pre-connect scripts for tunnels (e.g., AWS SSM).

    A
    license
    Not graded
    quality
    B
    maintenance
    A PostgreSQL MCP server for AI agents that streams large result sets to CSV, enforces per-query timeouts, auto-reconnects with backoff, and supports long-running tunnel scripts with credential rotation.
    1
    MIT
  • Why this server?

    Provides read-only access to multiple PostgreSQL databases simultaneously via a single MCP server, with hot-reload JSON configuration for dynamically managing database connections.

  • Why this server?

    Provides tools for managing PostgreSQL databases, including listing schemas and tables, describing table structures, executing read-only queries, and administrating database connections across multiple databases.

    A
    license
    Not graded
    quality
    B
    maintenance
    Enables MCP-compatible clients to interact with PostgreSQL databases with multi-database support and connection pooling.
    1
    MIT