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 ↗

Connectors

Hosted endpoints you add to Claude, ChatGPT or any other MCP client by URL – nothing to install.

Open-source servers

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

Built for PostgreSQL (542)

  • Why this server?

    Connects read-only to PostgreSQL instances (15–18, plus managed offerings) to run an evidence-based health-check rule catalog, producing an A–F graded report with findings, coverage and next actions. Also lists and describes tables and answers questions with a single read-only SELECT at a time, within row and time limits.

    A
    license
    A
    quality
    B
    maintenance
    Read-only MCP server for SQL Server and PostgreSQL health checks. It runs the codeDB Lens diagnosis (A–F grade with rule coverage, findings with evidence, impact and next actions), reads 24-hour performance recordings, lists databases and tables, describes table schemas, and runs one guarded SELECT at a time within per-profile row and time limits. It uses the user's saved connection profiles; pass
    6
    14
    8
    Apache 2.0
  • Why this server?

    Provides tools for connecting to and querying PostgreSQL databases, including schema exploration, read-only queries, and gated write operations, with support for read-only roles and YOLO mode.

    A
    license
    A
    quality
    A
    maintenance
    A dead-simple, self-hosted MCP server for querying your databases with AI agents.
    4
    23
    137 PyPI
    2
    MIT
  • Why this server?

    Provides read-only SQL SELECT querying over accessible GeoLens datasets through a hardened SQL sandbox, leveraging PostgreSQL/PostGIS tables and spatial functions such as ST_Area, ST_DWithin, and ST_Intersects.

    A
    license
    A
    quality
    B
    maintenance
    Read-only access to a self-hosted GeoLens geospatial catalog: dataset search, schemas, GeoJSON features, saved maps, and sandboxed read-only SQL over PostGIS.
    14
    305
    Apache 2.0
  • Why this server?

    Exports data from PostgreSQL databases to various file formats (CSV, TSV, JSON, Parquet, etc.) and storage targets (local, S3, Azure Blob, etc.) using FastBCP.

  • Why this server?

    Connects to PostgreSQL as a read-only data source, extracting one CSV file per table into a shared folder that is then served over MCP for AI agents to read.

    A
    license
    A
    quality
    B
    maintenance
    Connect your database to your AI agent, read-only, without sharing your password. Maplith Bridge serves a folder of data files over MCP behind a token you create, and fills it from PostgreSQL under a role that can only read.
    2
    60 npm
    1
    Apache 2.0
  • Why this server?

    Provides read-only SQL access to a PostgreSQL database containing Mina blockchain archive data, enabling queries on blocks, transactions, and zkApp events.

    A
    license
    A
    quality
    C
    maintenance
    Exposes Mina blockchain data and operations through 40+ MCP tools, supporting live public networks, a local tutorial lightnet, and archive snapshot analysis.
    5
    100 npm
    Apache 2.0
  • Why this server?

    Provides tools for provisioning, querying, and migrating PostgreSQL databases through the LobsterDB managed service.

    A
    license
    A
    quality
    D
    maintenance
    Enables provisioning and managing PostgreSQL databases, running SQL queries, and evolving schemas with tracked migrations, with automatic account creation and no configuration needed.
    10
    6 npm
    MIT
  • Why this server?

    Provides tools for planning and executing seeding runs against a PostgreSQL database, generating realistic, relationally valid test data from its live schema.

    A
    license
    A
    quality
    D
    maintenance
    MCP server for Seedfast, which fills PostgreSQL databases with realistic, relationally valid test data generated from live schema, providing tools for planning, running, and inspecting seeding operations.
    13
    MIT
  • Why this server?

    Allows auditing PostgreSQL database performance, providing tools for analyzing table health, slow queries, index usage, and configuration.

    A
    license
    A
    quality
    B
    maintenance
    Read-only PostgreSQL performance auditing via MCP. Collects metrics from PostgreSQL system views, applies deterministic checks for index, query, vacuum, configuration, and connection issues, and returns structured findings for MCP clients.
    6
    MIT
  • Why this server?

    Reads MyOpenFund's official-document vault, a PostgreSQL database accessed through a read-only role: searches the corpus of primary-source documents with filters (corpus, publisher/source code, doc type, language, year, MIME type, date ranges, title text), retrieves every stored fact of a document with provenance (doc IDs, dates, source and PDF URLs, publisher, extra metadata), computes live-document counts grouped by field, and reports ingestion pipeline health (runs, per-source run counts and errors, open discovery errors, publication cadence).

    A
    license
    A
    quality
    B
    maintenance
    Gives any MCP client outcome-oriented tools to find official primary-source documents, read their facts with provenance, count the corpus, and check ingestion-pipeline health. Runs over stdio locally or as a bearer-token Streamable HTTP service, with toolsets enabled per deployment.
    1
    MIT
  • Why this server?

    Provides AI-powered PostgreSQL performance tuning capabilities including query analysis, index recommendations with HypoPG support, execution plan analysis, and database health monitoring for connections, vacuum operations, replication lag, and buffer cache performance.

  • Why this server?

    Enables management of PostgreSQL databases through the Run402 platform, including provisioning, schema updates, and access control via expose manifests.

    A
    license
    A
    quality
    B
    maintenance
    Enables users to provision, manage, and query AI-native Postgres databases directly from MCP-compatible clients using x402 micropayments. It supports executing SQL, performing REST API interactions via PostgREST, and managing database leases and file storage.
    8
    10,211 npm
    24
    MIT
  • Why this server?

    Allows for the connection to and execution of queries on a PostgreSQL database within the DX Data Cloud, enabling natural language interaction with organizational data and software entity information.

    A
    license
    A
    quality
    B
    maintenance
    Enables AI applications to write and execute natural language queries on organizational data stored in DX Data Cloud's Postgres database. Runs locally and provides a query tool for AI assistants to formulate and execute database queries with user approval.
    10
    13
    MIT
  • Why this server?

    Enables comprehensive PostgreSQL database operations including query execution, schema exploration, table analysis, performance optimization with EXPLAIN plans, and browsable database structure as MCP resources. Provides read-only access by default with optional write operations, SQL injection prevention, and tools for searching columns, analyzing statistics, and generating data dictionaries.

    A
    license
    A
    quality
    B
    maintenance
    MCP server with 14 tools for PostgreSQL database operations. Query databases, explore schemas, analyze tables, with SQL injection prevention and read-only mode by default.
    14
    12
    MIT
  • Why this server?

    Provides tools for querying PostgreSQL databases, including SQL execution with read-only safety, schema introspection (tables, columns, keys, indexes), performance diagnostics (EXPLAIN, pg_stat_statements, bloat, locks), health checks, and role/privilege awareness.

    A
    license
    A
    quality
    B
    maintenance
    Query and manage PostgreSQL databases from Claude Code, Cursor, and any MCP client, with read-only by default and built-in schema introspection, EXPLAIN, and performance diagnostics.
    23
    2,170 npm
    12
    MIT
  • Why this server?

    Provides tools for analyzing PostgreSQL migrations, including locking risk, rule violations, and safe alternatives.

    A
    license
    A
    quality
    B
    maintenance
    Blocks unsafe PostgreSQL migrations before an AI agent writes or runs them. check_before_apply returns a pass/fail gate; reads the real Postgres parser, classifies the lock each statement takes, checks 112 safety rules. Runs offline, no database required.
    7
    2,459 npm
    10
    MIT
  • Why this server?

    Enables querying PostgreSQL databases with read-only access, allowing execution of SELECT statements, table inspection, and database connection testing with built-in security validation.

    A
    license
    A
    quality
    D
    maintenance
    Enables secure querying of PostgreSQL databases through MCP-compatible clients. Supports read-only SQL execution, table exploration, and connection management with built-in security validation.
    3
    56 npm
    9
    MIT
  • Why this server?

    Provides tools for executing SQL queries, listing schemas, tables, and databases, describing table structure, and getting database connection status and statistics.

    A
    license
    A
    quality
    D
    maintenance
    A secure PostgreSQL MCP server with built-in SSH tunneling that enables AI assistants to connect to databases through bastion hosts automatically, supporting both STDIO and Streamable HTTP transports.
    12
    345 npm
    7
    MIT
  • Why this server?

    Provides read-only access to PostgreSQL databases, enabling AI agents to explore schemas, run SQL queries, analyze tables, detect anomalies, and generate insights across multiple databases.

    A
    license
    A
    quality
    C
    maintenance
    An MCP server that gives AI agents direct read-only access to PostgreSQL databases, enabling natural language analytics through tools for schema exploration, querying, trend analysis, and data quality checks.
    11
    5
    MIT
  • Why this server?

    Safe, read-only-by-default data exploration and SQL querying for PostgreSQL databases, allowing AI assistants to understand schemas and analyze data patterns.

    A
    license
    B
    quality
    D
    maintenance
    A lightweight Postgres MCP server for safe database exploration and query analysis, read-only by default, with multi-database support.
    4
    4
    MIT
  • Why this server?

    Provides CityJSON import and export to PostgreSQL/PostGIS, enabling database storage and retrieval of CityJSON datasets via cjdb.

    A
    license
    B
    quality
    B
    maintenance
    Enables MCP clients to inspect, validate, transform, and query CityJSON models, with support for conversion, persistence, and 3D geometry validation.
    42
    4
    MIT
  • Why this server?

    Provides a hardened read-only interface to PostgreSQL databases, allowing AI agents to run validated SQL queries with timeouts, cost limits, and an audit trail.

    A
    license
    A
    quality
    B
    maintenance
    A drop-in Model Context Protocol (MCP) server that lets an AI agent query PostgreSQL — read-only, enforced at the database level, with real SQL validation, timeouts, cost limits, OAuth 2.1, and an audit trail.
    10
    3
    MIT
  • Why this server?

    Provides access to multiple named PostgreSQL database connections at once, allowing an AI assistant to discover connections by name or alias, list schemas and tables, execute SQL with read-only or unrestricted access modes, inspect explain plans and hypothetical indexes, run health checks, and get index recommendations and top-query analysis.

    A
    license
    A
    quality
    C
    maintenance
    Enables an AI assistant to access many named PostgreSQL database connections at once, selecting connections by name or alias and reusing pools for queries, schema inspection, and analysis tools. It supports read-only or unrestricted access modes, live config reloads, and safe result truncation.
    17
    3
    MIT
  • Why this server?

    Provides specialized scanning for SQL queries intended for PostgreSQL databases to detect and block injection attacks and dangerous operations.

    A
    license
    A
    quality
    C
    maintenance
    Protects AI agents from threats like prompt injection, jailbreaks, and SQL injection through a multi-layer scanning pipeline. It also enables PII redaction and rehydration to ensure data privacy during LLM interactions.
    12
    154 npm
    2
    Apache 2.0
  • Why this server?

    Provides tools for connecting to and querying PostgreSQL databases, allowing read-only SQL execution and dynamic connection to any PostgreSQL instance via connection strings.

    A
    license
    A
    quality
    C
    maintenance
    Enables read-only interaction with PostgreSQL databases through natural language queries, supporting dynamic connections and secure query validation.
    3
    150 npm
    2
    MIT
  • Why this server?

    Allows querying and exploring the Northwind sample PostgreSQL database through a read-only interface, providing tools to list tables, describe schemas, sample data, run SELECT/WITH queries, and retrieve full schema overview.

  • Why this server?

    Provides tools to execute SQL queries, list tables, describe table schemas, list databases, get table indexes, and foreign keys for a PostgreSQL database.

    A
    license
    A
    quality
    D
    maintenance
    A production-oriented MCP server for PostgreSQL that exposes database operations like query execution, schema introspection, and table metadata to MCP clients such as Claude Desktop and VS Code.
    6
    2
    MIT
  • Why this server?

    Provides read-only access to PostgreSQL databases, allowing AI agents to run SQL queries, inspect execution plans, and explore database structure including tables, columns, indexes, foreign keys, views, functions, and sequences.

    A
    license
    A
    quality
    B
    maintenance
    Read-only JDBC MCP server for PostgreSQL, Oracle, and SQL Server: safe SQL access for AI agents (Claude Code, Cursor, Copilot) with schema discovery, query validation, execution plans, benchmarking, and index/statistics tools
    49
    2
    Apache 2.0
  • Why this server?

    Uses PostgreSQL with pgvector as the self-hosted memory store, persisting learned memories, Insights, Profiles, and document Resources so they can be indexed and retrieved as cited evidence; supports native multi-node deployment with stateless API replicas and durable workers over a shared PostgreSQL/pgvector database.

    A
    license
    A
    quality
    B
    maintenance
    Self-hosted OAM memory with cited recall over your existing deployment. Local stdio adapter with six tools for recall, retaining interactions and documents, operation readiness, stored Profile reads and exact memory removal. Run with npx -y @rocke-dong/oam-mcp; requires Node.js 22 and your OAM user-scoped API key. Submitted by the OAM maintainer with AI assistance.
    6
    2
    Apache 2.0
  • Why this server?

    Provides tools for managing Azure PostgreSQL Flexible Server instances, including listing servers, databases, and parameters, querying table schemas, and executing SQL queries.

    A
    license
    B
    quality
    D
    maintenance
    Enables intelligent interaction with Azure resources through natural language by translating requests into safe, auditable Azure CLI commands with plan/review workflows and direct access to 8 Azure services including Storage, Cosmos DB, Key Vault, and more.
    3
    1
    MIT