Live survey315 models · 14 providers · 23,592 auditsAudited implement · SAFE →What changedHow we verifyllms.txt

MCP server · Audited from source

PostgreSQL MCP Server

by henkdz/postgresql-mcp-serverAGPL-3.0 licenceAudited 12 Oct 2026 · source 820487637aa9

npm @henkey/postgres-mcp-server 2.0.0stdio★ 201
!CAUTIONGrade D · 67/100 · 12 Oct 2026 · 8204876
201GitHub stars

Is it safe? With care — CAUTION, grade D (67/100). It exposes 57 tools: 22 read, 18 write and 17 destructive. The audit recorded 12 findings (0 critical, 0 high, 11 medium, 1 low). Maintainer's description: A Powerful PostgreSQL MCP server with 14 consolidated database management tools for AI assistants.

Ask an AI about this pageGChatGPTCClaudePPerplexityGeGeminiXGrok
More
Cite

Cite this page

ModelsAtlas. “PostgreSQL MCP Server (HenkDz/postgresql-mcp-server)”. Retrieved 12 Oct 2026. https://modelsatlas.com/mcp/henkdz/postgresql-mcp-server

Trust audit

Audit 0.4.1 · full source read 12 Oct 2026

Trust score67/100!CAUTION D
0 critical0 high11 medium1 low0 info

12 findings, listed below with the file and line each was found on. Grade A needs a sandboxed behavioural run too; this audit read the source only.

What the source does

  • FilesystemDeclared4 observations
  • NetworkNone observedNothing seen in the source
  • ShellDeclared5 observations
  • DependenciesNot pinnedSome ranges float
  • SecretsFoundSee the findings

“Declared” means the server says it does this and the source agrees. Browser, file and shell access are expected of some kinds of server.

Five audit layers

LayerWhat we checkResult
L0 ProvenanceRepo owner, licence, archive status, activityPASS
L1 Static sourceSecrets, path traversal, supply chainWARN 11 findings
L2 InstructionsPrompt injection and authority framing in docs and tool descriptionsPASS
L3 InventoryDeclared tools match the sourceWARN 1 finding
L4 SandboxRun in isolation and watch behaviourSKIPPED

Provenance & runtime

Who published it, and what the audit could and could not run

Provenance

  • Repository owner henkdzUser accountAccount type recorded when we read the repository.
  • PackagePublished on npm@henkey/postgres-mcp-server at version 2.0.0
  • LicenceAGPL-3.0From the repository, as read at the audited commit.
  • Last push4 months agoActivity of the repository when we read it.
  • Source commit read820487637aa9The audit covers exactly this commit, read on 12 Oct 2026.

Runtime

  • Sandbox runNot run yetThis audit read the source only; it did not execute the server.
  • Tool inventory57 declaredRead from the source and classed read, write or destructive.

Every value here is read from the record's own repository and audit.Suggest a correction

Findings (12)

Sorted by severity

MEDIUMHard-coded secretssecret.db_uri · .github/workflows/ci.yml:74
F-03 Hard-coded secretsCWE-798 · CWE-321Layer L1

Excerpt withheld: it is a secret, and we never print one.

Why
No further detail recorded for this rule.
Fix
—
MEDIUMHard-coded secretssecret.db_uri · .github/workflows/publish.yml:49
F-03 Hard-coded secretsCWE-798 · CWE-321Layer L1

Excerpt withheld: it is a secret, and we never print one.

Why
No further detail recorded for this rule.
Fix
—
MEDIUMHard-coded secretssecret.db_uri · README.md:142
F-03 Hard-coded secretsCWE-798 · CWE-321Layer L1

Excerpt withheld: it is a secret, and we never print one.

Why
No further detail recorded for this rule.
Fix
—
MEDIUMHard-coded secretssecret.db_uri · README.md:145
F-03 Hard-coded secretsCWE-798 · CWE-321Layer L1

Excerpt withheld: it is a secret, and we never print one.

Why
No further detail recorded for this rule.
Fix
—
MEDIUMHard-coded secretssecret.db_uri · README.md:148
F-03 Hard-coded secretsCWE-798 · CWE-321Layer L1

Excerpt withheld: it is a secret, and we never print one.

Why
No further detail recorded for this rule.
Fix
—
MEDIUMHard-coded secretssecret.generic · docs/POSTGRES_ROLES.md:37
F-03 Hard-coded secretsCWE-798 · CWE-321Layer L1

Excerpt withheld: it is a secret, and we never print one.

Why
No further detail recorded for this rule.
Fix
—
MEDIUMHard-coded secretssecret.generic · docs/POSTGRES_ROLES.md:94
F-03 Hard-coded secretsCWE-798 · CWE-321Layer L1

Excerpt withheld: it is a secret, and we never print one.

Why
No further detail recorded for this rule.
Fix
—
MEDIUMHard-coded secretssecret.generic · src/tools/migration.test.ts:189
F-03 Hard-coded secretsCWE-798 · CWE-321Layer L1

Excerpt withheld: it is a secret, and we never print one.

Why
No further detail recorded for this rule.
Fix
—
MEDIUMHard-coded secretssecret.generic · src/tools/migration.test.ts:225
F-03 Hard-coded secretsCWE-798 · CWE-321Layer L1

Excerpt withheld: it is a secret, and we never print one.

Why
No further detail recorded for this rule.
Fix
—
MEDIUMHard-coded secretssecret.generic · src/tools/migration.test.ts:235
F-03 Hard-coded secretsCWE-798 · CWE-321Layer L1

Excerpt withheld: it is a secret, and we never print one.

Why
No further detail recorded for this rule.
Fix
—
MEDIUMFilesystem / pathmcp.destructive_tools
F-05 Filesystem / pathCWE-22 · CWE-59Layer L3
pg_alter_table, pg_drop_constraint, pg_drop_foreign_key, pg_drop_function, pg_drop_index, pg_drop_rls_policy, pg_drop_trigger, pg_drop_user, pg_execute_mutation, pg_manage_comments, pg_manage_constrai
Why
17 tool(s) can delete or overwrite
Fix
prefer a read-only mode or scoped tokens; the page states the blast radius
LOWSupply chainsupply.unpinned · package.json
F-08 Supply chainCWE-829 · CWE-1357Layer L1
@modelcontextprotocol/sdk, commander, pg, pg-monitor, pg-query-stream, zod, zod-to-json-schema, @types/node
Why
12 dependency range(s) float
Fix
pin exact versions or ship a lockfile

Tools it exposes

57 declared in source · 17 destructive

22 read18 write17 destructive

17 tools can delete or overwrite. An agent that can be talked into calling a tool can be talked into calling this one, so give it a token scoped to what you need.

ToolRiskWhat it does
pg_alter_tabledestructiveAlter an existing table (add/modify/drop columns)
pg_drop_constraintdestructiveDrop a constraint
pg_drop_foreign_keydestructiveDrop a foreign key constraint
pg_drop_functiondestructiveDrop a PostgreSQL function
pg_drop_indexdestructiveDrop an existing index
pg_drop_rls_policydestructiveDrop a Row-Level Security policy
pg_drop_triggerdestructiveDrop a PostgreSQL trigger
pg_drop_userdestructiveDrop a PostgreSQL user/role
pg_execute_mutationdestructiveExecute data modification operations (INSERT/UPDATE/DELETE/UPSERT) - operation=
pg_manage_commentsdestructiveManage PostgreSQL object comments - get, set, remove comments on tables, columns, functions, and other database objects. Examples: operation=
pg_manage_constraintsdestructiveManage PostgreSQL constraints - get, create foreign keys, drop foreign keys, create constraints, drop constraints. Examples: operation=
pg_manage_functionsdestructiveManage PostgreSQL functions - get, create, or drop functions with a single tool. Examples: operation=
pg_manage_indexesdestructiveManage PostgreSQL indexes - get, create, drop, reindex, and analyze usage with a single tool. Examples: operation=
pg_manage_triggersdestructiveManage PostgreSQL triggers - get, create, drop, and enable/disable triggers. Examples: operation=
pg_manage_usersdestructiveManage PostgreSQL users and permissions - create, drop, alter users, grant/revoke permissions. Examples: operation=
pg_reset_query_statsdestructiveReset pg_stat_statements statistics (all or specific query)
pg_revoke_permissionsdestructiveRevoke permissions from a user/role
pg_create_constraintwriteCreate a constraint (unique, check, or primary key)
pg_create_enumwriteCreate a new ENUM type in the database
pg_create_foreign_keywriteCreate a foreign key constraint
pg_create_functionwriteCreate or replace a PostgreSQL function
pg_create_indexwriteCreate a new index on a table
pg_create_rls_policywriteCreate a Row-Level Security policy
pg_create_tablewriteCreate a new table in the database
pg_create_triggerwriteCreate a PostgreSQL trigger
pg_create_userwriteCreate a new PostgreSQL user/role
pg_disable_rlswriteDisable Row-Level Security on a table
pg_edit_rls_policywriteEdit an existing Row-Level Security policy
pg_enable_rlswriteEnable Row-Level Security on a table
pg_execute_querywriteExecute SELECT queries and data retrieval operations - operation=
pg_execute_sqlwriteExecute arbitrary SQL statements - sql=
pg_import_table_datawriteImport data from JSON or CSV file into a table
pg_manage_rlswriteManage PostgreSQL Row-Level Security - enable/disable RLS and manage policies. Examples: operation=
pg_manage_schemawriteManage PostgreSQL schema - get schema info, create/alter tables, manage enums. Examples: operation=
pg_set_trigger_statewriteEnable or disable a PostgreSQL trigger
pg_alter_userreadAlter an existing PostgreSQL user/role
pg_analyze_databasereadAnalyze PostgreSQL database configuration and performance
pg_analyze_index_usagereadFind unused, duplicate, and low-usage indexes to optimize database performance
pg_copy_between_databasesreadCopy data between two databases
pg_debug_databasereadDebug common PostgreSQL issues
pg_explain_queryreadEXPLAIN/EXPLAIN ANALYZE for queries to understand execution plans
pg_export_table_datareadExport table data to JSON or CSV format
pg_get_constraintsreadList all constraints (primary keys, foreign keys, unique, check)
pg_get_enumsreadGet information about PostgreSQL ENUM types
pg_get_functionsreadGet information about PostgreSQL functions
pg_get_indexesreadList indexes with size and usage statistics
pg_get_query_statsreadQuery statistics from pg_stat_statements with cache hit ratios
pg_get_rls_policiesreadGet Row-Level Security policies
pg_get_schema_inforeadGet schema information for a database or specific table
pg_get_slow_queriesreadFind slow running queries using pg_stat_statements
pg_get_triggersreadGet information about PostgreSQL triggers
pg_get_user_permissionsreadGet permissions for a user/role or all users
pg_grant_permissionsreadGrant permissions to a user/role
pg_list_usersreadList all users/roles in the database
pg_manage_queryreadManage PostgreSQL query analysis and performance - operation=
pg_monitor_databasereadGet real-time monitoring information for a PostgreSQL database
pg_reindexreadRebuild indexes to improve performance and reclaim space

Install

Package version 2.0.0 · audited commit 8204876

Read the findings first. The most severe is Hard-coded secrets (medium) at .github/workflows/ci.yml.

One-click links open your editor with the config below filled in, exactly as the snippets show it, pinned to version 2.0.0. The audit covers commit 8204876 only.

claude mcp add postgres-mcp-server -- npx -y @henkey/[email protected]

The command pins the package version recorded in the source (2.0.0); the audit covers commit 820487637aa9. Transport: stdio. No environment variables required.

Audit history

  1. !CAUTION D 67 / 100

    First audit · 820487637aa9

README badge

For maintainers · updates on every re-audit

ModelsAtlas: CAUTION DMODELSATLASCAUTION · D
[![ModelsAtlas: CAUTION D](https://modelsatlas.com/mcp/henkdz/postgresql-mcp-server/badge.svg)](https://modelsatlas.com/mcp/henkdz/postgresql-mcp-server/)

The badge always shows the latest audit; a maintainer cannot pin an old verdict.

Other ratings

Cited, never blended into our score

No third-party security ratings are recorded for this server yet. When they exist they appear here with their source and date, beside, not inside, our grade.

Questions about PostgreSQL MCP Server

What is the PostgreSQL MCP Server MCP server?
A Powerful PostgreSQL MCP server with 14 consolidated database management tools for AI assistants.
What tools does PostgreSQL MCP Server expose?
57 in total: 22 read-only, 18 that write, and 17 that can delete or overwrite (pg_alter_table, pg_drop_constraint, pg_drop_foreign_key, pg_drop_function, pg_drop_index). Every one is listed on this page with its risk.
Is PostgreSQL MCP Server safe to connect to an agent?
With care. The audit graded it D (67/100) and found 12 things worth knowing before you trust this server, listed below with the exact line each was found on. Separately from the audit: 17 of its tools can destroy data, so scope the token you give it to what you actually need.
What credentials does PostgreSQL MCP Server need?
No credential environment variables were found in its source, so it appears to need none.
How does PostgreSQL MCP Server run?
It speaks stdio, so it runs as a local process your client starts. It is published on npm as @henkey/postgres-mcp-server at 2.0.0.
How current is this page?
The grade is for one exact copy of the source (820487637aa9), read on 2026-10-12. The repository is watched and re-audited when it changes.

Sources

  • HenkDz/postgresql-mcp-server on GitHub — the source we read, its licence, stars and activityObserved · 12 Oct 2026
  • ModelsAtlas trust audit — CAUTION verdict for commit 820487637aa9Observed · 12 Oct 2026

Spotted something wrong? Report a correction · Methodology

Keep going in your AI

Opens with this page as the source. We add nothing else to the prompt.