Skip to main content
Glama
postgres-mcp

postgres-mcp

by cleondev

Server Configuration

Describes the environment variables required to run the server.

NameRequiredDescriptionDefault
PGPASSWORDNoPostgreSQL password, read by the pg client; can be used to keep the password out of PG_MCP_URL.
PG_MCP_URLNoPostgreSQL connection string, e.g. postgres://user[:password]@host:port/db. Required (or DATABASE_URL).
PG_MCP_MODENoEither readonly or readwrite. Write tools exist only when set to readwrite.readonly
DATABASE_URLNoAlternative to PG_MCP_URL for the PostgreSQL connection string, e.g. postgres://user[:password]@host:port/db.
PG_MCP_MAX_ROWSNoMaximum rows returned by query before truncation.500
PG_MCP_MAX_CELL_CHARSNoMaximum characters kept per cell.2000
PG_MCP_STATEMENT_TIMEOUT_MSNoPer-call statement timeout in milliseconds.30000

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": true
}

Tools

Functions exposed to the LLM to take actions

NameDescription
queryA

Run ONE read-only SQL statement (SELECT, WITH, VALUES, TABLE, SHOW, EXPLAIN) in a READ ONLY transaction that is always rolled back. Returns at most 500 rows; long cells are cut. Multiple statements and transaction control are rejected.

list_tablesA

List tables, views and materialized views with estimated row counts and size. Omit schema to list every user schema.

describe_tableB

Columns (type, nullability, default, comment), constraints and indexes of one table or view.

connection_infoA

Who this server connects as, its mode and limits, and whether the database role itself could write.

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 4 tools

Disambiguation4/5

Each tool targets a clearly different need: arbitrary reads (query), object inventory (list_tables), single-object structure (describe_table), and server/session context (connection_info). The only overlap is that query can reach pg_catalog and duplicate the metadata tools, but the descriptions make the intended split clear enough to avoid misselection.

Naming Consistency4/5

Three of four names follow a recognizable verb/verb_noun style (query, list_tables, describe_table) with snake_case throughout. connection_info is the one break in pattern as a noun phrase, but it still reads naturally as a distinct informational tool.

Tool Count4/5

Four tools is lean and each one earns its place in a deliberately read-only server; nothing feels redundant. It sits at the low end of the comfortable range, so a slightly broader surface (e.g. schema/extension listing) could have been added without bloat.

Completeness4/5

For a read-only inspection domain, the set covers the main path: discover objects, inspect structure, run ad-hoc queries, and confirm what the role can do. Gaps are minor — no schema/database listing tool, no column-name search, and no dedicated index or function introspection — all workable via query on pg_catalog.

Maintenance

ActivityMaintained
ResponsivenessNo recent community issues