mcp-prometheus
Server Configuration
Describes the environment variables required to run the server.
| Name | Required | Description | Default |
|---|---|---|---|
| PROMETHEUS_URL | Yes | Base URL, including any path prefix (https://host/prometheus). No credentials in it. | |
| PROMETHEUS_TOKEN | No | Bearer token instead of basic auth. | |
| PROMETHEUS_HEADERS | No | Extra headers as JSON, e.g. {"X-Scope-OrgID":"tenant-1"} for Mimir. | |
| PROMETHEUS_TIMEOUT | No | Query timeout in seconds. | 30 |
| NODE_EXTRA_CA_CERTS | No | Path to a CA certificate for a self-signed certificate. | |
| PROMETHEUS_PASSWORD | No | Basic auth password for a proxy in front of Prometheus. | |
| PROMETHEUS_UI_LINKS | No | Set to 0 to drop the Prometheus UI link from query results. | |
| PROMETHEUS_USERNAME | No | Basic auth username for a proxy in front of Prometheus. | |
| PROMETHEUS_MAX_RETRIES | No | Retries for 429 and proxy 5xx. Query timeouts are never retried. | 2 |
| PROMETHEUS_ALLOW_WRITES | No | Set to 1 to register the admin tools. | 0 |
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 |
|---|---|
| prometheus_auth_statusA | Report which Prometheus this server talks to and whether it answers: the URL, auth mode, Prometheus version, hostname, external labels and retention, and whether the admin API is enabled. When the server is not configured, says exactly what to set. Call this first when a tool you expected is missing, and before trusting numbers from an instance you have not checked — kube-prometheus-stack installs look alike on every cluster, so the URL host is often the only tell. |
| prometheus_queryA | Evaluate a PromQL expression at one instant — the current value of something, or a total/average over a window written into the expression ( |
| prometheus_query_rangeA | Evaluate a PromQL expression over a time range, for how something changed: a spike, a trend, when it started. Each series comes back with stats (min, max, avg, last) and, with view=values, one value per step on a shared grid given by start and step (null where there was no sample) — no per-point timestamps. The step is picked for about 60 points unless given. Many series are expensive: aggregate in the query (sum by), or use view=stats with sort=max to find the outliers first. |
| prometheus_list_metricsA | Find metric names, with their type (counter, gauge, histogram, summary) and help text. |
| prometheus_describe_metricA | Everything needed to query one metric: type, help, unit, how many series it has, and each label with its number of distinct values and examples. Read this before writing a selector — it shows which labels exist to filter and group by, and whether a label is high-cardinality (pod, uid) and so a bad thing to group by. |
| prometheus_list_labelsA | List label names, across everything or only on series matching a selector. To see one metric's labels with their values, prometheus_describe_metric is more useful. |
| prometheus_list_label_valuesA | List the values one label takes — every namespace, job or instance — optionally only on series matching a selector (e.g. the pods of one deployment). Use it to get exact values right before filtering on them, instead of guessing at a regex. |
| prometheus_list_alertsA | List the alerts Prometheus is currently firing or holding as pending, firing first and most severe first, with their labels, summary and description, plus counts by state and severity. This is Prometheus's own view: silences and inhibitions live in Alertmanager and are not applied here, so an alert listed here may not have paged anyone. An always-firing |
| prometheus_list_rulesA | List alerting and recording rules with their PromQL, health and state. Use health=err to find rules that fail to evaluate (their lastError says why) — a broken alert rule never fires, which looks exactly like everything being fine. Use type=record to find a recording rule's name before querying it, since a precomputed series is far cheaper than recomputing it. |
| prometheus_list_targetsA | Scrape health: what Prometheus is failing to collect, and why. Always returns totals and every scrape pool with an unhealthy target; then lists targets, by default only the unhealthy ones with their lastError (a 404 is usually a wrong metrics path or port, a timeout a slow exporter, connection refused a pod not listening). A target that is down means its metrics stop — queries over it go quiet rather than erroring. Only active targets: the dropped ones (filtered out by relabeling) run to megabytes and are never fetched. |
| prometheus_get_tsdb_statusA | Cardinality: how many series the head block holds, and which metrics, labels and label pairs account for most of them and of the memory. Use it to explain a slow or memory-hungry Prometheus, or before grouping by a label that might have thousands of values. Covers the head block only (the last ~2-3 hours), not the full retention. |
| prometheus_requestA | Escape hatch: GET any /api/v1 endpoint the other tools do not wrap — /api/v1/query_exemplars, /api/v1/targets/metadata, /api/v1/alertmanagers, /api/v1/format_query, /api/v1/status/walreplay. The answer is the raw |
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 12 tools
Each tool targets a distinct resource or action: instant vs. range queries are explicitly contrasted, and list_labels / list_label_values / describe_metric are differentiated with cross-references (e.g. 'describe_metric is more useful' for one metric's labels). The only potential overlap, prometheus_request, is explicitly framed as a read-only escape hatch with guidance to prefer the named tools.
All names share the prometheus_ snake_case prefix and are mostly verb_noun (query, query_range, list_metrics, describe_metric, get_tsdb_status). Minor deviations are auth_status (noun phrase) and request (bare verb), but the set remains predictable and readable.
Twelve tools is well within a healthy range and each earns its place: query, discovery, alerts/rules, target health, TSDB cardinality, and a raw escape hatch. No tool appears redundant with another.
The read-only Prometheus surface is broadly covered: queries, metric/label discovery, alerts, rules, targets, TSDB status, and auth/version checks. A dedicated series-lookup tool (/api/v1/series) and explicit config/flags endpoints are absent, but the request escape hatch lets agents work around these gaps.