Skip to main content
Glama
mcp-postgres

mcp-postgres

by gbfeliped

Server Configuration

Describes the environment variables required to run the server.

NameRequiredDescriptionDefault
PG_SSLNoEnable SSL (true/false)false
PG_HOSTNoServer hostname or IP
PG_PORTNoTCP port5432
PG_USERNoPostgreSQL username
PG_DATABASENoDatabase name
PG_PASSWORDNoPostgreSQL password
PG_SSH_HOSTNoSSH server hostname (activates tunnel when set)
PG_SSH_PORTNoSSH server port22
PG_SSH_USERNoSSH username
PG_SSH_PASSWORDNoSSH password
PG_SSH_PRIVATE_KEYNoPath to private key file
PG_SSH_REMOTE_HOSTNoPostgres host as seen from SSH server (defaults to PG_HOST)
PG_SSH_KEY_PASSPHRASENoPassphrase for private key
PG_SSL_REJECT_UNAUTHORIZEDNoReject self-signed certstrue

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

Execute a read-only SELECT query against PostgreSQL. Only SELECT (and CTEs starting with WITH) are permitted. Write operations, system functions, DoS constructs, and multiple statements are all blocked.

list_tablesA

List all user tables in the connected PostgreSQL database, including schema name, table name, row count estimate, and size.

describe_tableA

Describe the columns of a PostgreSQL table: name, data type, nullability, default value, and whether it is part of the primary key.

list_schemasA

List all user-defined schemas in the connected PostgreSQL database.

Prompts

Interactive templates invoked by user choice

NameDescription

No prompts

Resources

Contextual data attached and managed by the client

NameDescription

No resources

TDQS

A3.7/5.0

Scored across 4 tools

Disambiguation4/5

The three metadata tools (list_tables, describe_table, list_schemas) target clearly distinct objects, and query is obviously the general-purpose execution tool. The only mild overlap is that query could technically satisfy anything the metadata helpers do, but the read-only SELECT restriction keeps boundaries reasonably clear.

Naming Consistency4/5

list_tables, describe_table, and list_schemas follow a clear verb_noun lowercase-snake pattern. The bare verb 'query' breaks the pattern slightly, but it remains readable and the deviation is minor.

Tool Count4/5

Four tools is a reasonable, tightly scoped surface for read-only PostgreSQL access, with each tool earning its place. It sits at the thin end of the ideal range, though the small set is appropriate for a deliberately read-only server.

Completeness4/5

The surface covers the core read-only workflows: running queries, discovering schemas, listing tables, and inspecting columns. Minor gaps exist (no view/index/constraint inspection, no query-plan/EXPLAIN helper), and write operations are intentionally absent, but agents can work around most of these via query.

Maintenance

ActivityInactive
ResponsivenessNo recent community issues