Skip to main content
Glama
abiswas97

Postgres MCP Server

by abiswas97

Server Configuration

Describes the environment variables required to run the server.

NameRequiredDescriptionDefault
DB_SSLNoEnable SSL connectiontrue
DB_HOSTNoPostgreSQL host127.0.0.1
DB_NAMENoDatabase namepostgres
DB_PORTNoPostgreSQL port5432
DB_USERNoDatabase userpostgres
READ_ONLYNoRestrict to SELECT/WITH/EXPLAIN queriestrue
DB_PASSWORDYesDatabase password
MAX_PAGE_SIZENoMaximum rows per page500
QUERY_TIMEOUTNoQuery timeout in milliseconds30000
DEFAULT_PAGE_SIZENoDefault page size when not specified100

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

Execute SQL with pagination and parameterization

describe_tableB

Get table structure including columns, constraints, and size statistics

list_objectsB

List tables, views, or functions in a schema

list_schemasC

List all schemas in the database

list_indexesC

List indexes for a table or schema

explain_queryC

Get query execution plan (EXPLAIN)

search_objectsB

Find tables, columns, functions, views by name pattern across schemas

get_connectionsB

Show active database connections, utilization, and idle-in-transaction warnings

diagnose_databaseC

Composite database health check: cache, connections, vacuum, indexes, sequences

get_slow_queriesC

Analyze slow queries via pg_stat_statements with filtering and sorting

Prompts

Interactive templates invoked by user choice

NameDescription

No prompts

Resources

Contextual data attached and managed by the client

NameDescription

No resources

TDQS

B3.2/5.0

Scored across 10 tools

Disambiguation4/5

Most tools have distinct purposes (describe_table for structure, list_schemas/list_indexes for enumeration, query for execution, and diagnostic tools). Minor overlap exists: list_objects and search_objects both enumerate objects (one by schema, one by pattern), and diagnose_database overlaps in scope with get_connections and get_slow_queries. Descriptions are clear enough to guide selection.

Naming Consistency4/5

Nearly all tools follow a clean verb_noun pattern (describe_table, list_schemas, list_indexes, explain_query, search_objects, get_connections, get_slow_queries, list_objects), with diagnose_database fitting the same shape. The lone outlier is 'query', a bare verb that breaks the convention.

Tool Count5/5

Ten tools is well-scoped for a Postgres introspection/diagnostics server, with each tool covering a distinct area of database exploration and execution. No redundancy that would bloat the surface.

Completeness4/5

Good coverage of introspection (schemas, tables, indexes, objects), query execution, and health diagnostics for a read/diagnostic-oriented server. Writes are handled via the generic query tool, but there is no explicit transaction or schema-modification surface, a minor gap agents can work around.

Maintenance

ActivityInactive
ResponsivenessNo issues