Skip to main content
Glama
yeonkyu-git

MCP Prometheus

by yeonkyu-git

Server Configuration

Describes the environment variables required to run the server.

NameRequiredDescriptionDefault
PROM_URLNoThe default Prometheus server URL used as a fallback.
PROM_ENV_URLSNoA JSON string mapping environment names (e.g., prod, dev_test, dr) to their respective Prometheus URLs. Example: {"prod":"http://...:9090"}
ALERT_CRIT_PCTNoThe threshold percentage for critical alerts.95
ALERT_WARN_PCTNoThe threshold percentage for warning alerts.85
PROM_TIMEOUT_SECNoQuery timeout in seconds for Prometheus requests.15
PROM_BEARER_TOKENNoBearer token for Prometheus authentication if required.
ALERT_SUSTAIN_MINUTESNoThe duration in minutes an alert condition must be sustained.5
PROM_MAX_PARALLEL_CHECKSNoThe maximum number of checks to run in parallel.6
PROM_MAX_SAMPLES_PER_SERIESNoMaximum number of samples allowed per series for Prometheus queries.5000

Capabilities

Features and capabilities supported by this server

CapabilityDetails
tools
{
  "listChanged": false
}
prompts
{
  "listChanged": false
}
resources
{
  "subscribe": false,
  "listChanged": false
}
experimental
{}

Tools

Functions exposed to the LLM to take actions

NameDescription
list_checksB

Return all allowlisted monitoring checks available to the MCP server.

Response:

  • checks[].id: stable check id

  • checks[].name: display name

  • checks[].description: human-readable check description

list_environmentsB

Return configured Prometheus environments and their base URLs.

Response:

  • environments[].key: environment key (for example prod, dev_test, dr)

  • environments[].prom_url: Prometheus URL for that environment

list_serversA

List monitored servers detected from recent up{server_name!=""} series.

Inputs:

  • environment: explicit environment key (highest priority).

  • env_hint: fallback environment hint when environment is not provided.

Behavior:

  • Queries last 10 minutes of up{server_name!=""}.

  • Returns unique targets by (instance, job) with server_name.

list_process_groupsC

Return process group names from process monitoring metrics.

Source metric:

  • namedprocess_namegroup_cpu_seconds_total{job="process_monitoring"}

  • label queried: groupname

get_alertsC

Fetch active alerts from Prometheus /api/v1/alerts.

Filters (exact-match):

  • severity/state/alertname/job/server_name/instance

run_checkA

Run one allowlisted check via Prometheus query_range and return summarized results.

Inputs:

  • check_id: required check id from domain.checks.CHECKS.

  • hours/minutes/days: relative lookback window.

  • start_time_utc_iso/end_time_utc_iso: absolute UTC range (if provided, this is used).

  • end_offset_minutes/end_offset_hours/end_offset_days: shift end time to the past.

  • step: range-query step (example: 1m, 5m, 15m).

  • include_samples: include raw samples in each series summary.

  • server_name: label filter for server_name.

  • instance: label filter for instance (example: host-or-ip:9100). Use this when targeting one exact exporter endpoint.

  • environment/env_hint: environment selector (environment has higher priority).

Filter behavior:

  • If both server_name and instance are provided, both filters are applied.

  • If only one is provided, only that label is applied.

run_all_checksA

Run all allowlisted checks in parallel for the same time range and filters.

Inputs are equivalent to run_check, including:

  • server_name: filter by label server_name

  • instance: filter by label instance (single-target filter)

Note:

  • step is fixed to 5m in this tool to control payload size. Any provided step value is ignored.

list_loki_environmentsD
list_loki_hostsD
list_loki_appsD
find_logsD
run_promqlA

Run custom PromQL.

Guardrail:

  • approved must be True before execution.

Modes:

  • instant=True: use /api/v1/query at a single timestamp.

  • instant=False: use /api/v1/query_range for a time window.

Prompts

Interactive templates invoked by user choice

NameDescription

No prompts

Resources

Contextual data attached and managed by the client

NameDescription

No resources

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/yeonkyu-git/MCP-Prometheus-Loki'

If you have feedback or need assistance with the MCP directory API, please join our Discord server