ct-prometheus-mcp-server

v0.1.0
ct-prometheus-mcp-server Checked 8 hours ago Published 5 months ago

MCP stdio server that proxies a Prometheus HTTP API

These tools were reported by the server itself during our smoke test (tools/list), not copied from the README.

instant_query

Execute an instant PromQL query (optionally at a given RFC3339/Unix time). Use to read a metric's current value or a single-point aggregate. Returns {"data": [...]} where the array is the Prometheus result vector.

ParameterTypeDescription
query *string
time

range_query

Execute a range PromQL query over [start, end] at the given step. Use to plot a metric over time. start/end are RFC3339 or Unix timestamps; step is a duration (e.g. "30s", "5m"). Returns {"data": [...]} of range series.

ParameterTypeDescription
end *string
query *string
start *string
step *string

list_metrics

Return all metric names known to Prometheus, as a list of strings. Use to discover what is measurable before writing a PromQL query.

list_labels

Return all label names, optionally filtered to a specific metric. Use to discover dimensions available for grouping/filtering a metric. Returns a list of label-name strings.

ParameterTypeDescription
metric

get_metadata

Return metric metadata, optionally filtered to a specific metric name. Returns the metric-name -> metadata-list map (type/help/unit). Use to learn what a metric means and its unit before querying it.

ParameterTypeDescription
metric

get_targets

Return the current state of all active Prometheus scrape targets. Use to check which targets are up/down and their scrape health. Returns a list of active-target objects.

get_alerts

Return all currently firing/pending alerts as a list of alert objects. Use to see active incidents. For rule definitions use get_alert_rules.

get_alert_rules

Return all alerting and recording rule groups as a list of group objects. Use to inspect rule definitions and thresholds. For currently firing alerts use get_alerts.

series_match

Return time series matching the given label selectors. `match` is a list of PromQL series selectors (e.g. ['up', '{job="api"}']). Returns a list of label-set dicts. Use to enumerate concrete series.

ParameterTypeDescription
match *array
end
start

status_config

Return the full Prometheus runtime configuration object. WARNING: may contain bearer tokens, basic-auth credentials, and TLS key paths — do NOT return raw output to the user or shared context; extract only needed fields, redact credential values, and discard the rest. Use only to inspect a specific config setting (e.g. scrape_interval, external_labels).