mcp-postgres
Server Configuration
Describes the environment variables required to run the server.
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||
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 |
|---|---|
| pg_connectA | Connect to a PostgreSQL server target. If multiple targets are configured, specify which one. Otherwise connects to the default target. |
| pg_disconnectA | Disconnect from a PostgreSQL server target. Omit profile to disconnect all. |
| pg_connection_statusC | Check connection pool health for the active profile or a specific named profile. |
| pg_list_connectionsB | List all configured connection profiles and their status. Each profile represents a PostgreSQL server instance. |
| pg_switch_databaseA | Switch the active connection profile. All subsequent queries will use this profile unless overridden. |
| pg_queryB | Execute a parameterized SQL query. Returns rows as JSON. Use $1, $2, ... for parameters. |
| pg_query_explainA | Run EXPLAIN on a query. mode=plan (default, safe) shows the plan without executing. mode=analyze executes the statement and shows actual timing — requires confirm=true. |
| pg_query_preparedA | [DEPRECATED] Manage named prepared statements: PREPARE, EXECUTE, DEALLOCATE. Prepared statements are session-local and unreliable with connection pools. Use parameterized pg_query instead. |
| pg_schema_listB | List all schemas in the database. |
| pg_table_listB | List tables in the database. Optionally filter by schema name. |
| pg_table_describeA | Describe a table: columns, data types, defaults, nullability, and constraints. |
| pg_index_listA | List indexes for a table with type, columns, uniqueness, and size. |
| pg_constraint_listB | List constraints (primary key, foreign key, unique, check) for a table. |
| pg_view_listB | List views with their definitions. Optionally filter by schema. |
| pg_function_listC | List functions and procedures with their signatures. |
| pg_enum_listC | List all enum types and their values. |
| pg_extension_listA | List installed PostgreSQL extensions with versions. |
| pg_insertB | Insert one or more rows into a table. Returns inserted rows. |
| pg_updateB | Update rows matching a WHERE clause. Requires confirm=true. |
| pg_deleteA | Delete rows matching a WHERE clause. Requires confirm=true. |
| pg_upsertC | Insert or update on conflict. Requires confirm=true. |
| pg_versionB | Get PostgreSQL version string and numeric version. |
| pg_settingsB | Show or search server configuration parameters. |
| pg_reload_configA | Reload server configuration files (postgresql.conf). Requires confirm=true. |
| pg_uptimeB | Show server uptime and start time. |
| pg_database_sizeC | Show size of all databases. |
| pg_table_sizesA | Show table sizes with index and toast breakdown, sorted by total size descending. |
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
- Who's Calling? MCP Hosts Are an Identity Blind Spot (And the Spec Knows It)By Om-Shree-0709 on .mcpAgent IdentityOAuth 2.1
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
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/itunified-io/mcp-postgres'
If you have feedback or need assistance with the MCP directory API, please join our Discord server