SERVER

PostgreSQL Database Management Server

Rank #11,103

smithery/zero-8848/postgresql-mcp-server

Provide AI assistants with comprehensive PostgreSQL database management capabilities including schema management, user permissions, query performance analysis, and real-time monitoring. Execute complex SQL queries and mutations securely with transaction support and prevent SQL injection. Manage database comments and perform cross-database data transfers to enhance AI-driven database operations.

Versions unknown
201 GitHub stars
by henkdz (4 servers)View repository ↗
First listed
Mar 18, 2025
Last publish date
—
PURPOSE

What you can do with PostgreSQL Database Management Server

A PostgreSQL management server (@henkey/postgres-mcp-server) that consolidates 46 operations into 18 tools for schema, users, performance, indexes, functions, triggers, RLS, data import/export and SQL, with a tiered readonly/write/admin/unsafe security model.

Suitable tasks
  • Inspect schemas, analyze a database and debug locks
  • Run structured queries and mutations with row limits
  • Explain queries, find slow statements, tune indexes
  • Manage functions, triggers, constraints and row-level security
  • Export and import JSON/CSV, copy data across databases
  • Monitor metrics in real time
CAPABILITIES AND LIMITATIONS

What PostgreSQL Database Management Server can and cannot do

Capabilities

Eighteen tools: 8 consolidated meta-tools (schema, users/permissions, query performance, indexes, functions, triggers, constraints, RLS), 6 specialized tools (analysis, debugging, export, import, cross-database copy, monitoring) and 4 data tools (query, mutations, arbitrary SQL, comments), each driven by an operation field. Starts in readonly mode; write, admin and unsafe modes unlock mutations, DDL and arbitrary SQL.

Documented tools (4 of 18)
  • pg_analyze_database
  • pg_manage_schema
  • pg_execute_query
  • pg_execute_sql
Limitations
  • Version 2.0.0 breaks 1.x behaviour (readonly default, stricter input rules); 1.0.7 is the non-breaking patch line
  • Per-tool connection strings are off by default and documented as development-only
  • Legacy string where clauses are rejected; rawWhere needs unsafe mode plus --allow-destructive
  • Multi-statement SQL requires transactional: true, expectRows: false and no bind parameters
  • POSTGRES_MCP_DEBUG_SQL=true may log raw SQL and bind values; use only on trusted local databases
REQUIREMENTS

What you need before using PostgreSQL Database Management Server

DeclaredAPI keyCredentials declared

The registry listing declares required configuration before first use — typically an API key, token or connection string set via environment variables.

Declared by Glama, last synced Oct 23, 2026. Not independently verified by MCP Toplist.

Runtime
Node.js >= 18 (npx @henkey/postgres-mcp-server) or Docker image henkey/postgres-mcp
Credentials
POSTGRES_CONNECTION_STRING env var or --connection-string
Permissions
Least-privilege Postgres roles recommended; templates in docs/POSTGRES_ROLES.md
Also needed
--security-mode readonly|write|admin|unsafe and --allow-destructive gate what tools can do
INSTALLATION AND FIRST TASK

Connect PostgreSQL Database Management Server and confirm it works

  1. Install Node.js 18+ and run npx @henkey/postgres-mcp-server --help to verify
  2. Set POSTGRES_CONNECTION_STRING (or pass --connection-string) in your MCP client config
  3. Keep the default readonly mode, or add --security-mode write/admin/unsafe (and --allow-destructive) as needed
  4. Optionally restrict targets with --allowed-connection-target host[:port][/database]

Install configuration unavailable. No registry publishes a machine-readable install config for this server — follow the repository README.

First successful task

Ask the agent to "analyze this database" so it calls pg_analyze_database.

Expected: A database analysis report returned in readonly mode without any mutation tools being invoked.

ALTERNATIVES

When to choose another server

  • Postgres MCP#764

    You mainly want index tuning with hypothetical indexes and health checks.

  • MCP PostgreSQL Server#48,840

    You want a far smaller tool surface with the same read-only default.

  • MCP-PostgreSQL-Ops#2,422

    You need monitoring statistics only and never want SQL execution.

Compared side by side in PostgreSQL MCP servers.

Other servers by henkdz
View all henkdz servers →
MAINTENANCE AND EVIDENCE

What changed, and when this was checked

First listed
Mar 18, 2025
Version history
Unavailable — no registry exposes versions and no release tags were found
Requirements evidence
Declared by Glama, last synced Oct 23, 2026. Not independently verified by MCP Toplist.
Profile checked
Oct 9, 2026 against README
Ranking data as of
Oct 23, 2026
Registry sightings

Do you maintain PostgreSQL Database Management Server? to correct or enrich this profile.

VERSIONS

Version information unavailable

The registries that list this server do 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.

STANDING
#11,103of 151,203 active serversTop 10%

Ranks ahead of 140,100 of 151,203 servers on MCP Toplist.

Recent momentum
+21GitHub stars since Apr 27 (+12%)
BADGE

Show your rank

Maintain this server? Add the live rank badge to your README — it updates automatically as the leaderboard changes.

MCP Toplist: Top 10% of 151,203
Markdown
[![MCP Toplist](https://mcptoplist.com/badge/smithery%2Fzero-8848%2Fpostgresql-mcp-server.svg)](https://mcptoplist.com/server/smithery%2Fzero-8848%2Fpostgresql-mcp-server)
HTML
<a href="https://mcptoplist.com/server/smithery%2Fzero-8848%2Fpostgresql-mcp-server"><img src="https://mcptoplist.com/badge/smithery%2Fzero-8848%2Fpostgresql-mcp-server.svg" alt="MCP Toplist: Top 10% of 151,203" /></a>

Variants: append ?metric=score or ?metric=stars to the image URL.

FAQ

Frequently asked questions

Who maintains PostgreSQL Database Management Server?
PostgreSQL Database Management Server is maintained by henkdz, which publishes 4 MCP servers tracked on MCP Toplist.
Is PostgreSQL Database Management Server listed on the Official MCP Registry?
PostgreSQL Database Management Server is not on the Official MCP Registry. It is listed on Smithery, PulseMCP and Glama.
How many versions does PostgreSQL Database Management Server have?
Version information is unavailable for PostgreSQL Database Management 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 PostgreSQL Database Management Server?
The source code for PostgreSQL Database Management Server is hosted at github.com/henkdz/postgresql-mcp-server.
Used in projects

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.

EXPLORE