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 · 2 connectors · postgresql.org ↗

Open-source servers

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

Built for PostgreSQL (542)

  • Why this server?

    Provides read-only access to query PostgreSQL databases with tools for running SELECT queries, listing tables, describing schemas, sampling data, counting rows, and searching columns across the database.

    F
    license
    A
    quality
    C
    maintenance
    Read-only MCP server that enables AI tools like Claude and Cursor to query the Avanti Fellows PostgreSQL database, providing schema inspection, data sampling, and SELECT query execution capabilities.
    6
    1
    -
  • Why this server?

    Enables querying of PostgreSQL databases, schema inspection, and retrieval of DDL with built-in read-only protection. It provides tools for connecting to databases, executing SQL queries, listing schemas, and fetching complete DDL structures.

    A
    license
    A
    quality
    D
    maintenance
    Enables AI assistants to query PostgreSQL databases, inspect schemas, and retrieve complete DDL with built-in read-only protection. It supports multiple database connections and allows for secure database interaction and exploration via the Model Context Protocol.
    5
    24 npm
    1
    MIT
  • Why this server?

    Connects to any PostgreSQL database, allowing schema exploration, SQL query execution, and performance analysis through natural conversation.

  • Why this server?

    Serves as the MCP server's sovereign persistence store: immutable, content-deduped prose blobs (deduplicated via a sha256 expression index), container/tree facts, and per-save transaction history are all held in PostgreSQL tables, so reads and writes of node bodies, notes, and history are backed by a Postgres database. A bundled PostgreSQL also powers the desktop sidecar backend.

  • Why this server?

    Provides read-only access to PostgreSQL databases over SSH, allowing agents to query tables, describe schemas, list tables, and check database health metrics such as connection counts and locks.

    A
    license
    A
    quality
    C
    maintenance
    Read-only MCP server for on-prem Linux VMs and PostgreSQL over SSH. Check service health, retrieve bounded logs, inspect DB state, and explore table schemas — without terminal access.
    10
    1
    MIT
  • Why this server?

    Allows querying and inspecting PostgreSQL databases with read-only operations by default, and optional write and maintenance operations, using MCP tools such as execute_query, execute_dml_ddl_dcl_tcl, and schema/table introspection.

    A
    license
    A
    quality
    C
    maintenance
    Local MCP server for safe querying and inspecting PostgreSQL databases, with write and maintenance operations disabled by default.
    8
    1
    MIT
  • Why this server?

    Provides tools for querying, describing, listing tables, schemas, constraints, indexes, views, functions, explaining queries, and getting table statistics for PostgreSQL databases.

    A
    license
    B
    quality
    C
    maintenance
    A Model Context Protocol (MCP) server that provides secure database access to PostgreSQL through Kysely ORM, enabling Claude Desktop to interact with PostgreSQL databases using natural language.
    10
    1
    ISC
  • Why this server?

    Provides tools to directly interact with PostgreSQL databases, including creating tables, listing tables, describing tables, and executing arbitrary SQL queries.

    A
    license
    A
    quality
    D
    maintenance
    A secure MCP server that lets AI assistants directly interact with PostgreSQL databases via tools like create_table, list_tables, and execute_sql, plus a web configurator for managing connections.
    4
    1
    MIT
  • Why this server?

    Provides tools for executing SQL queries, obtaining query execution plans, and inspecting table schemas in a PostgreSQL database.

  • Why this server?

    Enables agents to search for, audit, and install AI agent skills and MCP servers related to PostgreSQL, with security grades and quality scores.

  • Why this server?

    Provides read-only access to a PostgreSQL database, enabling AI assistants to list schemas and tables, inspect table structures, and run SELECT queries to answer questions about the data.

    A
    license
    A
    quality
    B
    maintenance
    Lets AI assistants like Cursor and Claude safely explore your database and answer questions about your data in plain English.
    4
    1
    MIT
  • Why this server?

    Provides tools for connecting to and interacting with PostgreSQL databases, including running SQL queries, describing table schemas, listing configured databases, and testing connections, with enforced read-only access where configured.

    A
    license
    A
    quality
    B
    maintenance
    Enables AI assistants to run SQL queries against PostgreSQL databases through the psql CLI, with support for multiple configured databases and enforced read-only guarantees.
    4
    1
    MIT
  • Why this server?

    Provides read-only querying, schema exploration, execution plan inspection, and SQL diagnostics for PostgreSQL databases.

    A
    license
    A
    quality
    C
    maintenance
    Enables AI agents to explore PostgreSQL schemas, run read-only queries, inspect execution plans, and receive evidence-backed SQL diagnostics with reproducible optimization benchmarks over local stdio.
    5
    1
    MIT
  • Why this server?

    Provides a security-hardened gateway for querying PostgreSQL databases, enforcing read-only access, PII masking, rate limits, and human-approved write operations via expiring tokens.

    A
    license
    A
    quality
    B
    maintenance
    Enables AI agents to query PostgreSQL databases securely with read-only defaults, PII masking, rate limiting, and human-approved, expiring mutation tokens.
    9
    1
    Apache 2.0
  • Why this server?

    Provides read-only access to PostgreSQL databases, enabling agents to inspect schemas, tables, views, columns, keys, indexes, sample rows, and query plans; run SELECT queries in the analyst profile; and compare schemas across multiple stands.

    A
    license
    A
    quality
    B
    maintenance
    Gives agents read-only access to PostgreSQL databases, enabling them to inspect schemas, sample rows, compare stands, view query plans, and run read-only SQL through a single entry point.
    6
    1
    MIT
  • Why this server?

    Provides bounded, read-only access to a PostgreSQL database, enabling AI assistants to explore schemas, execute SQL queries, inspect query plans, test hypothetical indexes, find slow queries, and check database health while keeping results compact and respecting read-only mode.

    A
    license
    A
    quality
    B
    maintenance
    Enables AI assistants to explore a PostgreSQL database, run bounded read-only SQL, inspect query plans, test hypothetical indexes, find slow queries, and check database health with compact CSV output.
    10
    1
    MIT
  • Why this server?

    Enables AI assistants to connect to and safely explore, query, and analyze PostGIS/PostgreSQL spatial databases. It provides spatial tools for distance searches, nearest-neighbor queries, buffering, spatial joins, aggregation, and map rendering of query results.

  • Why this server?

    Provides PostgreSQL diagnostics and cluster management for Multigres clusters, including schema and object inspection, read-only SQL execution, query plans with hypothetical indexes, top-query analysis, index advice, health checks, cluster status, backup operations, and node log reading.

  • Why this server?

    Enables spawning isolated MicroVM sandboxes with an optional embedded PostgreSQL instance and returns a PostgreSQL connection URL, allowing AI agents to run database-backed tasks in a sandboxed environment.

    A
    license
    B
    quality
    B
    maintenance
    Enables AI coding agents to execute shell commands and compile or run code snippets inside sub-6ms hardware-isolated KVM MicroVM sandboxes instead of the local machine. It also lets agents spawn, list, hibernate, wake, and destroy sandboxes — optionally bundled with an embedded PostgreSQL database — behind an SSRF/metadata firewall with Base64-escaped code delivery.
    75
    1,696 npm
    1
    Apache 2.0
  • Why this server?

    Provides tools for exploring and querying a PostgreSQL database, including executing read-only SQL queries, listing tables, and obtaining schema information for specific tables.

    A
    license
    B
    quality
    D
    maintenance
    A server implementing the Model Context Protocol (MCP) for Cursor that allows using a PostgreSQL database as storage for model contexts, enabling secure database exploration and querying.
    10
    ISC
  • Why this server?

    Provides comprehensive PostgreSQL database management including health monitoring, index tuning, query plan analysis, schema intelligence, and configurable SQL execution with support for both development and production environments.

    A
    license
    B
    quality
    D
    maintenance
    Enables comprehensive PostgreSQL database management including index tuning, query plan analysis, health monitoring, schema-aware SQL generation, and safe SQL execution with configurable access control for both development and production environments.
    9
    MIT
  • Why this server?

    Provides comprehensive PostgreSQL database management tools including schema inspection, SQL execution, query explanation with EXPLAIN plans, index tuning recommendations, workload analysis, and database health checks with support for pg_stat_statements and hypopg extensions.

    A
    license
    B
    quality
    D
    maintenance
    Enables interaction with PostgreSQL databases through comprehensive database management tools including index tuning, query execution plans, health checks, schema intelligence, and safe SQL execution with configurable read-only mode for production use.
    35
    MIT
  • Why this server?

    Provides a comprehensive set of tools for interactive PostgreSQL data exploration and automation, including schema discovery, read-only query previews, execution of stored procedures and functions, and managed data insertion.

    A
    license
    A
    quality
    C
    maintenance
    A Python-based MCP server for interactive PostgreSQL data exploration, schema discovery, and safe SQL execution with support for stored procedures. It also enables automation through external HTTP API requests and local bash script execution on Fedora and Linux systems.
    19
    MIT
  • Why this server?

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

  • Why this server?

    Provides tools for database migration from various source systems (Oracle, SQL Server, Netezza, PostgreSQL) to PostgreSQL or SQL Server, using the MigratorXpress engine.

    A
    license
    A
    quality
    D
    maintenance
    This MCP server enables database migration between heterogeneous systems (Oracle, PostgreSQL, SQL Server, Netezza to PostgreSQL or SQL Server) through AI assistants by providing tools for command preview, execution, validation, and workflow suggestions.
    6
    MIT
  • Why this server?

    Provides tools for managing and analyzing PostgreSQL databases, including schema exploration, query execution, performance analysis, and database health monitoring.

    A
    license
    A
    quality
    D
    maintenance
    Provides PostgreSQL database management and analysis via MCP, enabling schema exploration, query execution, performance monitoring, and database health checks.
    36
    40 npm
    MIT
  • Why this server?

    Allows interaction with a PostgreSQL database, providing tools for query execution, schema inspection, CRUD operations, and security features.

    A
    license
    A
    quality
    Not graded
    maintenance
    Enables Claude to interact with a local PostgreSQL database through SQL queries, schema inspection, and CRUD operations.
    8
    MIT
  • Why this server?

    Provides tools for database health analysis, index tuning, query plan optimization, schema intelligence, and safe SQL execution for PostgreSQL databases.

  • Why this server?

    Provides tools for executing parameterized SQL queries, catalog discovery, CRUD operations, and connection management with TLS support for PostgreSQL databases.

  • Why this server?

    Allows querying a PostgreSQL database using natural language, with results returned as structured XML.

    A
    license
    A
    quality
    D
    maintenance
    Enables natural language querying of PostgreSQL databases under read-only mode, returning results as structured XML.
    1
    MIT