Skip to main content
Glama
Postgres MCP

Postgres MCP

by freakynit

Server Configuration

Describes the environment variables required to run the server.

NameRequiredDescriptionDefault
POSTGRES_SSLNoWhether to use SSL. Optional boolean value, default false.false
POSTGRES_HOSTYesPostgreSQL database host.
POSTGRES_PORTNoPostgreSQL port. Optional, default 5432.5432
POSTGRES_USERYesPostgreSQL username.
POSTGRES_VERIFYNoVerify server certificate if SSL is true. Optional boolean value, default false.false
POSTGRES_DATABASEYesPostgreSQL database name.
POSTGRES_PASSWORDYesPostgreSQL password.
POSTGRES_CONNECT_TIMEOUTNoConnection timeout in seconds. Optional, default 60.60
POSTGRES_SEND_RECEIVE_TIMEOUTNoQuery timeout in seconds. Optional, default 60.60

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
list_tablesC

List all user tables in the database

describe_tablesA

Get comprehensive table information for one or more tables including columns, indexes, triggers, foreign keys, and constraints

execute_raw_queryB

Execute a SQL query. The system will automatically detect the required permission level and request user approval for write operations and dangerous DDL commands.

switch_databaseB

Switches the active database to the specified one. If an error occurs during the switch, the system automatically reverts back to the previous active database

Prompts

Interactive templates invoked by user choice

NameDescription

No prompts

Resources

Contextual data attached and managed by the client

NameDescription

No resources

TDQS

B3.4/5.0

Scored across 4 tools

Disambiguation5/5

Each tool targets a distinct capability: table listing, schema introspection, SQL execution, and database switching. The only potential overlap is that execute_raw_query can query metadata, but the dedicated list/describe tools are clearly scoped as conveniences.

Naming Consistency5/5

All tools use consistent snake_case with a clear verb_noun pattern (list_tables, describe_tables, execute_raw_query, switch_database). The minor adjective in execute_raw_query does not break the convention.

Tool Count4/5

Four tools is lean but reasonable for a database MCP server, and each tool has a clear role. Slightly under-provisioned for broader database workflows, but still within a well-scoped range.

Completeness4/5

The surface covers core discovery, schema inspection, arbitrary SQL execution, and database switching. Minor gaps exist around listing databases or schemas without raw SQL, but execute_raw_query makes these workarounds possible.

Maintenance

ActivityInactive
ResponsivenessNo recent community issues