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 safe, read-only access to a PostgreSQL warehouse, enabling schema introspection and guarded SELECT queries with row limits and timeouts.

    A
    license
    A
    quality
    D
    maintenance
    An MCP server that provides safe, read-only access to a PostgreSQL warehouse, enabling schema introspection, guarded SQL queries, and truncated result reporting for LLMs.
    3
    MIT
  • Why this server?

    Provides tools for interacting with PostgreSQL databases, enabling schema discovery, table inspection, database, role, and permission listing, and running SQL queries (read-only by default, with optional write support).

    A
    license
    A
    quality
    D
    maintenance
    MCP server for PostgreSQL, providing schema discovery, catalog introspection, read-only querying, and optional safe write operations to AI assistants.
    8
    32 npm
    PolyForm Noncommercial 1.0.0
  • Why this server?

    Provides text-to-SQL querying for PostgreSQL databases, allowing natural language requests to be converted into read-only SQL SELECT statements and executed against configured database schemas.

    A
    license
    A
    quality
    D
    maintenance
    MCP server enabling text-to-SQL on PostgreSQL databases using a CrewAI multi-agent system. It generates and executes read-only SQL queries from natural language, with security layers against prompt injection.
    2
    MIT
  • Why this server?

    Provides secure, read-only PostgreSQL query execution with automatic PII masking, pseudonymization, and restoration capabilities for AI agents.

    A
    license
    A
    quality
    C
    maintenance
    MCP server for secure read-only PostgreSQL queries with automatic PII masking, pseudonymization, and strict SQL guards to enforce data privacy compliance.
    3
    MIT
  • Why this server?

    Provides database administration and optimization tools for PostgreSQL, including schema inspection, SQL execution with read-only support, EXPLAIN query plans, index analysis, health checks, slow query analysis, table sizes, and lock monitoring.

    A
    license
    A
    quality
    D
    maintenance
    Enables AI agents to analyze, optimize, and safely interact with PostgreSQL databases, including health checks, index recommendations, query planning, and SQL execution with read-only and production protection modes.
    15
    MIT
  • Why this server?

    Provides read-only PostgreSQL database access, with tools for running read-only queries, explaining query plans, listing tables, describing table columns, and checking write privileges.

    A
    license
    A
    quality
    C
    maintenance
    Enables read-only PostgreSQL interaction through safe query execution, query planning, table and column inspection, and privilege checks, with multi-layer defenses against write operations and transaction-control exploits.
    5
    MIT
  • Why this server?

    Provides tools for interacting with PostgreSQL databases, including executing SQL queries with server-side paging, managing connection profiles, exploring schema (tables, columns, indexes), generating query plans, and more.

    A
    license
    A
    quality
    D
    maintenance
    Enables SQL database interaction with true server-side result paging, runtime-managed connection profiles, and SSH-bridged access for PostgreSQL.
    18
    MIT
  • Why this server?

    Provides tools for exploring PostgreSQL databases and running SQL, including switching profiles, listing databases, schemas, and tables, describing table columns, and executing queries with read-only safety by default.

    A
    license
    A
    quality
    C
    maintenance
    Enables PostgreSQL schema exploration and SQL querying through natural language in MCP clients like Cursor, with support for dev/qa profile switching and read-only safety controls.
    7
    ISC
  • Why this server?

    Provides read-only access to a PostgreSQL database, enabling agents to browse schemas and tables, search columns, follow foreign key relationships, run capped SELECT queries, inspect query plans, and export Markdown data dictionaries.

    A
    license
    A
    quality
    B
    maintenance
    Provides an AI agent with read-only PostgreSQL access, enabling schema browsing, foreign-key exploration, column search across tables, capped SELECT queries, and offline data dictionary export while rejecting write operations.
    9
    5 npm
    MIT
  • Why this server?

    Provides tools for querying, inspecting, and managing local PostgreSQL databases, including read-only SELECT queries, listing schemas and tables, describing table columns and constraints, and optionally executing write or DDL statements when enabled.

    A
    license
    A
    quality
    B
    maintenance
    Local-first PostgreSQL MCP bridge with parameterized queries (SQLi prevention), read-only mode, tamper-evident audit logs
    6
    MIT
  • Why this server?

    Provides a PostgreSQL-backed mock CRM backend, enabling the server's CRM query and write tools to read and upsert CRM records stored in PostgreSQL.

    A
    license
    A
    quality
    C
    maintenance
    Enables AI agents to perform go-to-market workflows such as company and contact enrichment, CRM querying, and controlled, audited writes to a CRM through MCP tools callable from any MCP client.
    1
    MIT
  • Why this server?

    Provides tools for PostgreSQL database exploration and SQL querying, including listing databases, schemas, tables, describing table columns, running read-only queries, and switching between dev/QA profiles.

    A
    license
    A
    quality
    C
    maintenance
    Enables natural language interaction with PostgreSQL databases via MCP, supporting database exploration, schema listing, and SQL queries with profile-based connections.
    7
    5 npm
    ISC
  • Why this server?

    Provides read-only access to PostgreSQL databases, enabling validated SQL queries, listing tables, describing table schemas, and inspecting foreign-key relationships.

    A
    license
    A
    quality
    C
    maintenance
    Enables read-only PostgreSQL interaction with enforced SQL security policies, including query validation, row limits, and timeouts.
    4
    MIT
  • Why this server?

    Backs the MCP server with a local Postgres database that stores university-program research. The tools let an agent list and filter programs (by research status, country, minimum overall fit, or free-text query), fetch a full program record by id, insert new programs (de-duplicating on program URL and returning the existing id), patch backend/overall fit scores and notes, and mark a program as verified with a verification timestamp.

    A
    license
    A
    quality
    C
    maintenance
    Enables a Hermes agent to store and manage university-program research in a local Postgres database over streamable HTTP. Exposes tools to list and filter programs, fetch a full record, insert new programs with duplicate-URL detection, patch fit scores, and mark entries as verified.
    5
    GPL 3.0
  • Why this server?

    Provides tools for querying a local PostgreSQL financial database, exposing a transactions table (id, user_id, amount, merchant, timestamp) via MCP tools such as `get_user_transactions` to retrieve a user's recent mock transactions and `flag_anomalies` to surface transactions exceeding a given threshold.

    A
    license
    B
    quality
    C
    maintenance
    Enables AI agents to query a local PostgreSQL-backed mock financial database, retrieving a user's recent transaction history and flagging transactions that exceed a given spending threshold.
    2
    ISC
  • Why this server?

    Provides safe, read-only access to a PostgreSQL database, allowing agents to run SELECT/WITH queries, list schemas and tables, and describe table columns without exposing database credentials.

    A
    license
    A
    quality
    C
    maintenance
    Enables local coding agents to safely inspect and query PostgreSQL databases — listing schemas, tables, and columns and running capped SELECT statements across multiple configured environments — while the server itself holds the database credential so the LLM never sees it.
    5
    MIT
  • Why this server?

    Uses PostgreSQL as the storage backend for synced WHOOP data, creating a documented schema and allowing MCP query tools to read recovery, sleep, workout, cycle, and baseline data directly from the database.

    A
    license
    A
    quality
    C
    maintenance
    Enables AI agents to sync WHOOP recovery, sleep, workouts, cycles, and body-measurement data into a local Postgres database and query it through fast, offline-capable MCP tools without repeatedly hitting WHOOP API rate limits.
    10
    MIT
  • Why this server?

    Provides tools to describe the schema and execute read-only SELECT queries against a PostgreSQL database, with deterministic guardrails, limits, timeouts, and audit logging.

    A
    license
    A
    quality
    C
    maintenance
    Enables Claude Desktop and Claude Code to inspect a Postgres schema and run read-only SQL queries against a demo database through the tools describe_schema and query_readonly. Every proposed query passes the same deterministic guardrails — SELECT-only, allow-listed tables, enforced row limits, statement timeouts and a read-only role — before execution.
    2
    MIT
  • Why this server?

    Provides read-only tools for exploring a PostgreSQL database schema (schemas, tables, views, columns, indexes, functions) and running guarded SELECT queries with row limits and safety validation.

    A
    license
    A
    quality
    C
    maintenance
    Enables read-only exploration of PostgreSQL databases, allowing schema inspection and safe SELECT queries without data mutation.
    8
    Apache 2.0
  • Why this server?

    Provides read-only access to a PostgreSQL database, enabling relational queries, schema inspection, execution plan analysis, vector similarity search, and graph traversal via Apache AGE.

    A
    license
    A
    quality
    C
    maintenance
    Provides Claude Code read-only access to PostgreSQL for relational queries, schema inspection, EXPLAIN plans, pgvector similarity searches, and Apache AGE graph traversals.
    6
    Apache 2.0
  • Why this server?

    Provides tools for analyzing PostgreSQL query execution plans by running EXPLAIN (ANALYZE, BUFFERS, FORMAT JSON) on SELECT/WITH queries, returning structured reports on performance bottlenecks such as sequential scans, planner estimate mismatches, disk spills, and excessive nested loop iterations. Also lists user tables and their columns, with read-only database access.

    A
    license
    A
    quality
    B
    maintenance
    Enables LLM assistants to analyze PostgreSQL query execution plans with EXPLAIN and receive structured reports highlighting performance bottlenecks, all through read-only database access.
    3
    MIT
  • Why this server?

    Provides read-only tools for querying an e-commerce PostgreSQL database, including semantic product search, customer orders, sales summaries, top products, and low-stock alerts.

    A
    license
    A
    quality
    B
    maintenance
    Enables safe, read-only analysis of e-commerce data, including semantic product search, sales summaries, top products, customer orders, and low-stock alerts, through MCP tools and a LangGraph agent.
    5
    MIT
  • Why this server?

    Provides safe, read-only access to a PostgreSQL database, enabling AI agents to explore schemas, describe tables, and run SELECT queries with automatic safeguards like row limits and timeouts.

    A
    license
    A
    quality
    B
    maintenance
    Enables AI clients to safely query PostgreSQL databases using plain English, with read-only access and built-in SQL safety checks.
    4
    MIT
  • Why this server?

    Provides read-only access to a PostgreSQL database through a fixed catalog of parameterized queries. An LLM agent can query an IT asset inventory to list sites, search devices, find people, inspect installed software, identify stale devices, and view open tickets, without writing SQL or accessing restricted tables and columns.

    A
    license
    A
    quality
    B
    maintenance
    Enables LLM agents to read PostgreSQL data through a fixed catalog of parameterized, read-only queries, without allowing free-form SQL or access outside bounded inputs.
    7
    MIT
  • Why this server?

    Provides bounded, read-oriented PostgreSQL investigation tools for coding agents, enabling safe runtime database inspection, row neighborhood exploration via foreign keys, batched schema/statistics description, table listing, targeted querying, and redaction/audit safeguards.

    A
    license
    A
    quality
    B
    maintenance
    Enables coding agents to safely investigate PostgreSQL runtime state through bounded, read-oriented MCP tools for row-and-foreign-key neighborhood inspection, schema and statistics lookup, and table listing, with truncation, redaction, timeouts, and audit logging.
    4
    9 npm
    MIT
  • Why this server?

    Connects to a PostgreSQL 17 database as a read-only role to answer natural-language questions about auto parts inventory, including compatible parts, branch stock levels, parts below minimum stock, movement summaries, and safe SQL queries.

    A
    license
    A
    quality
    C
    maintenance
    Enables answering natural-language questions in Spanish about a PostgreSQL auto parts inventory — which parts fit a vehicle, prices, stock per branch and sales movements — through four read-only tools exposed over stdio to an MCP client such as Claude Code. Writes are prevented by multiple independent security layers, including a read-only database role.
    4
    MIT
  • Why this server?

    Provides governed, audited access to PostgreSQL databases for AI agents, with a read-only query tool and guarded write tools for executing DML/DDL statements and transactions, creating table snapshots, enforcing row limits, checking sequence integrity, and optionally writing audit logs.

    A
    license
    A
    quality
    C
    maintenance
    Enables AI agents to investigate a legacy ERP's PostgreSQL database through read-only queries, apply writes and multi-statement atomic transactions behind static and in-transaction guardrails, and snapshot tables before destructive changes. Row limits, sequence-integrity checks, and optional JSON audit logging keep every call bounded, reversible, and traceable.
    4
    MIT
  • Why this server?

    Provides read-only access to a fleet of PostgreSQL databases for LLM agents, enabling schema exploration, guarded SQL queries, execution plans, and database health checks without exposing credentials.

    A
    license
    A
    quality
    B
    maintenance
    Enables LLM agents to explore schemas, run guarded read-only queries, inspect execution plans and check database health across a fleet of PostgreSQL databases, selecting a connection by id while credentials stay on the server. Supports multiple databases in one session, exposing schema search, table descriptions, health checks and cross-database relationship lookups over stdio MCP.
    12
    MIT
  • Why this server?

    Provides offline diagnostics for PostgreSQL: analyzes SQL queries for anti-patterns, checks migration DDL for destructive or locking risks, suggests conservative index candidates, and reviews supplied EXPLAIN JSON plans without database credentials or executing statements.

  • Why this server?

    Provides access to official, versioned PostgreSQL documentation, enabling listing available documentation versions, searching within a specific version, and reading documentation pages as Markdown with pagination.