Best MCP Servers for PostgreSQL (2026)

The best MCP servers for PostgreSQL — let AI agents run queries, inspect schemas, and read or write records in your Postgres database from Claude, Cursor, and other MCP clients.

Browse all PostgreSQL servers →
  1. 1
    A
    Anyqueryjulien040
    Most popular in this category on AllMCPs
    Query more than 40 apps with one binary using SQL. It can also connect to your PostgreSQL, MySQL, or SQLite compatible database. Local-first and private by design.
    0 0 0
  2. 2
    Mcp Server Neonneondatabase
    Community pick
    An MCP Server for creating and managing Postgres databases using Neon Serverless Postgres
    1 0 0
  3. 3
    G
    Gatewaycentralmind
    Community pick
    MCP and MCP SSE Server that automatically generate API based on database schema and data. Supports PostgreSQL, Clickhouse, MySQL, Snowflake, BigQuery, Supabase
    2 0 0
  4. 4
    Pgmcpsubnetmarco
    Community pick
    Natural language PostgreSQL queries with automatic streaming, read-only safety, and universal database compatibility.
    0 0 0
  5. 5
    Mcp Alchemyrunekaagaard
    Community pick
    Universal SQLAlchemy-based database integration supporting PostgreSQL, MySQL, MariaDB, SQLite, Oracle, MS SQL Server and many more databases. Features schema and relationship inspection, and large dataset analysis capabilities.
    3 0 0
  6. 6
    Db Mcp ServerFreePeak
    Community pick
    A high-performance multi-database MCP server built with Golang, supporting MySQL & PostgreSQL (NoSQL coming soon). Includes built-in tools for query execution, transaction management, schema exploration, query building, and performance analysis, with seamless Cursor integration for enhanced database workflows.
    1 0 0
  7. 7
    AnythingmcpHelpCode-ai
    Community pick
    Self-hosted source-available MCP gateway and API-to-MCP bridge. Converts REST, SOAP/WSDL, GraphQL, and SQL/NoSQL databases (PostgreSQL, MySQL, MariaDB, MSSQL, Oracle, MongoDB, SQLite) into MCP tools — no SDK, no code. Imports OpenAPI / Postman / WSDL / GraphQL specs; bridges multiple MCP servers behind one endpoint. Ships with 29 pre-built adapters (DHL, DATEV, Weclapp, Personio, Handelsregister, Shopware 6, VIES, OpenPLZ, Bundesbank, etc.). OAuth2 (PKCE + Client Credentials), Bearer, API Key, WS-Security, TLS certs. AES-256-GCM credential encryption, full audit log, per-user MCP API keys, tool-level RBAC.
    2 0 0
  8. 8
    L
    Legion McpTheRaLabs
    Community pick
    Universal database MCP server supporting multiple database types including PostgreSQL, Redshift, CockroachDB, MySQL, RDS MySQL, Microsoft SQL Server, BigQuery, Oracle DB, and SQLite.
    0 0 0
  9. 9
    R
    Robrainadelinamart
    Community pick
    Self-hosted decision memory for AI coding agents. Passively captures architectural decisions with the alternatives you rejected (structured rejected[]), then warns the agent before it re-proposes a rejected approach. Postgres + pgvector; cross-tool across Claude Code, Cursor, Copilot, and Codex. Install: npx robrain up && npx robrain install.
    2 0 0
  10. 10
    S
    SmartDB MCPwenb1n-dev
    Community pick
    A universal database MCP server supporting simultaneous connections to multiple databases. It provides tools for database operations, health analysis, SQL optimization, and more. Compatible with mainstream databases including MySQL, PostgreSQL, SQL Server, MariaDB, Dameng, and Oracle. Supports Streamable HTTP, SSE, and STDIO; integrates OAuth 2.0; and is designed for easy customization and extension by developers.
    0 0 0

Which PostgreSQL MCP server should you use?

When choosing a Model Context Protocol server for PostgreSQL, select verified or official listings if you need strict API security guarantees. For rapid local dev testing with Claude or Cursor, community-maintained tools offer zero-setup configuration blocks ready to copy-paste.

Frequently asked questions about PostgreSQL MCP servers

What is the best Postgres MCP server?

The official modelcontextprotocol/server-postgres and crystaldba/postgres-mcp are the most widely installed. This page ranks Postgres MCP servers by real usage across the AllMCPs directory so you can start with a proven one.

Can a Postgres MCP server write to my database?

Some support writes, but most default to read-only for safety. Connect with a least-privilege role scoped to only the tables the agent needs, and enable write mode explicitly if the server offers it.

How do I connect Claude to Postgres?

Install a Postgres MCP server in your client config, pass your connection string via an environment variable, and restart the client. Each listing links to its exact setup steps.

More best-of guides

Best for DatabasesBest for DevelopersBest for Web Search & ScrapingBest for SecurityBest for Browser AutomationBest for Slack & CommunicationBest for Memory & KnowledgeBest for Finance & Fintech