Skip to main content
Glama
ferronicardoso

mcp-postgresql

Server Configuration

Describes the environment variables required to run the server.

NameRequiredDescriptionDefault
PGSSLNoEnable SSL/TLS. Alternative: POSTGRES_SSL.false
PGHOSTNoPostgreSQL host. Alternative: POSTGRES_HOST.localhost
PGPORTNoPostgreSQL port. Alternative: POSTGRES_PORT.5432
PGUSERNoDatabase user. Alternative: POSTGRES_USER.
PGDATABASENoDefault database. Alternative: POSTGRES_DB.postgres
PGPASSWORDNoDatabase password. Alternative: POSTGRES_PASSWORD.
PGPOOL_MAXNoMax pool connections.10
POSTGRES_DBNoAlternative for PGDATABASE.
POSTGRES_SSLNoAlternative for PGSSL.
POSTGRES_HOSTNoAlternative for PGHOST.
POSTGRES_PORTNoAlternative for PGPORT.
POSTGRES_USERNoAlternative for PGUSER.
POSTGRES_PASSWORDNoAlternative for PGPASSWORD.
PGPOOL_IDLE_TIMEOUT_MSNoPool idle timeout in milliseconds.30000

Capabilities

Features and capabilities supported by this server

CapabilityDetails
tools
{}

Tools

Functions exposed to the LLM to take actions

NameDescription
execute_queryA

Executes a SQL query in PostgreSQL and returns rows or affected row count.

list_tablesB

Lists tables in the current database, optionally filtered by schema.

describe_tableA

Returns table structure: columns, types, nullability, defaults, and PK markers.

list_databasesA

Lists all PostgreSQL databases in the server.

get_table_indexesB

Lists indexes for a table with index definition and PK/uniqueness flags.

get_foreign_keysB

Lists foreign keys of a table and their referenced targets.

Prompts

Interactive templates invoked by user choice

NameDescription

No prompts

Resources

Contextual data attached and managed by the client

NameDescription

No resources

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/ferronicardoso/mcp-postgresql'

If you have feedback or need assistance with the MCP directory API, please join our Discord server