Skip to main content
Glama
imangali01

mcp-postgres

by imangali01

Server Configuration

Describes the environment variables required to run the server.

NameRequiredDescriptionDefault
PG_DSNNoPostgreSQL connection string (mutually exclusive with DATABASE_URL and individual PG_* variables)
LOG_SQLNoLog SQL queries (default: false)
PG_HOSTNoPostgreSQL host
PG_PORTNoPostgreSQL port (default: 5432)
PG_USERNoPostgreSQL user
LOG_FILENoOptional log file path
LOG_LEVELNoLog level (default: INFO)
AUDIT_FILENoAudit log file path (default: ./logs/audit.jsonl)
LOG_FORMATNoLog format: text or json (default: text)
PG_SSLMODENoPostgreSQL SSL mode (default: prefer)
PG_DATABASENoPostgreSQL database name
PG_PASSWORDNoPostgreSQL password
DATABASE_URLNoPostgreSQL connection URL (mutually exclusive with PG_DSN and individual PG_* variables)
MCP_MAX_ROWSNoMaximum rows per query result (default: 1000)
MCP_HTTP_HOSTNoHTTP server host (default: 0.0.0.0)
MCP_HTTP_PATHNoHTTP server path (default: /mcp)
MCP_HTTP_PORTNoHTTP server port (default: 8000)
MCP_TRANSPORTNoTransport mode: stdio or http (default: stdio)
MCP_MAX_SQL_LENGTHNoMaximum SQL query length (default: 20000)
MCP_ALLOWED_SCHEMASNoComma-separated list of allowed schemas
MCP_HTTP_AUTH_TOKENNoBearer token for HTTP transport authentication
MCP_MAX_RESULT_BYTESNoMaximum result size in bytes (default: 1000000)
PG_STATEMENT_TIMEOUT_MSNoStatement timeout in milliseconds (default: 30000)
MCP_ALLOW_EXPLAIN_ANALYZENoAllow EXPLAIN ANALYZE (default: false)

Capabilities

Server capabilities have not been inspected yet.

Tools

Functions exposed to the LLM to take actions

NameDescription

No tools

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/imangali01/postgres-mcp'

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