{
  "schema_version": "2025-06-18",
  "name": "com.pgbeam/db-mcp",
  "title": "PgBeam: Safe Postgres for AI agents",
  "description": "A hosted, policy-enforced MCP server for safe Postgres access. Every tool call runs against the agent credential's policy (read-only enforcement, table allowlists, PII masking, query budgets, kill-switch) and is recorded in a full audit trail. Works with any Postgres, with zero code changes.",
  "documentation": "https://pgbeam.com/docs/mcp",
  "provider": {
    "name": "PgBeam",
    "url": "https://pgbeam.com"
  },
  "remotes": [
    {
      "transport_type": "streamable-http",
      "url": "https://{project}.proxy.pgbeam.app/mcp"
    }
  ],
  "authentication": {
    "type": "http",
    "scheme": "bearer",
    "description": "Per-agent bearer token (pba_…) issued in the PgBeam dashboard. Scoped, revocable, and kill-switchable per credential.",
    "token_acquisition": "https://dash.pgbeam.com"
  },
  "tools": [
    {
      "name": "query",
      "description": "Run SQL. Policy errors surface verbatim, written to be LLM-readable so the agent can correct itself."
    },
    {
      "name": "validate_sql",
      "description": "Check a statement's table and column references against the schema the credential may see, without running it. Returns issues (unknown table, unknown column, ambiguous) with ranked suggestions, so the agent self-corrects a hallucinated name before it costs a failed query."
    },
    {
      "name": "list_tables",
      "description": "List tables in a schema, shaped for an LLM."
    },
    {
      "name": "describe_table",
      "description": "Columns, types, primary and foreign keys, indexes, and approximate row count."
    },
    {
      "name": "explain",
      "description": "EXPLAIN (FORMAT JSON) for a statement."
    },
    {
      "name": "schema_catalog",
      "description": "One call returns the whole schema, LLM-optimized: tables with columns, primary and foreign keys, indexes, approximate row counts, and comments. Only tables and columns this credential may see are included; masked columns are flagged. Paginates for large schemas."
    },
    {
      "name": "search_docs",
      "description": "Search the PgBeam documentation and return matching pages as {title, url, snippet}. Find how PgBeam works: connecting, masking, query budgets, the kill-switch, and more."
    },
    {
      "name": "read_doc",
      "description": "Return the markdown of a single PgBeam documentation page by slug or url (chain from a search_docs result)."
    }
  ]
}