PostgreSQL
MCP server for PostgreSQL: local, Docker, RDS, Neon, Supabase, or behind an SSH bastion.
Open the source (opens github.com) https://github.com/antonorlov/mcp-postgres-server
Before you use it
- Runs on your computer with your permissions. Read what it can do before connecting it to an agent.
- Needs credentials: DATABASE_URL, PG_PASSWORD, PG_SSH_PASSPHRASE, PG_SSH_PASSWORD. Use a key with the least access you can.
What it is
MCP servers from io.github.antonorlov.
The problem it solves and who it suits haven't been reviewed by InnerVault. The description above is the source's own.
How to get it
npm package (stdio)
mcp-postgres-server@0.3.1
From the server's entry in the official MCP Registry
Settings it asks for
DATABASE_URLsecret · Full connection string (preferred). Supports sslmode in the URL.PG_HOST· Database host (fallback when DATABASE_URL is not set).PG_PORT· Database port.PG_USER· Database user.PG_PASSWORDsecret · Database password.PG_DATABASE· Database name.PG_ALLOW_WRITE· When true, execute performs writes and reads are sent directly. Off (default) is read-only: execute refuses writes and each read runs in a READ ONLY…PG_SSLMODE· TLS mode. require/allow/prefer encrypt without verifying the certificate; verify-ca/verify-full verify it (supply a CA via PG_SSL_CA). Unlike libpq…PG_SSL_CA· Path to a CA certificate file. Setting it by itself implies verify-full.PG_ENABLE_RUNTIME_CONNECT· Register the connect_db tool (runtime credential switching).PG_MAX_RESULT_BYTES· Byte budget for a query result sent to the model. Whole rows are kept while they fit; over the budget returnedRows < rowCount and truncated is true.PG_STATEMENT_TIMEOUT· Statement timeout in milliseconds, applied to every session.
Related
-
MCP-PostgreSQL-Ops
MCP servers🐘 Give AI assistants full PostgreSQL DBA superpowers — 30+ tools for performance analysis, bloat detection, lock/deadlock monitoring, autovacuum & schema inspection. No extensions required. PG 12-18.
git clone https://github.com/call518/MCP-PostgreSQL-Ops.git -
phpMyFAQ
MCP serversphpMyFAQ - Open Source FAQ web application for PHP 8.4+ and MySQL, PostgreSQL and other databases
git clone https://github.com/thorsten/phpMyFAQ.git -
prest
MCP serversInstant REST and MCP APIs for PostgreSQL and MySQL, on existing or new databases. CRUD, custom SQL routes, auth and ACL without writing a backend. Low-code, ⚡ realtime, high-performance. Native MySQL support since v2.5
git clone https://github.com/prest/prest.git -
airbroke
MCP servers🔥 Lightweight, Airbrake/Sentry-compatible, PostgreSQL-based Open Source Error Catcher
git clone https://github.com/icoretech/airbroke.git -
dbhub
MCP serversToken conscious database MCP server for Postgres, MySQL, SQL Server, Oracle, MariaDB, SQLite.
git clone https://github.com/bytebase/dbhub.git -
PerformanceMonitor
MCP serversFree, open-source SQL Server and Postgres performance monitoring. Collectors, real-time alerts, graphical plan viewer, MCP server for AI analysis. Supports SQL 2016-2025, Azure SQL, AWS RDS, Postgres, Aurora Postgres.
git clone https://github.com/erikdarlingdata/PerformanceMonitor.git