PostgreSQL MCP Server
Server Configuration
Describes the environment variables required to run the server.
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||
Capabilities
Server capabilities have not been inspected yet.
Tools
Functions exposed to the LLM to take actions
| Name | Description |
|---|---|
| query-tableC | Query data from a specific table with filtering, pagination, and sorting. Supports WHERE conditions with exact matches, arrays (IN), and LIKE patterns. |
| get-schemaB | Get database schema information including tables, columns, data types, and optionally constraints. Useful for understanding database structure. |
| execute-queryC | Execute a parameterized SQL query with safety checks. Supports SELECT, INSERT, UPDATE, DELETE operations with parameter binding to prevent SQL injection. |
| insert-dataC | Insert new records into a table. Supports single or multiple records, conflict resolution (ignore/update), and returning inserted data. |
| update-dataB | Update existing records in a table. Requires WHERE conditions for safety. Supports complex WHERE clauses and returns updated records. |
| delete-dataA | Delete records from a table. Requires WHERE conditions for safety. Includes confirmation prompt for large deletions. |
| get-table-infoB | Get detailed information about a specific table including columns, constraints, indexes, and optionally statistics like row count and size. |
| connection-statusA | Check database connection status, view error details, and retry connection. Use retry: true to attempt reconnection when database is unavailable. |
Prompts
Interactive templates invoked by user choice
| Name | Description |
|---|---|
No prompts | |
Resources
Contextual data attached and managed by the client
| Name | Description |
|---|---|
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/cesarvarela/postgres-mcp'
If you have feedback or need assistance with the MCP directory API, please join our Discord server