MCP PostgreSQL Server
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 | {} |
Tools
Functions exposed to the LLM to take actions
| Name | Description |
|---|---|
| connect_dbC | Connect to PostgreSQL database. |
| queryC | Execute a SELECT query |
| validate_sqlB | Validate SQL. Returns the string 'true' if the SQL is valid, or an error message string if invalid. |
| resolve_mentionsC | Trigram search. Resolve mentioned entities to database matches. Returned rows are candidates, not confirmed matches. |
| executeB | Execute an INSERT, UPDATE, or DELETE query |
| list_schemasA | List all schemas in the database |
| list_tablesC | List tables in the database |
| describe_tablesC | Get table structure for single or multiple tables |
| list_vector_tablesA | List tables that have pgvector columns (vector or halfvec), with schema, column, and data type. |
| vector_searchA | Nearest-neighbor search. Embeds each query string and ranks with pgvector. query is an array: one element runs one search; multiple elements run the same search (same table, where, columns, limit) once per element and return grouped results. Pass text_column to fuse each ranking with a lexical list using reciprocal rank fusion (k=60). lexical=fts (default) uses English full text: stems, drops stop words, keeps Arabic, and drops query terms that appear in more than 40% of rows. lexical=trgm uses pg_trgm word_similarity above pg_trgm.word_similarity_threshold. Omit text_column for dense search only. A where clause sets hnsw.iterative_scan=strict_order for that query. hnsw.ef_search is raised when the candidate limit is above 40. Default payload omits embedding and *hash. include_scores defaults to true and adds distance, plus rrf, dense_rank, and lexical_rank when hybrid. Set include_scores false to omit those columns. response_format=markdown returns one markdown table per query element. |
| vector_executeA | Insert or update a vector/halfvec column by embedding text. insert: embed |
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 11 tools
Most tools are clearly distinct: query (SELECT) vs execute (DML), list_* vs describe_*, and vector_search vs resolve_mentions have different modalities. Minor overlap exists between query and execute (both run SQL, split by statement type) and between vector_search and resolve_mentions (both search), but descriptions help disambiguate.
Most tools follow a verb_noun or verb_noun_phrase pattern (connect_db, validate_sql, list_schemas, describe_tables, vector_search). However, 'query' and 'execute' are bare verbs that break the pattern, and 'resolve_mentions' is more descriptive than action-oriented. The mix is readable but not fully consistent.
11 tools is well within the ideal range for a database server and each tool covers a distinct capability (connection, querying, validation, schema introspection, vector operations). No tool feels redundant or excessive.
Core row-level CRUD is covered (query for SELECT, execute for INSERT/UPDATE/DELETE) and schema introspection plus vector features are present. However, there is no DDL support (CREATE/ALTER/DROP), no transaction control, and no explicit disconnect, which are notable gaps for a general PostgreSQL server.