Skip to main content
Glama

PostgreSQL MCP Servers

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

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

Open-source servers

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

Built for PostgreSQL (561)

  • 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
  • Why this server?

    Provides tools for querying and managing PostgreSQL databases, including CRUD operations, schema management, indexing, introspection, and performance analysis.

    A
    license
    Not graded
    quality
    D
    maintenance
    A standardized Model Context Protocol server for interacting with PostgreSQL databases, enabling full CRUD operations, schema management, and database introspection.
    1
    MIT
  • Why this server?

    Provides full read-write access to PostgreSQL databases, enabling querying, modifying, and managing database content with transaction management and recovery capabilities.

    A
    license
    Not graded
    quality
    D
    maintenance
    Provides full read-write access to PostgreSQL databases with advanced transaction management, recovery tools, and schema exploration capabilities, enabling LLMs to safely query, modify, and manage database content.
    1
    Apache 2.0
  • Why this server?

    Allows interaction with a PostgreSQL database via PostgREST, enabling schema discovery, CRUD operations, filtering, resource embedding, and RPC calls.

    A
    license
    Not graded
    quality
    D
    maintenance
    MCP server for PostgREST that turns PostgreSQL databases into RESTful APIs, providing 10 tools for schema discovery, CRUD operations, filtering, resource embedding, and RPC.
    10 npm
    1
    MIT
  • Why this server?

    Allows executing PostgreSQL queries for database testing, data preparation, and verification in end-to-end API testing workflows.

  • Why this server?

    Provides semantic search and retrieval of document snippets from a PostgreSQL database with pgvector extension.

    A
    license
    Not graded
    quality
    D
    maintenance
    Connects to a PostgreSQL database (pgvector) to perform semantic retrieval via the search_documents tool, returning raw document snippets for LLM synthesis.
    1
    GPL 3.0
  • Why this server?

    Provides database migration safety checking for PostgreSQL by analyzing SQL statements against safety rules, identifying dangerous patterns like adding NOT NULL columns without defaults or creating indexes without CONCURRENTLY, and suggesting safe alternatives.

  • Why this server?

    Provides tools for querying, listing tables, describing table structures, listing schemas, and listing configured environments for PostgreSQL databases. Supports multiple environments with write protection and schema scoping.

    A
    license
    Not graded
    quality
    D
    maintenance
    Enables AI assistants to interact with PostgreSQL databases, providing tools for querying, table listing, schema exploration, and multi-environment management with write protection and schema scoping.
    1
    MIT
  • Why this server?

    Provides persistent memory storage using PostgreSQL with pgvector for embeddings, enabling retrieval of customer context across sessions.

    A
    license
    Not graded
    quality
    B
    maintenance
    Enterprise support memory agent that remembers customer context across sessions, retrieves relevant memories, and forgets stale facts to reduce re-ask rates.
    1
    Apache 2.0
  • Why this server?

    Provides read-only access to a PostgreSQL database, enabling schema inspection, row lookup, and aggregate statistics through controlled tools.

    A
    license
    Not graded
    quality
    D
    maintenance
    Enables AI agents to query a PostgreSQL database through a small set of controlled, read-only tools for schema inspection, row lookup, and aggregate statistics.
    1
    MIT
  • Why this server?

    Provides tools for running read-only SQL queries and schema inspection on PostgreSQL databases.

    A
    license
    Not graded
    quality
    D
    maintenance
    Enables safe, read-only querying of PostgreSQL databases with defense-in-depth protections including single-statement SELECT guard, row caps, and per-identity audit logging.
    1
    MIT
  • Why this server?

    Allows inspecting and querying PostgreSQL databases with schema discovery, read-only query execution, query explanation, table previews, index analysis, and relationship inspection.

    A
    license
    Not graded
    quality
    D
    maintenance
    A Python MCP server that enables schema discovery, read-only SQL queries, table previews, and index/relationship analysis on PostgreSQL databases.
    1
    MIT
  • Why this server?

    Provides tools for managing personal notes persisted in a PostgreSQL database, including creating, listing, retrieving, searching, and deleting notes.

  • Why this server?

    Provides database health checks, index tuning, EXPLAIN plan analysis, schema intelligence, and safe SQL execution for PostgreSQL databases.

    A
    license
    Not graded
    quality
    C
    maintenance
    Enables AI agents to interact with PostgreSQL databases through MCP, offering index tuning, query plan analysis, schema intelligence, health checks, and safe SQL execution, with support for multiple databases.
    1
    MIT
  • Why this server?

    Provides PostgreSQL migration safety checking by analyzing DDL statements against estate snapshots to assess lock modes, hot-table risk, and policy violations before applying.

    A
    license
    Not graded
    quality
    B
    maintenance
    Enables checking Postgres migration SQL against a table-size estate snapshot and safety policy before apply, returning approve/block verdicts with lock details and remediation guidance, plus tools to explain locks and list policy rules.
    1
    MIT
  • Why this server?

    Uses a PostgreSQL database with the pgvector extension as the vector storage backend for the memory system, persisting saved memories and enabling semantic similarity search over stored embeddings.

  • Why this server?

    Provides a PostgreSQL MCP gateway for querying and controlled writing to configured PostgreSQL databases. Tools include db_read for SELECT/WITH/EXPLAIN queries, db_schema for schema metadata inspection, db_write_preview for non-executing write previews, and db_write for single INSERT/UPDATE/DELETE operations. Supports multiple PostgreSQL projects via server-side allowlist, enforces read-by-default access, separates read and write database roles, blocks DDL and other disallowed statements, and emits structured audit events.

    A
    license
    Not graded
    quality
    B
    maintenance
    Enables MCP clients to query and inspect multiple self-hosted PostgreSQL projects through a single gateway using read-only credentials by default, with writes permitted only via a separately privileged role and explicit client confirmation. It blocks DDL, privilege changes, and multi-statement writes, and records structured audit events for every operation.
    22 npm
    1
    MIT
  • Why this server?

    Provides tools for structured persona search, aggregation, group comparison, cluster summaries/details, and core persona summaries/details against a PostgreSQL database of Korean synthetic personas.

    A
    license
    Not graded
    quality
    C
    maintenance
    Enables ChatGPT and other MCP-capable clients to query, compare, cluster, and semantically search a million Korean synthetic personas using structured filters and statistical summaries.
    1
    Apache 2.0
  • Why this server?

    Provides read-only query execution and schema metadata retrieval against PostgreSQL databases, with security policies including table whitelisting, automatic LIMIT injection, and dynamic data masking.

    A
    license
    Not graded
    quality
    C
    maintenance
    Enables AI assistants and LLM agents to query operational databases through a read-only MCP gateway with table whitelisting, automatic row limits, sensitive-data masking, and audit logging.
    1
    MIT
  • Why this server?

    Provides read-only access to PostgreSQL databases, enabling AI agents to run single read-only SQL queries, list tables and views, and describe table schemas including columns, keys, referencing tables, and indexes.

    A
    license
    Not graded
    quality
    B
    maintenance
    Enables AI clients to safely inspect and query PostgreSQL databases in read-only mode through MCP, with single-statement SQL execution, table listing, table description, and schema resources.
    202 npm
    1
    MIT
  • Why this server?

    Provides a safety and undo layer for PostgreSQL databases used by AI agents: parses SQL, holds risky writes for human approval, logs all statements and decisions, and supports one-command undo of row changes made through the server.

    A
    license
    Not graded
    quality
    B
    maintenance
    A local MCP server that places a safety layer between AI coding agents and Postgres, parsing every statement, holding risky or large writes for human approval, and journaling all activity on your machine. It enables one-command undo of individual agent-made changes and blocks destructive operations outright.
    1
    MIT