postgres-mcp-lab
Server Configuration
Describes the environment variables required to run the server.
| Name | Required | Description | Default |
|---|---|---|---|
| PGSSL | No | SSL mode for database connection. Default: disable | disable |
| PGHOST | No | Database server host. Default: db | db |
| PGPORT | No | Database server port. Default: 5432 | 5432 |
| PGUSER | No | Database user. Default: reader | reader |
| MAX_ROWS | No | Maximum number of rows returned by tools. Default: 100 | 100 |
| PGSSL_CA | No | PEM CA certificate content for verified TLS. Optional. | |
| POOL_MAX | No | Maximum connection pool size. Default: 4 | 4 |
| PGDATABASE | No | Database name. Default: library | library |
| PGPASSWORD | No | Database password. Default: empty | |
| OPENAI_API_KEY | No | OpenAI API key, used when EMBEDDING_PROVIDER=openai. Default empty. | |
| CONNECT_TIMEOUT_MS | No | Database connection timeout in milliseconds. Default: 5000 | 5000 |
| EMBEDDING_PROVIDER | No | Embedding provider: 'hash' (default) or 'openai'. | hash |
| MAX_RESPONSE_BYTES | No | Maximum serialized tool response size in bytes. Default: 65536 | 65536 |
| EMBEDDING_DIMENSIONS | No | Number of embedding dimensions. Default: 64 | 64 |
| EMBEDDING_TIMEOUT_MS | No | Embedding request timeout in milliseconds. Default: 10000 | 10000 |
| OPENAI_EMBEDDING_URL | No | OpenAI embeddings endpoint URL. Default is the public embeddings endpoint. | |
| STATEMENT_TIMEOUT_MS | No | Statement timeout in milliseconds. Default: 5000 | 5000 |
| OPENAI_EMBEDDING_MODEL | No | OpenAI embedding model name. Default: text-embedding-3-small | text-embedding-3-small |
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 |
|---|---|
| queryA | Run a parameterized read-only SELECT with server-enforced row and time limits. |
| schemaC | Inspect schemas, tables, columns, indexes or foreign keys. Repeat for each kind. |
| explainA | Return a JSON execution plan without ANALYZE; the query is not executed. |
| semanticA | Rank rows using pgvector cosine distance. Default hash encoding measures token overlap, not meaning. |
| cypherA | Run read-only Apache AGE Cypher. Supply graph and explicit output column names. |
| healthA | Check PostgreSQL connectivity, read-only settings and installed vector/age versions. |
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 6 tools
Each tool targets a clearly distinct operation: generic SQL, schema inspection, query planning, vector similarity, Cypher graph queries, and health checks. There is little risk of selecting the wrong tool for a given task.
All tool names are single lowercase words, giving a clean and consistent style. However, they mix verbs and nouns (query/explain vs schema/health) rather than following a strict verb_noun pattern.
Six tools is well-scoped for a PostgreSQL lab server covering SQL, schema, plans, vector search, graph queries, and health. Each tool earns its place without redundancy.
The read-only domain is fully covered: arbitrary SQL, schema inspection, execution plans, vector ranking, graph querying, and environment health. No obvious dead ends or missing core operations for the stated purpose.