PgAdmin-MCP
Server Configuration
Describes the environment variables required to run the server.
| Name | Required | Description | Default |
|---|---|---|---|
| PGHOST | No | Host of the PostgreSQL server (alternative direct connection). | |
| PGUSER | No | User for the PostgreSQL server (alternative direct connection). | |
| PGDATABASE | No | Database name for the PostgreSQL server (alternative direct connection). | |
| PGPASSWORD | No | Password for the PostgreSQL server (alternative direct connection). | |
| PG_PROFILE | No | Default profile to use (dev, qa, or default). Optional when using profiles. | dev |
| PG_QA_HOST | No | Host of the QA PostgreSQL server. | |
| PG_QA_PORT | No | Port of the QA PostgreSQL server (optional, defaults to 5432). | |
| PG_QA_USER | No | User for the QA PostgreSQL server. | |
| PG_DEV_HOST | No | Host of the dev PostgreSQL server. | |
| PG_DEV_PORT | No | Port of the dev PostgreSQL server (optional, defaults to 5432). | |
| PG_DEV_USER | No | User for the dev PostgreSQL server. | |
| PG_MAX_ROWS | No | Maximum number of rows returned by queries. | |
| DATABASE_URL | No | PostgreSQL connection URL (e.g. postgres://user:pass@host:port/db). | |
| PG_ALLOW_WRITE | No | Set to true to allow write operations (still subject to database user privileges). | false |
| PG_QA_DATABASE | No | Database name for the QA PostgreSQL server. | |
| PG_QA_PASSWORD | No | Password for the QA PostgreSQL server. | |
| PG_DEV_DATABASE | No | Database name for the dev PostgreSQL server. | |
| PG_DEV_PASSWORD | No | Password for the dev PostgreSQL server. | |
| PG_QUERY_TIMEOUT_MS | No | Statement timeout in milliseconds. |
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_set_profileA | Set the sticky session connection profile to "dev" or "qa" (or "default"). Call when the user says pgprofile=dev, pgprofile=qa, use Dev DB, switch to QA, etc. Later tools reuse this profile automatically — no host/password in chat. Credentials are loaded from PG_DEV_* / PG_QA_* in mcp.json. |
| pg_statusA | Show current sticky PostgreSQL profile, host, database, write mode, and a live SELECT 1 health check. Optional profile arg for a one-shot check without changing the sticky session. |
| pg_list_databasesA | List databases on the active profile server (or optional one-shot profile=dev|qa). |
| pg_list_schemasA | List non-system schemas. Optional database and/or profile (dev|qa) override. |
| pg_list_tablesA | List tables/views for a schema (default public). Optional database and/or profile override. |
| pg_describe_tableA | Describe columns for a table or view. Optional schema, database, and/or profile override. |
| pg_queryA | Run SQL against the sticky session profile (or optional profile=dev|qa for one call). Read-only by default. Optional database name and maxRows. Do not ask the user for connection host/password — use profiles. |
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 7 tools
Each tool maps to a distinct operation: profile management, status, list databases/schemas/tables, describe table, and execute queries. No overlapping purposes.
All tools follow the pg_ prefix with clear verb-ish suffixes (list_*, describe_*, set_*, query). Consistent and predictable pattern.
7 tools is well-scoped for a PostgreSQL browsing and querying server. No redundancy and each tool serves a clear need.
Covers profile switching, metadata exploration, and querying. Missing write operations or schema modification, but core read and navigate workflows are complete.