Postgresql

25 tools. 12 can modify or destroy data without limits.

2 destructive tools with no built-in limits. Policy required.

Last updated:

12 can modify or destroy data
13 read-only
25 tools total

Community server · catalogue entry verified 02/07/2026

How to control Postgresql ↓

What Postgresql exposes to your agents

Read (13) Write / Execute (10) Destructive / Financial (2)
Critical Risk

The most dangerous Postgresql tools

12 of Postgresql's 25 tools can modify, destroy, or commit something on every call — and an agent calls them with no built-in limits.

How to control Postgresql

PolicyLayer is an MCP gateway — it sits between your AI agents and Postgresql, and nothing reaches the server without passing your rules. These are the rules we recommend:

Deny destructive operations
{
  "deleteRows": {
    "deny_if": [
      {
        "conditions": [],
        "on_deny": "Blocked by default. Requires approval."
      }
    ]
  }
}

Destructive tools should never be available to autonomous agents without human approval.

Rate limit write operations
{
  "createIndex": {
    "limits": [
      {
        "counter": "createindex_per_hour",
        "window": "hour",
        "max": 30,
        "scope": "grant"
      }
    ]
  }
}

Prevents bulk unintended modifications from agents caught in loops.

Cap read operations
{
  "connectionInfo": {
    "limits": [
      {
        "counter": "connectioninfo_per_minute",
        "window": "minute",
        "max": 60,
        "scope": "grant"
      }
    ]
  }
}

Controls API costs and prevents retry loops from exhausting upstream rate limits.

  1. Create a free account and register Postgresql — nothing to install.
  2. Add these rules — paste them, or build them visually. Tune the limits to your setup.
  3. Point your MCP client (Claude, Cursor, anything) at your gateway URL.
ENFORCE POLICY ON POSTGRESQL →

Instant setup, no code required.

All 25 Postgresql tools

READ 13 tools
Read connectionInfo Get PostgreSQL server connection information including version, database name, server time, and the current da Read databaseHealth Get a comprehensive database health report including connection utilization, buffer cache hit ratios, database Read describeTable Get detailed information about a table including all columns (names, types, nullability, defaults), indexes, a Read getActiveQueries List currently running queries from pg_stat_activity. Optionally filter by minimum duration in seconds. Shows Read getTableStats Get detailed statistics for a specific table including live/dead row counts, dead row ratio, last vacuum/analy Read healthCheck Check the health of both the MCP server and the PostgreSQL database connection. Returns connectivity status an Read indexHealth Analyze index health across a schema. Reports unused indexes (zero scans), duplicate indexes, and tables that Read listIndexes List indexes with usage statistics. Can filter by specific table or list all indexes in a schema. Shows index Read listTables List all tables, views, and materialized views in a schema with estimated row counts and sizes. Defaults to th Read searchSchema Search for tables and columns by name using a case-insensitive pattern match. Returns matching tables and colu Read sequenceHealth Check all sequences for approaching max values. Sequences (used for auto-incrementing IDs) have a maximum valu Read userInfo Get the current authenticated user Read vacuumHealth Check vacuum health across a schema. Reports tables with high dead row ratios that need vacuuming, along with

Related servers

Other MCP servers with similar tools — same risk classification, starter policies for each.

Questions about Postgresql

Can an AI agent delete data through the Postgresql MCP server? +

Yes. The Postgresql server exposes 2 destructive tools including deleteRows, dropIndex. These permanently remove resources with no undo. PolicyLayer blocks destructive tools by default so they never reach the upstream server.

How do I prevent bulk modifications through Postgresql? +

The Postgresql server has 4 write tools including createIndex, insertRows, updateRows. Set a rate limit in your policy -- for example, 10 calls per hour prevents an agent from making more than 10 modifications per hour. PolicyLayer enforces this at the gateway, before calls reach Postgresql.

How many tools does the Postgresql MCP server expose? +

25 tools across 4 categories: Destructive, Execute, Read, Write. 13 are read-only. 12 can modify, create, or delete data.

How do I enforce a policy on Postgresql? +

Register the Postgresql MCP server in PolicyLayer, apply the suggested rules above (adjust the limits to your use case), and point your AI client at the PolicyLayer proxy URL instead of the server directly. Your agents keep the same tools; PolicyLayer evaluates every call against policy before it executes. Nothing to install, live in minutes.

Enforce policy on every Postgresql tool call.

Deterministic rules across all 25 Postgresql tools. Per-identity grants. Full audit log. Live in minutes. Nothing to install.

Instant setup, no code required.

25 Postgresql tools catalogued and risk-classified — across an index of 43,000+ MCP servers.

// GET IN TOUCH

Have a question or want to learn more? Send us a message.

Message sent.

We'll get back to you soon.