Databases · MCP server
PostgreSQL: MCP server, setup and security
PostgreSQL is an open-source MCP server published on GitHub that lets an AI agent access PostgreSQL databases including those behind an SSH bastion. Its repository has 24 stars and its last commit is from September 16, 2026 and it is licensed under MIT.
What PostgreSQL does
According to its repository: “Access PostgreSQL databases, including those behind an SSH bastion.”
The Model Context Protocol (MCP) is a standard plug between an AI agent and an outside service: once the server is connected, its tools show up in the agent, which decides when to call them. PostgreSQL is listed under Databases, a category of 138 servers in the directory, where it ranks #104 by stars.
Topics declared by the repository: ai-agents, anthropic, claude, claude-code, cursor, database.
Installing and connecting PostgreSQL
Distribution modes declared in the official MCP registry:
- npm package (Node.js, usually started with
npx)
It works with any MCP-compatible client (Claude Desktop, Claude Code, Cursor, VS Code, Codex and most recent agents). You add one entry to the client's MCP configuration: server name, start command or URL, environment variables. Project language: TypeScript. Listed systems: macOS, Windows, Linux.
The registry lists 4 secret variables to provide (API key, access token). Keep them in the client's environment variables, never in a shared file or a repository.
Security: what to check
Connecting an MCP server means installing software that talks straight to your agent: it runs with your rights and the model trusts its tool descriptions. The risk therefore depends on what it can touch and how far its code can be trusted.
Points found for PostgreSQL:
- Secrets: the server acts with your credentials. Create a dedicated key with minimum rights and an expiry date.
Good practice: grant only the rights needed (least privilege), require human approval for irreversible actions, and run the AI agent security check.
Project activity and maintenance
Created on March 24, 2025, the antonorlov/mcp-postgres-server repository has 24 stars and 10 forks, with 0 open issues. It has more stars than 41% of the servers in the directory. Last change 1 month ago. Version published in the registry: 0.3.1 (September 14, 2026).
Stars measure attention, not quality: a recent, heavily promoted project can collect them fast, while a useful but niche server will have few.
Verdict
PostgreSQL is a reasonable choice; check the points below before connecting it.
Strengths
- Active project: recent commit
- Listed in the official MCP registry
- Permissive licence (MIT)
Limitations
- Requires an API key or token
Avoid if…
- You do not want to give credentials to an agent
Alternatives
- Nhost9.4K ★
- ArcadeDB MCP Server1.2K ★
- Jitsu5.1K ★
- Supabase3K ★
- Dbx27.7K ★
- MCP Toolbox for Databases16.7K ★
Learn more
Frequently asked questions
How do I install PostgreSQL?
PostgreSQL is distributed as npm package (Node.js, usually started with npx). Add it to your client's MCP configuration (Claude Desktop, Cursor, VS Code…) following the README of antonorlov/mcp-postgres-server.
Is PostgreSQL free?
The code is published under the MIT licence and can be used free of charge. It needs an API key: the service it connects to may be paid.
Is PostgreSQL safe?
Points to watch: secrets. Give it minimum rights and approve sensitive actions.
Is it an official server?
Nothing says so: it is a project published by antonorlov on GitHub. Check who maintains it before giving it access.
What are the alternatives to PostgreSQL?
In the same category: Nhost, ArcadeDB MCP Server, Jitsu, and Supabase. Nhost and ArcadeDB MCP Server score higher on our grid.
Related articles
- Build your own MCP server in 30 minutesOctober 24, 2026
- Automate your inbox with an AI agentOctober 18, 2026
- MCP, A2A, and tool calling: agent protocols explainedOctober 17, 2026
- Build an AI agent with n8n, without codingOctober 16, 2026
Neutrality. No affiliate links. No vendor pays to be reviewed, rated or ranked. Reviews are directed by François Chollet, neutral and factual, and every data point is dated and sourced. How we score