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

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

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

TDQS

C2.6/5.0

Scored across 12 tools

Disambiguation4/5

Most tools have distinct purposes, such as get_alerts for fetching alerts and run_check for executing specific checks. However, list_loki_apps, list_loki_environments, and list_loki_hosts are ambiguous without descriptions, potentially causing confusion about their specific functions and differences.

Naming Consistency5/5

Tool names follow a highly consistent verb_noun pattern throughout, such as list_servers, run_promql, and find_logs. All tools use snake_case without any deviations, making the naming predictable and easy to understand.

Tool Count4/5

With 12 tools, the count is well-suited for a Prometheus monitoring server, covering key operations like listing resources and running queries. It's slightly on the higher side but remains reasonable for the domain, though some tools like the Loki-related ones might be redundant or under-specified.

Completeness3/5

The toolset provides good coverage for querying and listing operations in Prometheus, including alerts, checks, and servers. However, there are notable gaps, such as missing tools for creating or managing alerts, configuring checks, or handling Loki data beyond listing, which limits full lifecycle management in the monitoring domain.

Maintenance

ActivityInactive
ResponsivenessNo issues