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 · 1 connector · postgresql.org ↗

Open-source servers

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

Built for PostgreSQL (542)

  • Why this server?

    Provides 36 tools for interacting with PostgreSQL databases, including schema introspection, query execution, data exploration, performance monitoring, security auditing, and maintenance.

    A
    license
    A
    quality
    C
    maintenance
    Full-featured MCP server that exposes 36 tools for interacting with PostgreSQL databases, covering schema introspection, query execution, data exploration, performance monitoring, security auditing, and maintenance.
    36
    5 npm
    MIT
  • Why this server?

    Provides tools for interacting with PostgreSQL databases, enabling querying, schema inspection, and database administration.

  • Why this server?

    Provides read-only database introspection and querying capabilities, including schema inspection, parameterized queries, table previews, change tracking, and row counting, while preventing any data modifications.

  • Why this server?

    Integrates with a PostgreSQL database to manage booking data, providing tools for staff management, appointment scheduling, client records, and availability search.

    A
    license
    A
    quality
    D
    maintenance
    MCP server exposing a PostgreSQL booking datastore to MCP clients, enabling read/write operations on staff, schedules, clients, and bookings with optional human-approval workflow integration.
    5
    MIT
  • Why this server?

    Provides read-only access to PostgreSQL databases with query sandboxing, sensitive column masking, and rate limiting.

  • Why this server?

    Provides read-only access to PostgreSQL databases, allowing querying (SELECT only), listing tables, describing table schemas, listing schemas, and listing configured environments. Supports multiple environments (staging, test, prod) with configurable protection limits.

    A
    license
    A
    quality
    D
    maintenance
    Provides read-only access to PostgreSQL databases, enabling querying, schema exploration, and table metadata retrieval via MCP tools like query, list-tables, describe-table, list-schemas, and list-environments.
    5
    MIT
  • Why this server?

    Supports estimate-revision tools by requiring a PostgreSQL database to store and retrieve historical EPS and revenue estimate revision data.

    A
    license
    A
    quality
    B
    maintenance
    Enables AI agents to analyze stocks, screen markets, compare peers, read earnings calls, and track sector rotations using live financial data from Financial Modeling Prep.
    21
    PolyForm Noncommercial 1.0.0
  • Why this server?

    Provides tools for managing and optimizing PostgreSQL databases, including schema intelligence, query planning, index tuning, health checks, and safe SQL execution.

  • Why this server?

    Provides tools for managing PostgreSQL databases and roles, including creating, altering, and dropping databases and roles, as well as granting and revoking privileges.

  • Why this server?

    Provides safe, structured access to a PostgreSQL database, enabling health checks, index tuning, lock analysis, bloat detection, schema inspection, and SQL execution with read-only enforcement.

    A
    license
    A
    quality
    D
    maintenance
    A Model Context Protocol (MCP) server for PostgreSQL that provides safe, structured access to your database for AI assistants, enabling health checks, index tuning, lock analysis, and more.
    13
    MIT
  • Why this server?

    Diagnoses Postgres logical replication: slot WAL retention, walsender lag, stuck subscriptions, with gated remediation.

    A
    license
    A
    quality
    D
    maintenance
    Diagnoses and manages PostgreSQL logical replication including slot WAL retention, walsender lag, stuck subscriptions, and provides gated remediation tools for safe AI-driven operations.
    13
    GPL 3.0
  • Why this server?

    Provides tools for analyzing database health, index tuning, query planning, schema intelligence, and safe SQL execution on PostgreSQL databases.

    A
    license
    B
    quality
    D
    maintenance
    An open-source MCP server for PostgreSQL that provides database health analysis, index tuning, query plan optimization, and safe SQL execution, suitable for both development and production environments.
    9
    MIT
  • Why this server?

    Allows querying PostgreSQL databases, including cross-source joins with other data sources like CSV files and REST APIs via DuckDB.

    A
    license
    A
    quality
    C
    maintenance
    Unified MCP server for querying CSV, Postgres, and REST API data sources via embedded DuckDB, enabling cross-source SQL joins with no external query service.
    7
    63 npm
    MIT
  • Why this server?

    Provides tools for performing vector similarity search, hybrid search (vector + full-text), upserting embeddings, and managing HNSW/IVFFlat indexes on pgvector-backed tables in PostgreSQL.

    A
    license
    A
    quality
    D
    maintenance
    An MCP server that gives LLM agents first-class access to pgvector-backed embedding tables in PostgreSQL: similarity search, hybrid (vector + full-text) search, upserts, and HNSW/IVFFlat index management.
    7
    32 PyPI
    MIT
  • Why this server?

    Provides PostgreSQL DBA operations, including cluster health overviews, slow-query RCA, bloat and vacuum analysis, blocking lock-chain RCA, index and table inspection, replication status, and governed writes such as creating/dropping indexes, running vacuum/analyze, updating settings, and terminating/canceling backends, with audit logging and undo support.

    A
    license
    A
    quality
    B
    maintenance
    Governed PostgreSQL DBA operations — slow-query, bloat, and blocking-lock RCA, index management, vacuum/analyze, and replication lag, with unbypassable audit logging (MCP + CLI), budget/runaway guards, dry-run, and undo/rollback.
    35
    MIT
  • Why this server?

    Provides guarded access to a PostgreSQL database with least-privilege scopes, statement analysis, PII masking, human approval for writes, and an audit trail.

    A
    license
    A
    quality
    D
    maintenance
    An MCP server that enables AI agents to securely interact with PostgreSQL databases with least-privilege scopes, PII masking, and human approval for writes.
    4
    MIT
  • Why this server?

    Allows querying and managing a PostgreSQL database through a PHP tunnel, supporting list schemas, tables, describe table, and SQL queries with configurable access modes (readonly, readwrite, full).

    A
    license
    A
    quality
    D
    maintenance
    A local stdio MCP bridge that enables Cursor to interact with a remote PostgreSQL database through a PHP/Apache HTTP tunnel.
    5
    14 npm
    MIT
  • Why this server?

    Provides database health checks, index tuning, query plans, schema intelligence, and safe SQL execution for PostgreSQL databases.

    A
    license
    A
    quality
    D
    maintenance
    A Postgres MCP server with index tuning, explain plans, health checks, and safe SQL execution for AI agents.
    9
    MIT
  • Why this server?

    Analyzes PostgreSQL migrations for dangerous operations that could lock the database, providing PASS/REVIEW/BLOCK verdicts and safe rewrites.

    A
    license
    A
    quality
    D
    maintenance
    An MCP server that catches dangerous SQL migrations by analyzing PostgreSQL statements for locking risks and providing safe rewrites.
    2
    38 npm
    MIT
  • Why this server?

    Provides tools for querying PostgreSQL CVEs, version status, upgrade paths, and exploits for any PostgreSQL version.

    A
    license
    A
    quality
    C
    maintenance
    Query CVEs, yanked releases, known exploits, and upgrade paths for any PostgreSQL version directly from your AI assistant.
    8
    139 PyPI
    Apache 2.0
  • Why this server?

    Provides tools for interacting with a PostgreSQL database, including listing schemas and objects, describing table structures, executing read-only queries, explaining query plans, listing extensions, and (in unrestricted mode) executing DML statements.

    A
    license
    A
    quality
    C
    maintenance
    A secure PostgreSQL Model Context Protocol server that provides read-only database access through tools like schema listing, object inspection, query execution, and EXPLAIN analysis, with database-enforced access control via read-only transactions and a minimal role rather than SQL text parsing.
    7
    MIT
  • Why this server?

    Allows querying an Azure Database for PostgreSQL Flexible Server, including server discovery, catalog inspection, and read-only SQL execution using Azure CLI authentication.

    A
    license
    A
    quality
    D
    maintenance
    An MCP server that enables MCP-compatible AI tools to read-only query Azure Database for PostgreSQL Flexible Server using your existing Azure CLI login, with auto-discovery, schema inspection, and arbitrary read-only SQL. No passwords or connection strings are stored; authentication uses short-lived Entra tokens.
    14
    MIT
  • Why this server?

    Provides tools for interacting with a PostgreSQL database, allowing users to list tables, describe schemas, run read queries, explain query plans, get database stats, and optionally execute write queries.

    A
    license
    A
    quality
    D
    maintenance
    MCP server for PostgreSQL that enables safe read-only database queries, table schema inspection, and query execution planning.
    6
    BSD 3-Clause
  • Why this server?

    Allows introspection of PostgreSQL databases, providing tools to list tables, describe tables, list foreign keys, summarize the schema, and generate Graphviz DOT ER diagrams.

    A
    license
    B
    quality
    D
    maintenance
    MCP server for introspecting PostgreSQL databases, providing tools to list tables, describe schemas, foreign keys, and generate DOT ER diagrams.
    5
    11 npm
    MIT
  • Why this server?

    Provides tools to audit a PostgreSQL schema for CERIF 1.6 conformance and generate PostgreSQL DDL scripts from the CERIF data model.

    A
    license
    A
    quality
    D
    maintenance
    MCP server that provides AI assistants with tools to understand, validate, generate, and transform CERIF 1.6 research information, including entity browsing, XML validation, document building, and migration from CERIF 1.5.
    13
    MIT
  • Why this server?

    Provides a secure, read-only interface to a PostgreSQL database, enabling AI agents to execute SQL queries with row-level security, table/column allow-lists, and full query audit logging.

    A
    license
    A
    quality
    B
    maintenance
    A security-hardened Postgres MCP server that enables LLM agents to run safe, read-only SQL queries with enforcement via SQL-AST inspection and read-only transactions.
    1
    MIT
  • Why this server?

    Provides AI agents with a secure, policy-enforced interface to PostgreSQL databases, allowing read-only queries with allowlisted schemas, tables, and columns, row limits, PII masking, and multi-database routing.

    A
    license
    A
    quality
    D
    maintenance
    A Postgres MCP server that enables AI agents to safely access production databases through deny-by-default YAML policies, PII masking, row limits, and required predicates. It also provides DBA capabilities like index tuning, health checks, and EXPLAIN plans, with support for multiple databases.
    10
    MIT
  • Why this server?

    Provides read-only access to a PostgreSQL database, enabling schema search, table description, query plan analysis, and execution of SELECT queries.

    A
    license
    A
    quality
    B
    maintenance
    An MCP server that provides targeted PostgreSQL schema access to AI agents, retrieving only relevant tables for a question and enforcing read-only access through multiple layers.
    4
    MIT
  • Why this server?

    Provides read-only evidence retrieval from a PostgreSQL database (rag_sag.yrb3_v3 schema), with tools for document overviews, evidence search, cross-paper comparison, entity expansion, spatiotemporal filtering, and source tracing.

    A
    license
    A
    quality
    D
    maintenance
    A read-only MCP server for evidence retrieval in Yellow River Basin human–earth systems reviews, exposing PostgreSQL-backed tools for searching and comparing evidence, entities, and spatiotemporal data while preserving source provenance.
    9
    MIT
  • Why this server?

    Provides read-only search and diagnostics for PostgreSQL databases with PGroonga indexes, including full-text search, index exploration, query explanations, health checks, and text normalization.

    A
    license
    B
    quality
    C
    maintenance
    Provides read-only PostgreSQL search and diagnostics over Model Context Protocol, using PGroonga indexes for full-text search, normalization, and variant lookup.
    9
    19 npm
    MIT