# PostgreSQL MCP Server (npm · @itunified.io/mcp-postgres)

PostgreSQL MCP Server — 27 tools for queries, schema, CRUD, DBA, HA & server management

- Trust score: 69/100 (medium)
- Change this week: +45
- Registry status: active
- Liveness: live
- Owner verified: no
- Last scored: 2026-08-03

## Components

- npm · `@itunified.io/mcp-postgres`: 69/100 (this document), [markdown](https://verifymcp.io/servers/itunified-io-postgres/itunified-io-mcp-postgres.md), [page](https://verifymcp.io/servers/itunified-io-postgres/itunified-io-mcp-postgres)

## Channel facts

- Registry: `npm`
- Package: `@itunified.io/mcp-postgres`
- Version: `2026.4.10-1`
- Transport: `stdio`

## Trust breakdown

How this component scores in each security and reliability category. Every signal is checked automatically from public evidence about the published package, including repeated runs of it in an isolated sandbox, and we only credit what we can confirm. Scores are 0–100 per category. Scoring method: https://verifymcp.io/docs/scoring (what has changed: https://verifymcp.io/docs/scoring/changelog)

Scored 2026-08-03.

- **Supply Chain Security**: 87/100
  - No malware found by supply-chain analysis.
  - Only part of the dependency tree could be resolved (109 of 113), so this covers what we could see, not the whole tree.
  - No install/post-install scripts declared.
  - Only part of the dependency tree could be resolved (109 of 113), so this covers what we could see, not the whole tree.
- **Provenance & Transparency**: 45/100
  - Source repository is publicly reachable at the declared URL.
  - Provenance check failed: no build-provenance attestation is published.
  - Clear OSI-approved license (AGPL-3.0-only).
  - Actively maintained (last published 114 days ago).
  - Disclosure check failed: no security disclosure policy was found in the source repository.
- **Schema Quality & AI Usability**: 73/100
  - AI-judged instruction clarity (good).
  - Tool/resource definitions use about 1416 tokens (~50/item across 28 items; 28 tools + 0 resources), lean.
  - Usage-examples check failed: none of the tools include examples.
- **Stability & Change Management**: 27/100
  - Stability observed for 8 of 30 days with no destabilising changes; credit accrues until the full window elapses.
- **Tool Coverage**: 100/100
  - 100% of tools have a non-trivial description (not blank, and not just the tool's name).
  - 100% of tool parameters carry a description.
- **Capabilities**: 100/100
  - Implements a supported MCP spec version (2025-11-25); the latest is 2026-07-28.

## Install

### Claude

```bash
claude mcp add itunified-io-postgres -- npx -y @itunified.io/mcp-postgres
```

### Codex

```bash
codex mcp add itunified-io-postgres -- npx -y @itunified.io/mcp-postgres
```

### opencode

```json
{
  "$schema": "https://opencode.ai/config.json",
  "mcp": {
    "itunified-io-postgres": {
      "type": "local",
      "command": [
        "npx",
        "-y",
        "@itunified.io/mcp-postgres"
      ],
      "enabled": true
    }
  }
}
```

### OpenClaw

```bash
openclaw mcp add itunified-io-postgres --command npx --arg -y --arg @itunified.io/mcp-postgres
```

### Hermes

```yaml
mcp_servers:
  itunified-io-postgres:
    command: "npx"
    args: ["-y", "@itunified.io/mcp-postgres"]
```

### Other

```json
{
  "mcpServers": {
    "itunified-io-postgres": {
      "command": "npx",
      "args": [
        "-y",
        "@itunified.io/mcp-postgres"
      ]
    }
  }
}
```

## Changelog

Every change recorded for this component, newest first. Days that predate change tracking, or that we cannot explain, say so: "we were watching and nothing happened" and "we were not watching" are different claims.

### 2026-08-03 (score 69, +1)

No change was recorded against any check on this day. Stability & Change Management went from 23 to 27. That category is still filling its 30-day observation window: 7 days of observed history at the previous scan, 8 at this one. The score rises as the window fills, whether or not the server changes.

### 2026-08-02 (score 68, +42)

- [security regression] Provenance: unverified → fail
- [security improvement] Known CVEs: unverified → partial
- [security improvement] Install scripts: unverified → pass
- [security improvement] Malware scan: unverified → pass
- [security] Stability: Stability not yet verified: we do not have a sandbox capture of the MCP schema this version of the package serves yet.
- [functional regression] Capabilities: pass → unverified
- [functional improvement] Schema quality: unverified → good
- [functional improvement] Maintenance: unverified → pass
- [functional improvement] Dependency health: unverified → partial
- [functional improvement] Stability: unverified → 0.23
- [functional improvement] License: unverified → pass
- [functional] Licence: AGPL-3.0-only

### 2026-08-01 (score 26, +5)

- [security] Stability: Stability not yet verified: not enough scan history yet (needs a 30-day window).
- [functional improvement] MCP protocol: unverified → pass

### 2026-07-31 (score 21, −7)

- [functional] We updated how we score, so this day's move reflects our rubric, not a change to the server

### 2026-07-30 (score 28, −18)

- [security regression] Malware scan: pass → unverified

### 2026-07-28 (score 46, +22)

- [functional improvement] Tool coverage: unverified → 100
- [functional] First check of Schema quality: fail
- [functional] First check of Tool coverage: 100
- [functional] First check of Schema quality: unverified
- [functional] First check of Schema quality: pass

### 2026-07-27 (score 24)

First indexed and scored.

## MCP tools (28)

### `pg_connect` (~83 tokens)

Connect to a PostgreSQL server profile. If multiple profiles are configured, specify which one. Otherwise connects to the default profile.

Input parameters:

- `database` (string): Deprecated — use "profile" instead. Kept for backward compatibility.
- `profile` (string): Named connection profile from config file (optional, uses default if omitted). Each profile points to a PostgreSQL server instance.

### `pg_disconnect` (~53 tokens)

Disconnect from a PostgreSQL server profile. Omit profile to disconnect all.

Input parameters:

- `database` (string): Deprecated — use "profile" instead.
- `profile` (string): Named profile to disconnect (omit to disconnect all)

### `pg_connection_status` (~51 tokens)

Check connection pool health for the active profile or a specific named profile.

Input parameters:

- `database` (string): Deprecated — use "profile" instead.
- `profile` (string): Named profile (omit for active profile)

### `pg_list_connections` (~34 tokens)

List all configured connection profiles and their status. Each profile represents a PostgreSQL server instance (not a database within a server).

### `pg_switch_profile` (~61 tokens)

Switch the active connection profile. All subsequent queries will use this profile unless overridden. Each profile targets a specific PostgreSQL server instance.

Input parameters:

- `database` (string): Deprecated — use "profile" instead.
- `profile` (string, required): Named profile to switch to

### `pg_switch_database` (~51 tokens)

Deprecated — use pg_switch_profile instead. Switch the active connection profile.

Input parameters:

- `database` (string, required): Named profile to switch to (deprecated param name)
- `profile` (string): Named profile to switch to

### `pg_query` (~60 tokens)

Execute a parameterized SQL query. Returns rows as JSON. Use $1, $2, ... for parameters.

Input parameters:

- `params` (array): Parameter values for placeholders
- `sql` (string, required): SQL query with $1, $2, ... placeholders

### `pg_query_explain` (~133 tokens)

Run EXPLAIN on a query. mode=plan (default, safe) shows the plan without executing. mode=analyze executes the statement and shows actual timing — ALWAYS requires confirm: true because EXPLAIN ANALYZE executes the statement.

Input parameters:

- `confirm` (boolean): Required for mode=analyze. EXPLAIN ANALYZE executes the statement.
- `mode` (string): Explain mode: 'plan' (safe, default) or 'analyze' (executes statement, requires confirm)
- `params` (array): Parameter values
- `sql` (string, required): SQL query to explain

### `pg_query_prepared` (~116 tokens)

[DEPRECATED] Manage named prepared statements: PREPARE, EXECUTE, DEALLOCATE. ⚠️ Prepared statements are session-local in PostgreSQL and unreliable with connection pools — each pool checkout may get a different backend. Use parameterized pg_query instead.

Input parameters:

- `action` (string, required): Action to perform
- `name` (string, required): Prepared statement name (SQL identifier: letters, digits, underscores)
- `params` (array): Parameters (for execute)
- `sql` (string): SQL query (required for prepare)

### `pg_schema_list` (~16 tokens)

List all schemas in the database.

### `pg_table_list` (~38 tokens)

List tables in the database. Optionally filter by schema name.

Input parameters:

- `schema` (string): Schema name filter (default: all user schemas)

### `pg_table_describe` (~50 tokens)

Describe a table: columns, data types, defaults, nullability, and constraints.

Input parameters:

- `schema` (string): Schema name (default: 'public')
- `table` (string, required): Table name

### `pg_index_list` (~47 tokens)

List indexes for a table with type, columns, uniqueness, and size.

Input parameters:

- `schema` (string): Schema name (default: 'public')
- `table` (string, required): Table name

### `pg_constraint_list` (~49 tokens)

List constraints (primary key, foreign key, unique, check) for a table.

Input parameters:

- `schema` (string): Schema name (default: 'public')
- `table` (string, required): Table name

### `pg_view_list` (~31 tokens)

List views with their definitions. Optionally filter by schema.

Input parameters:

- `schema` (string): Schema name filter

### `pg_function_list` (~27 tokens)

List functions and procedures with their signatures.

Input parameters:

- `schema` (string): Schema name filter

### `pg_enum_list` (~17 tokens)

List all enum types and their values.

### `pg_extension_list` (~17 tokens)

List installed PostgreSQL extensions with versions.

### `pg_insert` (~67 tokens)

Insert one or more rows into a table. Returns inserted rows.

Input parameters:

- `columns` (array, required): Column names
- `schema` (string): Schema name (default: 'public')
- `table` (string, required): Table name
- `values` (array, required): Values to insert (matches column order)

### `pg_update` (~94 tokens)

Update rows matching a WHERE clause. Requires confirm: true.

Input parameters:

- `confirm` (boolean, required): Must be true to execute
- `params` (array): Parameter values for WHERE clause
- `schema` (string): Schema name (default: 'public')
- `set` (object, required): Column-value pairs to update
- `table` (string, required): Table name
- `where` (string, required): WHERE clause (use $N for params)

### `pg_delete` (~82 tokens)

Delete rows matching a WHERE clause. Requires confirm: true.

Input parameters:

- `confirm` (boolean, required): Must be true to execute
- `params` (array): Parameter values for WHERE clause
- `schema` (string): Schema name (default: 'public')
- `table` (string, required): Table name
- `where` (string, required): WHERE clause (use $N for params)

### `pg_upsert` (~88 tokens)

Insert or update on conflict. Requires confirm: true.

Input parameters:

- `columns` (array, required): Column names
- `confirm` (boolean, required): Must be true to execute
- `conflict_columns` (array, required): Columns for ON CONFLICT clause
- `schema` (string): Schema name (default: 'public')
- `table` (string, required): Table name
- `values` (array, required): Values to insert

### `pg_version` (~17 tokens)

Get PostgreSQL version string and numeric version.

### `pg_settings` (~29 tokens)

Show or search server configuration parameters.

Input parameters:

- `name` (string): Filter settings by name (partial match)

### `pg_reload_config` (~35 tokens)

Reload server configuration files (postgresql.conf). Requires confirm: true.

Input parameters:

- `confirm` (boolean, required): Must be true to execute

### `pg_uptime` (~16 tokens)

Show server uptime and start time.

### `pg_database_size` (~15 tokens)

Show size of all databases.

### `pg_table_sizes` (~39 tokens)

Show table sizes with index and toast breakdown, sorted by total size descending.

Input parameters:

- `schema` (string): Schema name filter (default: 'public')

## Diagnostics

Captured diagnostic sections: Provenance, Dependencies. The full working is on the page: https://verifymcp.io/servers/itunified-io-postgres/itunified-io-mcp-postgres#diagnostics

## Score history

- 2026-08-03: 69
- 2026-08-02: 68
- 2026-08-01: 26
- 2026-07-31: 21
- 2026-07-30: 28
- 2026-07-28: 46
- 2026-07-27: 24

## Links

- npm package: https://www.npmjs.com/package/@itunified.io/mcp-postgres
- Socket report: https://socket.dev/npm/package/@itunified.io/mcp-postgres
- Repository: https://github.com/itunified-io/mcp-postgres
- Changelog RSS feed: https://verifymcp.io/servers/itunified-io-postgres/itunified-io-mcp-postgres/changelog.xml
- Changelog JSON feed: https://verifymcp.io/servers/itunified-io-postgres/itunified-io-mcp-postgres/changelog.json
- HTML version of this page: https://verifymcp.io/servers/itunified-io-postgres/itunified-io-mcp-postgres
