Skip to main content
Glama
azmym

postgres-mcp

by azmym

Server Configuration

Describes the environment variables required to run the server.

NameRequiredDescriptionDefault
POSTGRES_MCP_PSQLNoPath to the psql binary, used when psql is not on PATH or to skip the search.
POSTGRES_MCP_CONFIGNoOverride the location of the config file (default: ~/.config/postgres-mcp/config.toml).
POSTGRES_MCP_READ_ONLYNoSet to '1' to force every configured database read-only, regardless of the config file.0

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
}
logging
{}
prompts
{
  "listChanged": false
}
resources
{
  "subscribe": false,
  "listChanged": false
}
extensions
{
  "io.modelcontextprotocol/ui": {}
}
experimental
{}

Tools

Functions exposed to the LLM to take actions

NameDescription
list_databasesA

List the configured PostgreSQL databases and their read-only status.

Returns each database's name, connection target and whether it accepts writes. Passwords are never included.

execute_sqlA

Run SQL against a configured database and return the rows as CSV.

database is a name from list_databases. Whether writes are permitted is fixed by configuration and cannot be changed per call: against a read-only database, only read queries run.

describe_schemaA

Describe a schema's tables, or one table's columns and indexes.

Without table, lists the schema's tables, views and column counts. With table, returns that table's columns, constraints and indexes. Always read-only, even against a writable database.

test_connectionA

Check psql and connectivity, for one database or all of them.

Reports the path to the psql binary, the server version, the connected user, and each database's configured read-only or read-write mode. Omit database to check every configured entry, which also validates the config file.

Prompts

Interactive templates invoked by user choice

NameDescription

No prompts

Resources

Contextual data attached and managed by the client

NameDescription

No resources