← PostgreSQL MCP Server

PostgreSQL MCP Server 1.0.1

npm · @cesarvarela/postgres-mcp · current release

8
Tools
0
Resources
0
Templates
0
Prompts

Observation

Observed 2026-08-22T22:01:32.177Z using mcpSecurity-inventory. Status: succeeded. Negotiated protocol: 2025-06-18.

Server capabilities
{
  "tools": {
    "listChanged": true
  }
}

Tools 8

ToolCategoryAnnotationsRisk
connection-statusCheck database connection status, view error details, and retry connection. Use retry: true to attempt reconnection when database is unavailable.
Input schema
{
  "type": "object",
  "properties": {
    "retry": {
      "type": "boolean",
      "default": false
    }
  },
  "additionalProperties": false,
  "$schema": "http://json-schema.org/draft-07/schema#"
}
— · —
delete-dataDelete records from a table. Requires WHERE conditions for safety. Includes confirmation prompt for large deletions.
Input schema
{
  "type": "object",
  "properties": {
    "table": {
      "type": "string",
      "minLength": 1
    },
    "where": {
      "type": "object",
      "additionalProperties": {}
    },
    "confirm_delete": {
      "type": "boolean",
      "default": false
    },
    "returning": {
      "type": "array",
      "items": {
        "type": "string"
      }
    }
  },
  "required": [
    "table",
    "where"
  ],
  "additionalProperties": false,
  "$schema": "http://json-schema.org/draft-07/schema#"
}
— · —
execute-queryExecute a parameterized SQL query with safety checks. Supports SELECT, INSERT, UPDATE, DELETE operations with parameter binding to prevent SQL injection.
Input schema
{
  "type": "object",
  "properties": {
    "query": {
      "type": "string",
      "minLength": 1
    },
    "params": {
      "type": "array",
      "default": []
    },
    "explain": {
      "type": "boolean",
      "default": false
    }
  },
  "required": [
    "query"
  ],
  "additionalProperties": false,
  "$schema": "http://json-schema.org/draft-07/schema#"
}
— · —
get-schemaGet database schema information including tables, columns, data types, and optionally constraints. Useful for understanding database structure.
Input schema
{
  "type": "object",
  "properties": {
    "schema_name": {
      "type": "string",
      "default": "public"
    },
    "table_pattern": {
      "type": "string"
    },
    "include_columns": {
      "type": "boolean",
      "default": true
    },
    "include_constraints": {
      "type": "boolean",
      "default": false
    }
  },
  "additionalProperties": false,
  "$schema": "http://json-schema.org/draft-07/schema#"
}
— · —
get-table-infoGet detailed information about a specific table including columns, constraints, indexes, and optionally statistics like row count and size.
Input schema
{
  "type": "object",
  "properties": {
    "table": {
      "type": "string",
      "minLength": 1
    },
    "schema_name": {
      "type": "string",
      "default": "public"
    },
    "include_statistics": {
      "type": "boolean",
      "default": true
    }
  },
  "required": [
    "table"
  ],
  "additionalProperties": false,
  "$schema": "http://json-schema.org/draft-07/schema#"
}
— · —
insert-dataInsert new records into a table. Supports single or multiple records, conflict resolution (ignore/update), and returning inserted data.
Input schema
{
  "type": "object",
  "properties": {
    "table": {
      "type": "string",
      "minLength": 1
    },
    "data": {
      "anyOf": [
        {
          "type": "object",
          "additionalProperties": {}
        },
        {
          "type": "array",
          "items": {
            "type": "object",
            "additionalProperties": {}
          }
        }
      ]
    },
    "on_conflict": {
      "type": "string",
      "enum": [
        "error",
        "ignore",
        "update"
      ],
      "default": "error"
    },
    "conflict_columns": {
      "type": "array",
      "items": {
        "type": "string"
      }
    },
    "returning": {
      "type": "array",
      "items": {
        "type": "string"
      },
      "default": [
        "*"
      ]
    }
  },
  "required": [
    "table",
    "data"
  ],
  "additionalProperties": false,
  "$schema": "http://json-schema.org/draft-07/schema#"
}
— · —
query-tableQuery data from a specific table with filtering, pagination, and sorting. Supports WHERE conditions with exact matches, arrays (IN), and LIKE patterns.
Input schema
{
  "type": "object",
  "properties": {
    "table": {
      "type": "string",
      "minLength": 1
    },
    "columns": {
      "type": "array",
      "items": {
        "type": "string",
        "minLength": 1
      }
    },
    "where": {
      "type": "object",
      "additionalProperties": {}
    },
    "pagination": {
      "type": "object",
      "properties": {
        "limit": {
          "type": "integer",
          "minimum": 1,
          "maximum": 1000,
          "default": 50
        },
        "offset": {
          "type": "integer",
          "minimum": 0,
          "default": 0
        }
      },
      "additionalProperties": false
    },
    "sort": {
      "type": "object",
      "properties": {
        "column": {
          "type": "string",
          "minLength": 1
        },
        "direction": {
          "type": "string",
          "enum": [
            "ASC",
            "DESC"
          ],
          "default": "ASC"
        }
      },
      "required": [
        "column"
      ],
      "additionalProperties": false
    }
  },
  "required": [
    "table"
  ],
  "additionalProperties": false,
  "$schema": "http://json-schema.org/draft-07/schema#"
}
— · —
update-dataUpdate existing records in a table. Requires WHERE conditions for safety. Supports complex WHERE clauses and returns updated records.
Input schema
{
  "type": "object",
  "properties": {
    "table": {
      "type": "string",
      "minLength": 1
    },
    "data": {
      "type": "object",
      "additionalProperties": {}
    },
    "where": {
      "type": "object",
      "additionalProperties": {}
    },
    "returning": {
      "type": "array",
      "items": {
        "type": "string"
      },
      "default": [
        "*"
      ]
    }
  },
  "required": [
    "table",
    "data",
    "where"
  ],
  "additionalProperties": false,
  "$schema": "http://json-schema.org/draft-07/schema#"
}
— · —

Resources 0

Resource templates 0

Prompts 0

Let’s talk about MCP security.

Share your details and our security team will contact you.