grafana-blind-alerts-mcp
Reads Grafana provisioning alert rules and queries their bound datasources through Grafana's proxy API to audit blind/zero-series alert rules and classify them as zero-by-design or orphaned/unverified.
Queries Prometheus datasources bound to Grafana alert rules via Grafana's proxy to detect zero-series results and verify whether the underlying metric or target exists.
Click on "Deploy Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@grafana-blind-alerts-mcp audit my Grafana alert rules for silent blind spots"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
grafana-blind-alerts-mcp
Read-only Model Context Protocol (MCP) server that helps SRE/DevOps teams and AI coding assistants find blind Grafana alert rules — rules marked health=ok and state=Normal whose queries return zero series and can never fire when an incident actually happens.
Based on the two-stage blind-alert methodology documented by Softenq:
Grafana alerting audit: 16 of 209 alert rules could never fire
Why health=ok Still Leaves Blind Spots
Grafana marks an alert rule health=ok as long as Prometheus or Loki returns HTTP 200, even if data.result is empty ([]). Empty results happen for two completely different reasons:
zero_by_design: anabsent()guard on a healthy target, a threshold comparison (temp > 80,state="failed") currently satisfied across live hosts, or a lazy error counter not yet emitted after a restart.orphaned_or_unverified: a renamed or removed metric, a lost scrape job or host label after a migration, or a dead expression hidden behind... or vector(0)/unless.
This read-only MCP server probes each rule's bound datasource through Grafana's proxy API and classifies zero-series rules automatically, failing closed (orphaned_or_unverified) whenever an expression cannot be verified or when any branch of a compound query points to a missing metric or target.
Related MCP server: grafana-mcp-observability
Tools
Tool | What it does |
| Reads |
| Queries each rule's bound Prometheus/Loki datasource proxy, detects zero-series rules (including composite |
| Strips state filters ( |
Quick Start
Requirements: Python >=3.10 and a Grafana Viewer / read-only Service Account token.
export GRAFANA_URL="https://grafana.example.com"
export GRAFANA_TOKEN="your_readonly_viewer_token"
uvx grafana-blind-alerts-mcpOr run from a local checkout:
uv --directory /path/to/grafana-blind-alerts-mcp run grafana-blind-alerts-mcpOptional environment variable:
LAZY_METRICS: comma-separated counter names that only appear on first failure/run (target labels such asjob/instanceare still verified when present).
Claude Desktop / Cursor / Claude Code Config
{
"mcpServers": {
"grafana-blind-alerts": {
"command": "uvx",
"args": ["grafana-blind-alerts-mcp"],
"env": {
"GRAFANA_URL": "https://grafana.example.com",
"GRAFANA_TOKEN": "your_readonly_viewer_token"
}
}
}
}Development & Tests
uv run --with mcp --with httpx --with pytest pytest -vMaintained by Softenq (contact@softenq.com). Licensed under the MIT License.
Available Tools
3 toolsaudit_blind_alert_rulesA
Audit Grafana alert rules to find broken zero-series (blind) rules.
Separates rules that are intentionally silent (zero_by_design, e.g.
absent() guards or live threshold filters) from broken rules whose
underlying metric or target no longer exists (orphaned_or_unverified).
Args: folder: Optional case-insensitive substring to filter by folderUID. limit: Maximum number of rules to inspect (default 200).
Inputs: limit, folder. Returns: result
classify_zero_series_ruleB
Classify a single PromQL or LogQL alert expression without threshold filters.
Args: expr: Full PromQL or LogQL expression returning zero series. datasource_uid: Grafana datasource UID bound to the rule. datasource_type: Either 'prometheus' or 'loki'.
Inputs: expr (required), datasource_uid (required), datasource_type. Returns: result
list_grafana_alert_rulesA
List Grafana-managed alert rules with datasource UIDs and primary queries.
Args: folder: Optional case-insensitive substring to filter by folderUID.
Inputs: folder. Returns: result
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 3 tools
The three tools have clearly distinct scopes: listing alert rules, auditing rules in bulk, and classifying a single alert expression. The boundary between bulk auditing and single-rule classification is explicit through their arguments and descriptions.
All tools use consistent snake_case with a leading action verb: list_, audit_, and classify_. The noun phrases are readable and follow the same general verb_noun convention.
Three tools is well-scoped for a focused Grafana blind-alert auditing server. Each tool serves a distinct part of the workflow: discovery, bulk analysis, and single-expression classification.
The surface covers the core lifecycle of listing rules, auditing them for zero-series issues, and classifying individual expressions. Minor gaps exist, such as no dedicated tool for fetching a specific rule's details or datasource metadata, but these are not blocking for the stated purpose.
Maintenance
Related MCP Connectors
AI SRE for AWS teams: your agent reads security, cost and reliability findings, read-only by default
Detects database migration table locks, terraform cost leaks, and OWASP API flaws.
Diagnose AI workflows for failure, security, and handoff risks — RED/AMBER/GREEN per node.
Run the GOVENANT trust audit on your own AI agents — read-only, aggregate-only. Detects…
Related MCP Servers
- FlicenseAqualityDmaintenanceEnables AI agents to query Prometheus metrics and Loki logs for intelligent alert investigation and troubleshooting. Provides service discovery, metric querying, log searching, and correlation tools to help identify root causes of issues.9-
- AlicenseNot gradedqualityDmaintenanceEnables AI agents to query Grafana dashboards, alerts, and datasources for observability insights and incident investigation.MIT
- AlicenseAqualityDmaintenanceEnables AI assistants to query Grafana datasources (Prometheus/Loki metrics and SQL databases like ClickHouse/Postgres/MySQL) and search or inspect dashboards through natural language, using read-only access to Grafana's API.6MIT
- FlicenseAqualityDmaintenanceEnables assistants to read-only explore and analyze Grafana dashboards and data sources, execute queries against Prometheus and Azure Log Analytics, and run guided investigation workflows.72-