MCP server · Audited from source
PostgreSQL MCP Server
by henkdz/postgresql-mcp-serverAGPL-3.0 licenceAudited 12 Oct 2026 · source 820487637aa9
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.
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
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
| Layer | What we check | Result |
|---|---|---|
L0 Provenance | Repo owner, licence, archive status, activity | PASS |
L1 Static source | Secrets, path traversal, supply chain | WARN 11 findings |
L2 Instructions | Prompt injection and authority framing in docs and tool descriptions | PASS |
L3 Inventory | Declared tools match the source | WARN 1 finding |
L4 Sandbox | Run in isolation and watch behaviour | SKIPPED |
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-serverat 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
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
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
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
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
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
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
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
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
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
Excerpt withheld: it is a secret, and we never print one.
- Why
- No further detail recorded for this rule.
- Fix
- —
MEDIUMFilesystem / pathmcp.destructive_tools
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
@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
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.
| Tool | Risk | What it does |
|---|---|---|
pg_alter_table | destructive | Alter an existing table (add/modify/drop columns) |
pg_drop_constraint | destructive | Drop a constraint |
pg_drop_foreign_key | destructive | Drop a foreign key constraint |
pg_drop_function | destructive | Drop a PostgreSQL function |
pg_drop_index | destructive | Drop an existing index |
pg_drop_rls_policy | destructive | Drop a Row-Level Security policy |
pg_drop_trigger | destructive | Drop a PostgreSQL trigger |
pg_drop_user | destructive | Drop a PostgreSQL user/role |
pg_execute_mutation | destructive | Execute data modification operations (INSERT/UPDATE/DELETE/UPSERT) - operation= |
pg_manage_comments | destructive | Manage PostgreSQL object comments - get, set, remove comments on tables, columns, functions, and other database objects. Examples: operation= |
pg_manage_constraints | destructive | Manage PostgreSQL constraints - get, create foreign keys, drop foreign keys, create constraints, drop constraints. Examples: operation= |
pg_manage_functions | destructive | Manage PostgreSQL functions - get, create, or drop functions with a single tool. Examples: operation= |
pg_manage_indexes | destructive | Manage PostgreSQL indexes - get, create, drop, reindex, and analyze usage with a single tool. Examples: operation= |
pg_manage_triggers | destructive | Manage PostgreSQL triggers - get, create, drop, and enable/disable triggers. Examples: operation= |
pg_manage_users | destructive | Manage PostgreSQL users and permissions - create, drop, alter users, grant/revoke permissions. Examples: operation= |
pg_reset_query_stats | destructive | Reset pg_stat_statements statistics (all or specific query) |
pg_revoke_permissions | destructive | Revoke permissions from a user/role |
pg_create_constraint | write | Create a constraint (unique, check, or primary key) |
pg_create_enum | write | Create a new ENUM type in the database |
pg_create_foreign_key | write | Create a foreign key constraint |
pg_create_function | write | Create or replace a PostgreSQL function |
pg_create_index | write | Create a new index on a table |
pg_create_rls_policy | write | Create a Row-Level Security policy |
pg_create_table | write | Create a new table in the database |
pg_create_trigger | write | Create a PostgreSQL trigger |
pg_create_user | write | Create a new PostgreSQL user/role |
pg_disable_rls | write | Disable Row-Level Security on a table |
pg_edit_rls_policy | write | Edit an existing Row-Level Security policy |
pg_enable_rls | write | Enable Row-Level Security on a table |
pg_execute_query | write | Execute SELECT queries and data retrieval operations - operation= |
pg_execute_sql | write | Execute arbitrary SQL statements - sql= |
pg_import_table_data | write | Import data from JSON or CSV file into a table |
pg_manage_rls | write | Manage PostgreSQL Row-Level Security - enable/disable RLS and manage policies. Examples: operation= |
pg_manage_schema | write | Manage PostgreSQL schema - get schema info, create/alter tables, manage enums. Examples: operation= |
pg_set_trigger_state | write | Enable or disable a PostgreSQL trigger |
pg_alter_user | read | Alter an existing PostgreSQL user/role |
pg_analyze_database | read | Analyze PostgreSQL database configuration and performance |
pg_analyze_index_usage | read | Find unused, duplicate, and low-usage indexes to optimize database performance |
pg_copy_between_databases | read | Copy data between two databases |
pg_debug_database | read | Debug common PostgreSQL issues |
pg_explain_query | read | EXPLAIN/EXPLAIN ANALYZE for queries to understand execution plans |
pg_export_table_data | read | Export table data to JSON or CSV format |
pg_get_constraints | read | List all constraints (primary keys, foreign keys, unique, check) |
pg_get_enums | read | Get information about PostgreSQL ENUM types |
pg_get_functions | read | Get information about PostgreSQL functions |
pg_get_indexes | read | List indexes with size and usage statistics |
pg_get_query_stats | read | Query statistics from pg_stat_statements with cache hit ratios |
pg_get_rls_policies | read | Get Row-Level Security policies |
pg_get_schema_info | read | Get schema information for a database or specific table |
pg_get_slow_queries | read | Find slow running queries using pg_stat_statements |
pg_get_triggers | read | Get information about PostgreSQL triggers |
pg_get_user_permissions | read | Get permissions for a user/role or all users |
pg_grant_permissions | read | Grant permissions to a user/role |
pg_list_users | read | List all users/roles in the database |
pg_manage_query | read | Manage PostgreSQL query analysis and performance - operation= |
pg_monitor_database | read | Get real-time monitoring information for a PostgreSQL database |
pg_reindex | read | Rebuild 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]
{
"mcpServers": {
"postgres-mcp-server": {
"command": "npx",
"args": [
"-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
- !CAUTION D 67 / 100
First audit ·
820487637aa9
README badge
For maintainers · updates on every re-audit
[](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?
What tools does PostgreSQL MCP Server expose?
Is PostgreSQL MCP Server safe to connect to an agent?
What credentials does PostgreSQL MCP Server need?
How does PostgreSQL MCP Server run?
How current is this page?
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.
- What is the PostgreSQL MCP Server MCP server?
- What tools does PostgreSQL MCP Server expose?
- Is PostgreSQL MCP Server safe to connect to an agent?