Skip to main content
Glama
mcp-server-postgres

mcp-server-postgres

by Ismail-2001

Server Configuration

Describes the environment variables required to run the server.

NameRequiredDescriptionDefault
MAX_ROWSNoHard upper limit for result pages100
DATABASE_URLYesPrimary PostgreSQL DSN
MASKED_COLUMNSNoComma-separated list of columns to redact
PERMISSION_TIERNoREAD_ONLY | READ_WRITE | DDL_ALLOWED | ADMINREAD_ONLY
READ_REPLICA_URLNoOptional replica DSN for read routing
SLOW_QUERY_THRESHOLD_MSNoWarning threshold for latency500

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
{}

Tools

Functions exposed to the LLM to take actions

NameDescription
queryC

Executes a validated PostgreSQL query with parameterized inputs (Tier: READ_ONLY/READ_WRITE).

nl_queryC

Intelligently translates natural language into validated, optimized SQL and executes it.

schema_inspectC

Resolve exact table names, column names, types, nullability, and constraints.

list_tablesC

Lists all tables in the specified schema.

describe_tableB

Returns detailed column, index, and foreign key definitions.

explainC

Run EXPLAIN (FORMAT JSON) and attach cost estimate and plan summary.

transactionC

Executes multiple write operations inside an explicit BEGIN/COMMIT block.

confirm_ddlB

Confirms and executes high-risk DDL operations after receiving a validation token.

Prompts

Interactive templates invoked by user choice

NameDescription

No prompts

Resources

Contextual data attached and managed by the client

NameDescription

No resources

TDQS

B3/5.0

Scored across 8 tools

Disambiguation3/5

Most tools are distinct, but schema_inspect and describe_table both return column/type/constraint information and overlap heavily. query and nl_query are separable by input style, and transaction vs confirm_ddl differ by write scope, but the schema inspection pair creates real misselection risk.

Naming Consistency3/5

Mixed conventions: list_tables and describe_table follow verb_noun, schema_inspect reverses to noun_verb, nl_query is adjective_noun, and query/explain/transaction are bare single words. Still readable, but not a predictable pattern.

Tool Count5/5

Eight tools is well within the ideal 3-15 range. Each tool maps to a meaningful capability (query, NL query, schema lookup, table listing, description, explain, transactions, DDL) without bloat.

Completeness4/5

Core lifecycle is covered: read/write queries, NL queries, transactions, DDL, schema inspection, and plan analysis. Minor gaps exist (no schema/database listing, no EXPLAIN ANALYZE, no views/functions inspection), but agents can work around them via query.