MCP PostgreSQL Server
Rank #46,916glama/antonorlov/mcp-postgres-server
Query PostgreSQL and inspect schemas over MCP. Connects to local, Docker, RDS, Neon, Supabase, or a database behind an SSH bastion.
What you can do with MCP PostgreSQL Server
A small Node.js MCP server (mcp-postgres-server) for querying PostgreSQL, read-only by default with writes opt-in via an environment flag, and with SSL, SSH tunnelling, timeouts and a result-size cap built in.
- Run read-only SELECT, WITH, EXPLAIN and SHOW statements
- List schemas and tables, describe a table's columns
- Run INSERT/UPDATE/DELETE or DDL when writes are enabled
- Reach local, Docker, RDS, Neon or Supabase databases
- Switch databases at runtime when explicitly enabled
What MCP PostgreSQL Server can and cannot do
Six tools: query (one read-only statement), execute (writes, refused unless PG_ALLOW_WRITE=true), list_schemas, list_tables, describe_table and connect_db (registered only with PG_ENABLE_RUNTIME_CONNECT=true). In the default mode each query runs inside BEGIN READ ONLY ... ROLLBACK.
- query
- execute
- list_schemas
- list_tables
- describe_table
- connect_db
- Read-only mode does not stop prompt injection carried in row data; the docs say not to point it at production
- With PG_ALLOW_WRITE=true the query tool loses its read-only wrapper, so a write sent through query would run
- One statement per call; multi-statement input is rejected
- sslmode allow/prefer encrypt without verifying the certificate and do not fall back to plaintext
- SSH host-key verification is mandatory: PG_SSH_FINGERPRINT must be set or the tunnel refuses to connect
What you need before using MCP PostgreSQL Server
The registry listing declares no required environment variables or authentication. This is declared metadata, not a verified install — the repository README is the authority.
Declared by Glama, last synced Oct 16, 2026. Not independently verified by MCP Toplist.
- Runtime
- Node.js 20+ via npx -y mcp-postgres-server
- Credentials
- DATABASE_URL, or PG_HOST, PG_PORT, PG_USER, PG_PASSWORD, PG_DATABASE
- Permissions
- A least-privilege database role (the server warns on stderr when connected as superuser)
- Also needed
- PG_SSLMODE / PG_SSL_CA for TLS; PG_SSH_* for tunnelling; PG_ALLOW_WRITE=true to enable writes
Connect MCP PostgreSQL Server and confirm it works
- Add a server entry running npx -y mcp-postgres-server with DATABASE_URL in env
- Create a least-privilege role for the agent and use it in the URL
- Leave PG_ALLOW_WRITE unset for read-only; set it to true only when writes are needed
- Optionally tune PG_STATEMENT_TIMEOUT (default 30000 ms) and PG_MAX_RESULT_BYTES (default 32768)
Install configuration unavailable. No registry publishes a machine-readable install config for this server — follow the repository README.
Ask the agent "what tables are in the public schema?" so it calls list_tables.
Expected: A list of tables in public; a follow-up write through query fails because of the READ ONLY transaction.
When to choose another server
- Postgres MCP#724
You want health checks and index tuning on top of restricted SQL.
- DBHub#63
You also connect to MySQL, SQL Server, Oracle or SQLite.
- PostgreSQL Database Management Server#10,284
You need tiered administration tools (roles, RLS, import/export), not just queries.
Compared side by side in PostgreSQL MCP servers.
What changed, and when this was checked
- First listed
- Mar 24, 2025
- Version history
- Unavailable — no registry exposes versions and no release tags were found
- Requirements evidence
- Declared by Glama, last synced Oct 16, 2026. Not independently verified by MCP Toplist.
- Profile checked
- Oct 9, 2026 against README
- Ranking data as of
- Oct 16, 2026
- Glama ↗listed since Apr 26, 2026 · still listed
Do you maintain MCP PostgreSQL Server? to correct or enrich this profile.
Version information unavailable
The registry that lists this server does not expose version metadata, and no release tags were found on the linked repository. MCP Toplist cannot say how, or whether, this server is versioned.
Ranks ahead of 97,480 of 144,396 servers on MCP Toplist.
Show your rank
Maintain this server? Add the live rank badge to your README — it updates automatically as the leaderboard changes.
[](https://mcptoplist.com/server/glama%2Fantonorlov%2Fmcp-postgres-server)<a href="https://mcptoplist.com/server/glama%2Fantonorlov%2Fmcp-postgres-server"><img src="https://mcptoplist.com/badge/glama%2Fantonorlov%2Fmcp-postgres-server.svg" alt="MCP Toplist: Top 50% of 144,396" /></a>Variants: append ?metric=score or ?metric=stars to the image URL.
Frequently asked questions
- Who maintains MCP PostgreSQL Server?
- MCP PostgreSQL Server is maintained by antonorlov, which publishes 5 MCP servers (5 total versions) tracked on MCP Toplist.
- Is MCP PostgreSQL Server listed on the Official MCP Registry?
- MCP PostgreSQL Server is not on the Official MCP Registry. It is listed on Glama.
- How many versions does MCP PostgreSQL Server have?
- Version information is unavailable for MCP PostgreSQL Server: no registry that lists it exposes version metadata, and no release tags were found on its repository.
- Where can I find the source code for MCP PostgreSQL Server?
- The source code for MCP PostgreSQL Server is hosted at github.com/antonorlov/mcp-postgres-server.
Do you run this server?
Community projects list the MCP servers behind real agents and apps. Publish yours and this page will link to it.