Skip to main content
Glama
bysonte

postgres-mcp-server

by bysonte

postgres-mcp-server

Servidor MCP local para PostgreSQL. Está pensado para OpenCode y clientes MCP por stdio.

Objetivo: consultar e inspeccionar bases PostgreSQL con seguridad. La escritura y el mantenimiento vienen apagados por defecto.

Seguridad rápida

  • POSTGRES_ENABLE_WRITE=false por defecto.

  • POSTGRES_ENABLE_MAINTENANCE=false por defecto.

  • Las consultas de lectura corren en BEGIN TRANSACTION READ ONLY.

  • La introspección usa parámetros ($1, $2), no concatena nombres enviados por el usuario.

  • Los logs van a stderr. stdout queda reservado para MCP.

  • Los errores no imprimen contraseñas ni URLs completas con credenciales.

Related MCP server: postgres-mcp

Instalación

npm install
npm run build

Configuración

Variables principales:

Variable

Default

Uso

POSTGRES_URL o DATABASE_URL

requerido

URL de conexión PostgreSQL.

POSTGRES_ENABLE_WRITE

false

Habilita INSERT, UPDATE, DELETE, MERGE, COPY.

POSTGRES_ENABLE_MAINTENANCE

false

Habilita DROP, TRUNCATE, ALTER, CREATE, VACUUM, ANALYZE, REINDEX, GRANT, REVOKE.

PG_STATEMENT_TIMEOUT_MS

30000

Tiempo máximo de sentencia.

PG_MAX_CONNECTIONS

10

Máximo de conexiones del pool.

TRANSACTION_TIMEOUT_MS

60000

Tiempo máximo de transacciones pendientes.

MAX_CONCURRENT_TRANSACTIONS

5

Máximo de transacciones de escritura abiertas.

También podés pasar la URL como primer argumento del binario.

OpenCode

Ejemplo seguro, sin secretos reales:

"DB_ejemplo": {
  "type": "local",
  "command": [
    "node",
    "D:/work/postgres-mcp-server/dist/index.js"
  ],
  "environment": {
    "POSTGRES_URL": "postgresql://USER:PASSWORD@HOST:5432/DB_NAME",
    "POSTGRES_ENABLE_WRITE": "false",
    "POSTGRES_ENABLE_MAINTENANCE": "false",
    "PG_STATEMENT_TIMEOUT_MS": "30000"
  },
  "enabled": true,
  "timeout": 60000
}

Si usás paquete instalado:

"command": ["npx", "-y", "postgres-mcp-server"]

Tools MCP

execute_query

Ejecuta SQL de lectura: SELECT, WITH, EXPLAIN, SHOW.

Entrada:

{ "sql": "SELECT now()" }

execute_dml_ddl_dcl_tcl

Ejecuta escritura solo si POSTGRES_ENABLE_WRITE=true. Deja la transacción abierta y devuelve transaction_id.

Entrada:

{ "sql": "UPDATE users SET active = true WHERE id = 1" }

Después llamá a execute_commit o execute_rollback.

execute_commit

Confirma una transacción pendiente.

{ "transaction_id": "tx_..." }

execute_rollback

Revierte una transacción pendiente.

{ "transaction_id": "tx_..." }

execute_maintenance

Ejecuta mantenimiento solo si POSTGRES_ENABLE_MAINTENANCE=true.

list_schemas

Lista esquemas no internos visibles para el usuario conectado.

list_tables

Lista tablas. Acepta filtro opcional:

{ "schema_name": "public" }

describe_table

Describe columnas, índices y constraints.

{ "schema_name": "public", "table_name": "users" }

Desarrollo

npm ci
npm run build
npm test -- --run --coverage
npm run lint

Los tests usan fakes/mocks. No necesitan una base PostgreSQL real.

CI

GitHub Actions ejecuta Node 20 y 22 con cache npm, build, lint y coverage. El mínimo es 85% en líneas, funciones, ramas y statements.

Más documentación

  • docs/configuracion.md

  • docs/seguridad-sql.md

  • docs/desarrollo.md

Available Tools

8 tools
describe_tableA

Describe columnas, índices y constraints de una tabla. Usa SQL parametrizado.

ParametersJSON Schema
NameRequiredDescriptionDefault
table_nameYesNombre de la tabla
schema_nameNoNombre del esquemapublic

TDQS

A3.8/5.0
Behavior3/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

No annotations are provided, so the description carries the full burden. It does disclose that the tool 'Usa SQL parametrizado', which signals safe query construction, and 'describe' implies read-only behavior. However, it does not explicitly state that it makes no modifications, what privileges are required, or the exact format/shape of the returned metadata.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description consists of two short sentences with no filler. The primary action and target resource are front-loaded, and the note about parameterized SQL adds useful context without bloating the text.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a simple two-parameter introspection tool, the description adequately conveys what the tool does and what it returns (column/index/constraint definitions). The lack of an output schema is somewhat mitigated by the explicit mention of the metadata types, though a bit more detail about the exact return structure would make it complete.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 100%, so both table_name and schema_name are already documented. The tool description adds no additional parameter-specific semantics, but the schema fully covers names and defaults, meeting the baseline.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description uses a specific verb ('describe') and identifies the exact resource ('columnas, índices y constraints de una tabla'), making the tool's function immediately clear. It also distinguishes itself from sibling tools like list_tables and list_schemas by focusing on table structure rather than listing objects.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines3/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The tool's purpose implies when to use it, but it does not provide explicit guidance on when to prefer it over alternatives like execute_query or list_tables. There are no exclusion criteria or conditional context beyond the basic description.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

execute_commitA

Confirma una transacción abierta por execute_dml_ddl_dcl_tcl.

ParametersJSON Schema
NameRequiredDescriptionDefault
transaction_idYesID de transacción

TDQS

A3.9/5.0
Behavior2/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

No hay anotaciones, por lo que la descripción debe asumir toda la carga de transparencia. Solo dice 'Confirma' sin explicar que el commit es permanente, qué sucede con los cambios DML, ni qué ocurre si la transacción no existe o ya fue cerrada. Esto deja importantes comportamientos sin revelar.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Es una sola oración que va directo al propósito, sin redundancias ni información superflua. La estructura es precisa y fácil de procesar.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

La herramienta es simple: un solo parámetro y sin schema de salida. La descripción cubre la operación y la procedencia del transaction_id, pero omite advertencias sobre efectos permanentes o condiciones de error, lo que deja vacíos para un agente que deba invocarla de forma autónoma.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

El schema ya documenta transaction_id como string con minLength 1 y su descripción 'ID de transacción'. La descripción del tool añade contexto valioso: el ID proviene de execute_dml_ddl_dcl_tcl, lo que aclara el origen y uso del parámetro más allá del schema.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

La descripción usa el verbo específico 'Confirma' e identifica claramente el recurso: una transacción abierta por execute_dml_ddl_dcl_tcl. Esto la distingue de sibling tools como execute_rollback y precisa exactamente qué operación realiza.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

La descripción indica cuándo usarla: para confirmar una transacción abierta por execute_dml_ddl_dcl_tcl, lo que establece un contexto secuencial. No menciona explícitamente execute_rollback como alternativa ni criterios de exclusión, pero el contexto de uso es claro.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

execute_dml_ddl_dcl_tclA

Ejecuta escritura SQL solo si POSTGRES_ENABLE_WRITE=true. Deja la transacción pendiente hasta commit o rollback.

ParametersJSON Schema
NameRequiredDescriptionDefault
sqlYesSentencia INSERT/UPDATE/DELETE/MERGE/COPY

TDQS

A3.8/5.0
Behavior4/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

No annotations are provided, so the description carries the burden. It discloses two key behaviors: the write only executes when POSTGRES_ENABLE_WRITE=true, and the transaction is left pending until commit/rollback. This adds context beyond the schema but doesn't cover error handling or what happens if the flag is false.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is two short sentences, front-loading the primary action and adding two crucial constraints (environment variable and transaction state) without extraneous information.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

The tool is simple with one parameter, and the description covers the main behavioral constraints. It could be more complete by clarifying that DDL/DCL/TCL statements are not supported despite the tool name, and what happens when POSTGRES_ENABLE_WRITE is false, but the essential information is present.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

The schema already provides 100% coverage for the 'sql' parameter, listing allowed statement types (INSERT/UPDATE/DELETE/MERGE/COPY). The description does not add additional parameter details, so the baseline 3 is appropriate.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the tool executes SQL write operations and includes the critical condition POSTGRES_ENABLE_WRITE=true and transaction behavior, distinguishing it from siblings like execute_query (reads) and execute_commit/rollback (transaction control). However, the broad name suggests DDL/DCL/TCL support, while the schema restricts to DML writes, creating slight ambiguity.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines3/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description provides a clear condition for use (POSTGRES_ENABLE_WRITE=true) and implies the need for a subsequent commit/rollback, but it does not explicitly compare to alternatives or state that it is for write statements only. Sibling names are available but not referenced.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

execute_maintenanceA

Ejecuta mantenimiento SQL solo si POSTGRES_ENABLE_MAINTENANCE=true.

ParametersJSON Schema
NameRequiredDescriptionDefault
sqlYesSentencia DROP/TRUNCATE/ALTER/CREATE/VACUUM/ANALYZE/REINDEX/GRANT/REVOKE

TDQS

A3.9/5.0
Behavior3/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations provided, the description carries the full burden. It discloses that execution is conditional on an environment variable, which is a useful behavioral trait. However, it does not explain what happens when the flag is false (e.g., error, no-op), nor does it warn about the potentially destructive nature of the allowed SQL statements beyond the schema listing. This partial transparency warrants a 3.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is a single concise sentence that immediately states the tool's purpose and its key condition. There is no wasted information, and the most important aspect (the maintenance gate) is front-loaded.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the tool's simplicity (one parameter, no output schema), the description covers the core purpose and a critical precondition. However, it omits return behavior and error handling, and the absence of an output schema means these details would be useful for the agent to know. Thus, while adequate in some respects, it lacks full completeness.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

The schema has 100% coverage for the single 'sql' parameter with a description listing the allowed statement types. The tool description adds no additional parameter information, so the baseline of 3 applies—the schema already documents the parameter adequately.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description states 'Ejecuta mantenimiento SQL' which clearly identifies the action (execute SQL maintenance) and the resource (SQL statements of a maintenance nature). The condition 'solo si POSTGRES_ENABLE_MAINTENANCE=true' adds a specific execution gate, and the schema further clarifies by listing DROP/TRUNCATE/ALTER/CREATE/VACUUM/ANALYZE/REINDEX/GRANT/REVOKE, distinguishing this from sibling query or general DML/DDL tools.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description provides a clear context for usage: the tool should only be used when POSTGRES_ENABLE_MAINTENANCE=true. This implies a when-not condition as well (if the flag is not true, do not use). However, it does not explicitly mention alternatives among sibling tools like execute_dml_ddl_dcl_tcl, so it falls short of a 5.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

execute_queryA

Ejecuta una consulta SQL de solo lectura. Por seguridad corre dentro de una transacción READ ONLY.

ParametersJSON Schema
NameRequiredDescriptionDefault
sqlYesConsulta SELECT/WITH/EXPLAIN/SHOW

TDQS

A4.1/5.0
Behavior4/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

No annotations are provided, so the description carries the full burden. It discloses that the query is executed inside a READ ONLY transaction for security, which clarifies that the tool cannot modify data. This is a key safety trait beyond what the schema shows. However, it doesn't mention return format, error handling, or limits, leaving some behavioral aspects undisclosed.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is two concise, front-loaded sentences that state the purpose and then a critical safety detail. There is no fluff or redundant information, making it an efficient and well-structured description.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

The tool is simple with one well-documented parameter, and the description covers purpose and safety effectively. However, there is no output schema, and the description does not mention the return format or contents of the result, which is a notable gap for a query execution tool. The READ ONLY transaction context helps, but the lack of return value disclosure makes the description incomplete for an agent deciding whether to use it.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

The schema provides 100% coverage with a description for the 'sql' parameter specifying 'Consulta SELECT/WITH/EXPLAIN/SHOW'. The tool description's 'solo lectura' aligns with the schema but adds no additional parameter-level detail. Since the schema already documents the parameter thoroughly, the baseline of 3 is appropriate.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states 'Ejecuta una consulta SQL de solo lectura' (executes a read-only SQL query), using a specific verb and resource with a clear safety scope. This distinguishes it from siblings like execute_dml_ddl_dcl_tcl, which handle write/modification operations. The schema description reinforces the allowed query types (SELECT/WITH/EXPLAIN/SHOW).

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description explicitly states the tool is for read-only SQL and runs in a READ ONLY transaction, clearly indicating when it should be used. Though it doesn't explicitly name alternative tools for write operations, the read-only constraint is unambiguous and pairs well with sibling names. No explicit exclusions are given, but the context is strong.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

execute_rollbackA

Revierte una transacción abierta por execute_dml_ddl_dcl_tcl.

ParametersJSON Schema
NameRequiredDescriptionDefault
transaction_idYesID de transacción

TDQS

A3.9/5.0
Behavior2/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

No annotations are provided, so the description carries the full burden. It states the primary action (reverting) but does not disclose key behaviors such as whether the transaction must be open, what happens to locks or resources, or whether the operation is irreversible. For a destructive action, this is a notable gap.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is a single, concise sentence that leads with the action verb and the resource. No wasted words, and it is directly to the point.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the tool's simplicity (one parameter, no output schema), the description is minimally viable but lacks important contextual details such as preconditions (transaction must be open), side effects (all changes are lost), and error behavior if the transaction does not exist. It does reference the opening tool, which adds some context, but not enough to be considered complete.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

The input schema already provides 100% coverage for the single parameter. The description adds cross-reference context by implying that transaction_id comes from execute_dml_ddl_dcl_tcl, which helps the agent understand the relationship beyond the schema's generic 'ID de transacción'.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description uses the specific verb 'Revierte' (reverts) and clearly identifies the resource (a transaction opened by execute_dml_ddl_dcl_tcl). This distinguishes it from siblings like execute_commit and execute_query, making the purpose unambiguous.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description clearly implies when to use the tool: when you need to revert a transaction created by execute_dml_ddl_dcl_tcl. It does not explicitly state alternatives or exclusions (e.g., 'use execute_commit to keep changes'), but the context is clear enough for an agent to make a basic decision.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

list_schemasA

Lista esquemas visibles no internos.

ParametersJSON Schema
NameRequiredDescriptionDefault

No parameters

TDQS

A4.2/5.0
Behavior4/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations provided, the description carries the behavioral burden. It adds the key detail that only visible, non-internal schemas are listed, which clarifies a filtering behavior beyond the bare tool name. However, it does not disclose return format or error conditions.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is a single, concise sentence that directly states the tool's function. No unnecessary words or repetition.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the tool's simplicity (no parameters, no annotations, no output schema), the description provides sufficient information for an agent to understand its purpose and scope. It lacks only an explicit note about the return structure, but that is not essential for this operation.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

The tool has zero parameters, so the schema is trivially complete. The description adds no parameter information because none is needed, consistent with the baseline of 4 for no-parameter tools.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description uses the specific verb 'Lista' and identifies the resource as 'esquemas visibles no internos', clearly distinguishing it from sibling tools like list_tables and describe_table, which operate on tables.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines3/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description does not explicitly state when to use this tool versus alternatives, but the scope is clear from the name and description. There is no exclusion or alternative guidance, so usage is only implied.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

list_tablesA

Lista tablas visibles, opcionalmente filtradas por esquema. Usa SQL parametrizado.

ParametersJSON Schema
NameRequiredDescriptionDefault
schema_nameNoNombre del esquema

TDQS

A3.7/5.0
Behavior2/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations provided, the description carries the full burden of behavioral disclosure. It mentions 'Usa SQL parametrizado' (uses parameterized SQL), which hints at safe query construction, but it does not state whether the operation is read-only, what permissions are required, or what the response format looks like. This leaves significant behavioral uncertainty.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is extremely concise: one sentence stating the core function and a short second sentence about parameterized SQL. It is front-loaded with the action and contains no redundant or irrelevant information.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

The tool is simple (1 optional param, no output schema), so the description is reasonably complete, but gaps remain. It does not explicitly state what the returned data looks like (e.g., list of table names) or clarify 'visible tables' in terms of permissions or system tables. Given the absence of annotations and output schema, a bit more detail would improve completeness.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

The schema_description_coverage is 100% since the only parameter schema_name is described as 'Nombre del esquema'. The description adds value by explaining that the filter is optional ('opcionalmente filtradas por esquema'), clarifying the parameter's role beyond just its name.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the tool's function: 'Lista tablas visibles' (lists visible tables), with optional schema filtering. This specific verb+resource distinguishes it from siblings like list_schemas (lists schemas) and describe_table (describes a single table).

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines3/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description implies usage for listing tables, and the optional schema filter gives context, but it does not explicitly state when to prefer this tool over alternatives such as list_schemas or execute_query. No exclusions or alternative recommendations are provided.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections. Dates show when Glama detected each change.

  1. 8 tool updatesv1.0.0
    • First observeddescribe_table
    • First observedexecute_commit
    • First observedexecute_dml_ddl_dcl_tcl
    • First observedexecute_maintenance
    • First observedexecute_query
    • First observedexecute_rollback
    • First observedlist_schemas
    • First observedlist_tables

TDQS

A4.2/5.0
Disambiguation5/5

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.

Naming Consistency5/5

All tools follow a consistent verb_prefix pattern (execute_*, list_*, describe_*) in lowercase snake_case, making the API predictable and easy to navigate.

Tool Count5/5

8 tools is appropriately scoped for a PostgreSQL interaction server, covering query execution, writes, maintenance, transactions, and schema metadata without redundancy.

Completeness5/5

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.

Maintenance

ActivityStale
ResponsivenessNo issues

Resources

Unclaimed servers have limited discoverability.

Looking for Admin?

If you are the server author, to access and configure the admin panel.

Related MCP Connectors

Related MCP Servers

  • A
    license
    B
    quality
    D
    maintenance
    A lightweight Postgres MCP server for safe database exploration and query analysis, read-only by default, with multi-database support.
    4
    4
    MIT
  • A
    license
    A
    quality
    C
    maintenance
    A self-hostable PostgreSQL MCP server for exploring database schemas and running guarded read/write queries with selectable access modes (readonly, readwrite, admin), plus a dry-run confirm workflow for safety.
    14
    1
    MIT
  • A
    license
    A
    quality
    C
    maintenance
    Read-only PostgreSQL database MCP server for safely exploring schema, tables, relationships, and sample data without modification.
    10
    83
    MIT

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

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