multigres-mcp
Server Configuration
Describes the environment variables required to run the server.
| Name | Required | Description | Default |
|---|---|---|---|
| DATABASE_URI | Yes | Connection string of the Multigres gateway. Required. | |
| MULTIGRES_ADMIN_URL | No | multiadmin HTTP address. The cluster tools are registered only when this is set. | |
| MULTIGRES_ADMIN_TOKEN | No | Bearer token for multiadmin started with --enable-auth. | |
| MULTIGRES_NODE_HOST_MAP | No | reported=reachable host pairs, comma separated, for direct node connections used by read_node_log and the node option of diagnose and get_top_queries. | |
| MULTIGRES_MCP_ACCESS_MODE | No | Access mode: restricted (read-only) or unrestricted (adds the write tools). | restricted |
| MULTIGRES_MCP_SQL_TIMEOUT | No | Statement timeout for the SQL every tool sends. | 25s |
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
} |
| logging | {} |
Tools
Functions exposed to the LLM to take actions
| Name | Description |
|---|---|
| analyze_query_indexesA | Recommend indexes for up to 10 SELECT queries you give, each with weight 1, by the same hypothetical-index search as analyze_workload_indexes, with its 10% rule, max_index_size_mb and 30 second limit. Returns the same parts: CREATE INDEX statements with estimated sizes and costs, skipped queries with reasons, and each query's cost before and after. A query may hold values or $1-style placeholders; one with placeholders is costed with a generic plan. Statements that are not a SELECT are skipped with the reason. Nothing is created. Needs hypopg. |
| analyze_workload_indexesA | Recommend indexes for this database's workload: the pg_stat_statements queries with at least 50 calls and 5 ms mean time, up to 100 by total time. Candidates are indexes on 1 to 3 columns that the queries filter, join, sort or group on, each tried as a hypothetical index (hypopg) and compared by planner cost. A greedy search adds one at a time while an addition lowers the workload cost by at least 10%, is worth its size and keeps the total within max_index_size_mb; it ends 30 seconds after the analysis starts, keeping what it has chosen by then. Nothing is created. Returns CREATE INDEX statements with estimated sizes and costs, skipped queries with reasons, and each query's cost before and after. Needs pg_stat_statements and hypopg. For queries you choose, use analyze_query_indexes. |
| diagnoseA | Run health checks (bloat, vacuum, locks, activity, waits, slow queries, missing indexes, cache, log, index health, sequences, replication, constraints), after the statistics period of the node that answered. |
| execute_sqlA | Run one read-only SQL statement (SELECT, EXPLAIN of a SELECT, or SHOW) through the Multigres gateway. The statement is checked before it is sent and runs in a read-only transaction that is always rolled back. Functions must be on the allow list. |
| explain_queryA | Show the execution plan of a SQL query with cost estimates. A query with $1-style placeholders (as in query statistics) is explained with a generic plan. Hypothetical indexes need the hypopg extension. |
| get_object_detailsA | Show the columns (data type, nullability, default), constraints and indexes of a table or view, the data type, start and increment of a sequence, or an extension's version, relocatable flag and schema from pg_extension.extnamespace (schema_name is not used for extension). Read from the system catalogs, so the role's privileges do not hide anything. Use list_objects to find names. |
| get_top_queriesA | Report the slowest or most resource-intensive queries from pg_stat_statements and from the query statistics each Multigres gateway keeps. The two sources cover different periods and are shown separately. |
| list_objectsA | List the tables, views or sequences in one schema, or every extension in the database (schema_name is not used for extension). Rows give the schema, name and type of each table or view, the schema, name and data type of each sequence, or each extension's name, version, relocatable flag and schema from pg_extension.extnamespace. Read from the system catalogs, so the role's privileges do not hide objects. Use list_schemas for schema names and get_object_details for one object. |
| list_schemasA | List all schemas in the database. The multigres schema is internal to Multigres. |
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 9 tools
Each tool has a distinct purpose, and the two index-advisor tools are explicitly differentiated (user-supplied SELECTs vs pg_stat_statements workload), with each description pointing to the other. Minor overlaps remain: diagnose reports slow queries/missing indexes that get_top_queries and the analyzers also cover, and execute_sql can run EXPLAIN of a SELECT overlapping explain_query.
Nearly all tools follow a clean verb_noun or verb_resource pattern (list_objects, list_schemas, get_object_details, get_top_queries, analyze_query_indexes, analyze_workload_indexes, execute_sql, explain_query). The lone exception is the bare verb 'diagnose', a minor deviation in an otherwise predictable scheme.
Nine tools is well within the ideal range and each earns its place: discovery (list_schemas, list_objects), inspection (get_object_details, explain_query), querying (execute_sql, get_top_queries), tuning (two analyzers), and health (diagnose). No tool looks redundant or filler.
The read-only inspection/tuning surface is well covered: schema and object discovery, plan explanation, workload and single-query index advice, and health diagnostics form a coherent lifecycle. Gaps are modest—no tool for server/config settings, database-level listing, or table/index statistics—but these are peripheral to the analytical purpose.