Skip to main content
Glama
Azzaraell

pgguard-mcp

by Azzaraell

Server Configuration

Describes the environment variables required to run the server.

NameRequiredDescriptionDefault
PGGUARD_ROLENoSET LOCAL ROLE per transaction. Default empty.
PGGUARD_CLAIMSNoJSON for request.jwt.claims for Supabase RLS. Default empty.
PGGUARD_POLICYNoPath to the policy JSON file. Default bundled demo policy.
PGGUARD_AUDIT_LOGNoPath for JSONL audit log. Default stderr.
PGGUARD_DATABASE_URLNoPostgres connection string. Default empty -> demo mode (PGlite).
PGGUARD_MAX_RESPONSE_BYTESNoResponse size cap per tool call. Default 100000.

Capabilities

Features and capabilities supported by this server

CapabilityDetails
tools
{
  "listChanged": true
}

Tools

Functions exposed to the LLM to take actions

NameDescription
describe_accessA

Show the effective access policy: which tables and columns are visible, the row cap, the statement timeout, and whether a database role or RLS claims are active. Call this before querying so you only ask for data that exists in the policy.

list_tablesA

List the tables visible under the access policy, with estimated row counts and table comments. Tables outside the policy are not listed and cannot be queried.

describe_tableA

Describe one allowlisted table: columns (only those the policy exposes), types, nullability, primary key, foreign key targets, and indexes.

sample_rowsA

Read rows from one allowlisted table with simple filters (eq/lt/lte/gt/gte/contains) and a limit. Prefer this over run_query for straightforward lookups; use run_query for joins and aggregations.

run_queryA

Run one read-only SELECT against the allowlisted tables. The statement is parsed with the real PostgreSQL grammar and checked against the access policy, then executed inside a read-only transaction with a statement timeout and a row cap. Denials name the rule that triggered them.

explain_queryA

Show the query plan for a read-only SELECT without executing it (EXPLAIN, never EXPLAIN ANALYZE). Same policy gate as run_query.

Prompts

Interactive templates invoked by user choice

NameDescription

No prompts

Resources

Contextual data attached and managed by the client

NameDescription

No resources

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/Azzaraell/pgguard-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server