postgres-mcp-server
Server Configuration
Describes the environment variables required to run the server.
| Name | Required | Description | Default |
|---|---|---|---|
| DATABASE_URL | No | URL de conexión PostgreSQL (alternativa a POSTGRES_URL). | |
| POSTGRES_URL | No | URL de conexión PostgreSQL. | |
| PG_MAX_CONNECTIONS | No | Máximo de conexiones del pool. | 10 |
| POSTGRES_ENABLE_WRITE | No | Habilita INSERT, UPDATE, DELETE, MERGE, COPY. | false |
| TRANSACTION_TIMEOUT_MS | No | Tiempo máximo de transacciones pendientes. | 60000 |
| PG_STATEMENT_TIMEOUT_MS | No | Tiempo máximo de sentencia. | 30000 |
| MAX_CONCURRENT_TRANSACTIONS | No | Máximo de transacciones de escritura abiertas. | 5 |
| POSTGRES_ENABLE_MAINTENANCE | No | Habilita DROP, TRUNCATE, ALTER, CREATE, VACUUM, ANALYZE, REINDEX, GRANT, REVOKE. | false |
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
| Capability | Details |
|---|---|
| tools | {
"listChanged": true
} |
Tools
Functions exposed to the LLM to take actions
| Name | Description |
|---|---|
| execute_queryA | Ejecuta una consulta SQL de solo lectura. Por seguridad corre dentro de una transacción READ ONLY. |
| execute_dml_ddl_dcl_tclA | Ejecuta escritura SQL solo si POSTGRES_ENABLE_WRITE=true. Deja la transacción pendiente hasta commit o rollback. |
| execute_maintenanceA | Ejecuta mantenimiento SQL solo si POSTGRES_ENABLE_MAINTENANCE=true. |
| execute_commitA | Confirma una transacción abierta por execute_dml_ddl_dcl_tcl. |
| execute_rollbackA | Revierte una transacción abierta por execute_dml_ddl_dcl_tcl. |
| list_schemasA | Lista esquemas visibles no internos. |
| list_tablesA | Lista tablas visibles, opcionalmente filtradas por esquema. Usa SQL parametrizado. |
| describe_tableA | Describe columnas, índices y constraints de una tabla. Usa SQL parametrizado. |
Prompts
Interactive templates invoked by user choice
| Name | Description |
|---|---|
No prompts | |
Resources
Contextual data attached and managed by the client
| Name | Description |
|---|---|
No resources | |
TDQS
Scored across 8 tools
Each tool has a distinct role: read-only queries, write operations with explicit transaction control, maintenance commands, and metadata inspection. No two tools could plausibly perform the same task, and the transaction lifecycle is clearly separated.
All tools follow a consistent verb_prefix pattern (execute_*, list_*, describe_*) in lowercase snake_case, making the API predictable and easy to navigate.
8 tools is appropriately scoped for a PostgreSQL interaction server, covering query execution, writes, maintenance, transactions, and schema metadata without redundancy.
The set covers the full lifecycle of SQL execution: reads, writes, transaction commit/rollback, maintenance operations, and essential schema discovery. It lacks some advanced catalog queries, but the core domain is well-covered.