Skip to main content
Glama
nayzo

mcp-postgresdb-readonly

by nayzo

Server Configuration

Describes the environment variables required to run the server.

NameRequiredDescriptionDefault
PORTNoIf set, starts server in HTTP mode on this port. If not set, runs in stdio mode.
MAX_ROWSNoMaximum rows returned per query (auto LIMIT). Default: 1000.1000
MCP_AUTH_TOKENNoBearer token required for HTTP mode. If not set, server is unprotected.
QUERY_TIMEOUT_MSNoQuery timeout in milliseconds. Default: 30000.30000
POSTGRES_PROD_SSLNoEnable SSL for production PostgreSQL. Default: true.true
POSTGRES_TEST_SSLNoEnable SSL for test PostgreSQL. Default: true.true
POSTGRES_PROD_HOSTNoHostname for production PostgreSQL database.
POSTGRES_PROD_PORTNoPort for production PostgreSQL database. Default: 5432.5432
POSTGRES_PROD_USERNoUser for production PostgreSQL database.
POSTGRES_TEST_HOSTNoHostname for test PostgreSQL database.
POSTGRES_TEST_PORTNoPort for test PostgreSQL database. Default: 5432.5432
POSTGRES_TEST_USERNoUser for test PostgreSQL database.
POSTGRES_PROD_SCHEMANoOptional schema to restrict access for production environment. If not set, all user schemas are accessible.
POSTGRES_STAGING_SSLNoEnable SSL for staging PostgreSQL. Default: true.true
POSTGRES_TEST_SCHEMANoOptional schema to restrict access for test environment.
POSTGRES_STAGING_HOSTNoHostname for staging PostgreSQL database.
POSTGRES_STAGING_PORTNoPort for staging PostgreSQL database. Default: 5432.5432
POSTGRES_STAGING_USERNoUser for staging PostgreSQL database.
RATE_LIMIT_PER_MINUTENoMaximum requests per minute. Default: 60.60
POSTGRES_PROD_DATABASENoDatabase name for production PostgreSQL.
POSTGRES_PROD_PASSWORDNoPassword for production PostgreSQL user.
POSTGRES_TEST_DATABASENoDatabase name for test PostgreSQL.
POSTGRES_TEST_PASSWORDNoPassword for test PostgreSQL user.
POSTGRES_STAGING_SCHEMANoOptional schema to restrict access for staging environment.
POSTGRES_STAGING_DATABASENoDatabase name for staging PostgreSQL.
POSTGRES_STAGING_PASSWORDNoPassword for staging PostgreSQL user.

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
queryA

Execute a read-only SQL query on a PostgreSQL database.

⛔ WRITE OPERATIONS ARE STRICTLY FORBIDDEN (INSERT, UPDATE, DELETE, DROP, etc.)

  • Always use schema-qualified table names (e.g., schema.table_name)

  • Only SELECT queries are accepted

  • Use parameterized queries for user-provided values

list-tablesC

List all tables in a schema

describe-tableB

Get the structure of a table (columns, types, nullability, defaults)

list-schemasB

List all user-defined schemas in the database

list-environmentsB

List all configured database environments

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

Disambiguation5/5

Each tool has a clearly distinct target: query executes SQL, list-tables and list-schemas enumerate metadata, describe-table inspects a single table's structure, and list-environments reports configured connections. There is no meaningful overlap between any pair.

Naming Consistency4/5

Four tools follow a clean verb_noun kebab-case pattern (list-tables, describe-table, list-schemas, list-environments) with uniform casing. The lone exception is 'query', a bare verb with no object, which is a minor deviation from the established pattern.

Tool Count5/5

Five tools is well-scoped for a read-only database accessor: one execution tool plus four discovery/introspection tools. Nothing feels redundant or missing at the count level.

Completeness4/5

The surface covers the natural discovery-to-query workflow (schemas → tables → structure → SQL), and omitting writes is intentional for a read-only server. Minor gaps exist, such as listing views/indexes or an EXPLAIN tool, but core workflows are fully supported.

Maintenance

ActivityInactive
ResponsivenessNo issues