Skip to main content

FrootAI — AmpliFAI your AI Ecosystem Get Started

All servers

pgEdge Distributed Postgres

pgedge

Query and analyze PostgreSQL databases — SQL execution, schema discovery, EXPLAIN analysis, and hybrid vector search — via the official pgEdge Postgres MCP server.

Installs
178
Namespace
pgedge
Version
>=1.0.0 <2.0.0
Last attach
reviewed1 months ago

Add to your mcp.json

{
  "mcpServers": {
    "pgedge": {
      "command": "docker",
      "args": [
        "run",
        "-i",
        "--rm",
        "-e",
        "PGEDGE_DB_HOST",
        "-e",
        "PGEDGE_DB_PORT",
        "-e",
        "PGEDGE_DB_NAME",
        "-e",
        "PGEDGE_DB_USER",
        "-e",
        "PGEDGE_DB_PASSWORD",
        "-e",
        "PGEDGE_DB_SSLMODE",
        "ghcr.io/pgedge/postgres-mcp"
      ]
    }
  }
}

Attach in a FrootAI play (fai-manifest)

mcp_scope:
  attached:
    - pgedge

Authentication

postgres-connection

point the server at PostgreSQL via the PGEDGE_DB_* variables (host/port/name/user/password) and use a least-privilege read-only role; leave PGEDGE_DB_ALLOW_WRITES unset for read-only access.

No credentials required.

Environment variables

VariableRequiredAuth modeDescription
PGEDGE_DB_HOSTnoconnectionPostgreSQL host to connect to. Provide the connection via these PGEDGE_DB_* vars or a config file.
PGEDGE_DB_PORTnoconnectionPostgreSQL port (default 5432).
PGEDGE_DB_NAMEnoconnectionTarget database name.
PGEDGE_DB_USERnoconnectionDatabase user. Prefer a least-privilege, read-only role.
PGEDGE_DB_PASSWORDnoconnectionDatabase user password; pass via env, never inline in args (doctrine #6).
PGEDGE_DB_SSLMODEnoanyPostgres SSL mode (e.g. require, verify-full, prefer). Use require/verify-full for remote clusters.
PGEDGE_DB_ALLOW_WRITESnoanySet to `true` to allow write queries (INSERT/UPDATE/DELETE/DDL). Off by default — the server runs read-only transactions.

Sample tools

  • pgedge.query_database

    Execute a SQL query (runs inside a read-only transaction by default).

  • pgedge.count_rows

    Count rows in a table before querying large datasets.

  • pgedge.get_schema_info

    Discover tables, columns, data types, and relationships.

  • pgedge.execute_explain

    Run EXPLAIN ANALYZE on a SELECT query to analyze performance.

  • pgedge.similarity_search

    Hybrid vector + BM25 + MMR search over pgvector columns.

  • pgedge.read_resource

    Read MCP resources such as pg://system_info.

Used in recipes

FAI cookbook recipes that attach pgedge.

Destructive-action audit

No destructive tools — audited read-only

Destructive-action audit (X2.18): no tools match destructive name patterns (destructive_tools is empty); write capability is gated behind the off-by-default PGEDGE_DB_ALLOW_WRITES and the read-only-transaction guardrail.

Known limitations

  • Connect to PostgreSQL via the PGEDGE_DB_* variables (host/name/user/password) or a config file; without a configured connection the data tools return no results.
  • Distributed as a Docker image (ghcr.io/pgedge/postgres-mcp) — Docker must be installed and running; there is no npm package.
  • Read-only by default — query_database runs inside read-only transactions; setting PGEDGE_DB_ALLOW_WRITES=true enables DDL/DML and the server then marks query_database with `destructiveHint`.
  • Semantic tools (similarity_search, generate_embedding, search_knowledgebase) require extra setup — pgvector columns, an embedding provider, and/or a prebuilt knowledgebase — and are otherwise unavailable.

Spec contributors

Maintainers who landed commits onmcp-specs/pgedge.json.

  • pspsbali

Freshness

When this spec was last reviewed by a maintainer and last machine-validated against the live server.

Spec last reviewed
1 months ago(2026-06-25)
Auto-validated
never