Skip to main content
Glama

Server Configuration

Describes the environment variables required to run the server.

NameRequiredDescriptionDefault
PGHOSTNoDatabase host, or the Unix socket directory (starts with /).localhost
PGPORTNoDatabase port.5432
PGUSERNoDatabase role. Defaults to the OS user name.
PGSSLMODENoTLS mode: disable, allow, prefer, require, verify-ca, verify-full; only the last two check the certificate.prefer
PGDATABASENoDatabase name. Defaults to the same as PGUSER.
PGPASSFILENoPassword file. Defaults to ~/.pgpass, on Windows %APPDATA%\postgresql\pgpass.conf.~/.pgpass
PGPASSWORDNoPassword. Works, but install.py never copies it: the password belongs in the password file.
PG_MCP_LANGNoLanguage: en or ru. Defaults from the system locale.
PG_MCP_NAMENoEntry name that status shows; install.py --name writes it.pg
PGSERVICEFILENoYour psql services file; stands are read from it too. Defaults to ~/.pg_service.conf, on Windows %APPDATA%\postgresql\.pg_service.conf.~/.pg_service.conf
PGSSLROOTCERTNoCA certificate for verify-ca and verify-full.
PG_MCP_STANDSNo* or stand name patterns such as dev*,ift2: one entry for many stands. Off when unset.
PG_MCP_PROFILENoTool profile: schema, explore or analyst.explore
PG_MCP_LOG_LEVELNoDetail of the stderr log: DEBUG, INFO, WARNING, ERROR.INFO
PG_MCP_QUERY_LOGNoAbsolute path of the query log file. Off when unset.
PG_MCP_STANDS_FILENoStands registry file. Defaults to ~/.pg-mcp/stands.conf, on Windows %APPDATA%\pg-mcp\stands.conf.~/.pg-mcp/stands.conf
PG_MCP_MAX_CONNECTIONSNoConnections an entry for stands keeps open.8
PG_MCP_SOCKET_TIMEOUT_SNoSeconds to wait for a new connection; for stands the default is 10. Once connected, the socket waits at least the query timeout plus 5 seconds.30
PG_MCP_MAX_RESPONSE_CHARSNoBudget of one answer in characters, at least 500.8000
PG_MCP_STATEMENT_TIMEOUT_MSNoTimeout of one query in milliseconds.5000

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
}

Tools

Functions exposed to the LLM to take actions

NameDescription
statusA

Read-only server: database, role, profile and limits. Call it first, and when a tool reports a connection problem: it says what to fix.

list_tablesA

Tables, views and foreign tables the role can read, with row estimates and comments. At most 200; pass schema to narrow.

search_schemaA

Find tables, views and columns by a piece of name or comment; use it instead of paging list_tables. At most 100 matches.

describe_tableA

Columns with types, NOT NULL, defaults and comments; keys, referencing tables, indexes.

sample_rowsA

A few rows of a table or view, optionally some columns. Default 10, at most 50, in no order.

explain_queryA

PostgreSQL's plan for one read-only query passed without EXPLAIN; the query is not run.

Prompts

Interactive templates invoked by user choice

NameDescription

No prompts

Resources

Contextual data attached and managed by the client

NameDescription

No resources

TDQS

A3.9/5.0

Scored across 6 tools

Disambiguation4/5

The majority of tools are distinct, separating schema listing, searching, detailing, data sampling, and query planning. However, `list_tables` and `search_schema` share a similar purpose of object discovery, which could occasionally cause agent confusion.

Naming Consistency5/5

The tool names exhibit a very consistent naming convention, generally adhering to the action_object format using snake_case. The naming pattern is immediately recognizable and predictable across the entire tool set.

Tool Count4/5

With 6 tools, the surface is well-scoped for a read-only PostgreSQL introspection server. Each tool performs a distinct function, contributing meaningfully to database inspection without being overly verbose or incomplete.

Completeness4/5

The tool set provides comprehensive coverage for read-only operations, including health checks, schema discovery, structural inspection, data sampling, and query planning. Minor gaps remain but do not prevent an agent from performing core database tasks.

Maintenance

ActivityMaintained
ResponsivenessNo issues