Skip to main content
Glama
hellorutvik

pg-readonly-mcp

by hellorutvik

Server Configuration

Describes the environment variables required to run the server.

NameRequiredDescriptionDefault
PGMCP_USERNoWho is asking, written to every audit lineunknown
DATABASE_URLYesConnection string for the read-only role (e.g. postgresql://claude_reader:change-me@db.internal:5432/shop)
PGMCP_MAX_ROWSNoRow cap per query500
PGMCP_AUDIT_LOGNoPath of the JSON-lines audit log where every call, including rejected ones, is appendedaudit.jsonl
PGMCP_MASK_COLUMNSNoComma-separated column names to mask (e.g. iban,email,phone). Columns listed come back as **** plus the last four characters.
PGMCP_STATEMENT_TIMEOUT_MSNoPostgres statement_timeout per query5000

Instructions

Guidance the server publishes about itself, which clients place ahead of the tool catalog so the model reads it before choosing anything.

This server publishes no instructions, or was last inspected before Glama recorded them.

Capabilities

Features and capabilities supported by this server

Protocol revision2025-11-25

CapabilityDetails
tools
{
  "listChanged": false
}
prompts
{
  "listChanged": false
}
resources
{
  "subscribe": false,
  "listChanged": false
}

Tools

Functions exposed to the LLM to take actions

NameDescription
list_tablesA

Tables and views this connection can read, as schema.name.

describe_tableB

Columns of one table or view (schema.name). Masked columns are flagged.

queryA

Run one read-only SQL statement (SELECT / WITH / TABLE / VALUES / EXPLAIN).

Prompts

Interactive templates invoked by user choice

NameDescription

No prompts

Resources

Contextual data attached and managed by the client

NameDescription

No resources

TDQS

A3.6/5.0

Scored across 3 tools

Disambiguation4/5

Each tool has a distinct role: catalog listing (list_tables), schema introspection (describe_table), and statement execution (query). The only overlap is that query could technically be used to list tables, but the descriptions steer an agent cleanly toward the dedicated tools.

Naming Consistency4/5

list_tables and describe_table follow a consistent verb_noun snake_case pattern, and query is a single clear verb in the same style. Minor deviation only in that query lacks a noun target, but it reads naturally alongside the others.

Tool Count5/5

Three tools is a tight, well-scoped surface for a read-only database accessor: discover tables, inspect columns, run SELECTs. Nothing extraneous and nothing obviously missing at this scope.

Completeness4/5

The discover-inspect-query lifecycle fully covers read-only database work, including EXPLAIN via query. Minor gaps exist around schema/database-level listing and connection metadata, but agents can work around these easily.

Maintenance

ActivityMaintained
ResponsivenessNo issues