Prometheus MCP vs MCP Grafana

A side-by-side look at the Prometheus MCP and MCP Grafana MCP servers: transport, auth, tools, quality signals, and the config to install either one in Claude, Cursor, Windsurf or VS Code.

Prometheus MCP logoPrometheus MCPMonitoring · Local subprocess (stdio)Prometheus MCP — query metrics, inspect alerts, and explore scrape targets (read-only).56GoodAuth: not declaredMCP Grafana logoMCP GrafanaMonitoring · Local subprocess (stdio)Search dashboards, investigate incidents and query datasources in your Grafana instance68GreatAuth: api key required

Verdict: choose Prometheus MCP for monitoring work as a local process; choose MCP Grafana for monitoring as a local process. You can also run both side by side in one mcpServers block.

Which MCP server should you choose?

Prometheus MCP logoChoose Prometheus MCP when

  • You need dedicated capabilities in the Monitoring domain.
  • You prefer a local stdio subprocess transport.
  • You have the keys it needs: PROMETHEUS_URL, PROMETHEUS_TOKEN, PROMETHEUS_USERNAME, PROMETHEUS_PASSWORD, PROMETHEUS_SSL_VERIFY.
  • You want tools like prometheus_list_metrics, prometheus_query, prometheus_query_range.
Explore Prometheus MCP

MCP Grafana logoChoose MCP Grafana when

  • You need dedicated capabilities in the Monitoring domain.
  • You prefer a local stdio subprocess transport.
  • Its auth model fits you: API key required.
  • You have the keys it needs: GRAFANA_URL, GRAFANA_SERVICE_ACCOUNT_TOKEN.
  • You want tools like add_activity_to_incident, alerting_manage_routing, alerting_manage_rules.
Explore MCP Grafana

Feature & specification comparison

Rows where the two servers differ are marked.

SpecPrometheus MCP logoPrometheus MCPMCP Grafana logoMCP Grafana
CategoryMonitoringMonitoring
Quality signal56/100 · Good68/100 · Great
Install commandConfirmedConfirmed
TransportLocal subprocess (stdio)Local subprocess (stdio)
AuthNot declaredAPI key required
PricingNot declaredFree
Required env varsPROMETHEUS_URLPROMETHEUS_TOKENPROMETHEUS_USERNAMEPROMETHEUS_PASSWORDPROMETHEUS_SSL_VERIFYGRAFANA_URLGRAFANA_SERVICE_ACCOUNT_TOKEN
Verified ownerCommunity listingCommunity listing
GitHub stars03,595
Directory activity 5 views 0 installs 0 upvotes 6 views 0 installs 0 upvotes
Tools2181

Tools & capabilities

Prometheus MCP tools 21

  • prometheus_list_metricsList all metric names known to Prometheus, with optional substring filter. Wraps ``GET /api/v1/label/__name__/values``. Prometheus returns all metric names at once — no pagination. Output is capped at 500 metrics after filtering, with a truncation hint when more exist. Use this first to discover valid metric names before writing PromQL expressions for ``prometheus_query`` or ``prometheus_query_range``. Examples: - Use when: "What metrics does Prometheus have about HTTP requests?" → ``pattern='http'``; read the ``metrics`` list. - Use when: "List all node_exporter metrics" → ``pattern='node_'``. - Use when: Starting a monitoring investigation — list metrics first to discover what's instrumented, then query specific ones. - Don't use when: You already know the exact metric name and want to query its value (call ``prometheus_query`` directly — one fewer round trip). - Don't use when: You want to see current alert state (call ``prometheus_list_alerts``). Returns: dict with ``total_count`` / ``returned_count`` / ``truncated`` / ``pattern`` / ``metrics`` (sorted list).
  • prometheus_queryExecute an instant PromQL query against Prometheus. Wraps ``GET /api/v1/query``. Returns the result type (vector, scalar, matrix, string) and a list of samples each carrying labels, timestamp, and value. For ``vector`` results each element is one time series at the evaluation instant. Examples: - Use when: "Is the payment service up right now?" → ``query='up{job="payment-service"}'``. - Use when: "What is the current HTTP request rate?" → ``query='sum(rate(http_requests_total[5m])) by (job)'``. - Use when: "Show me all metrics for a specific instance" → ``query='{instance="localhost:9090"}'``. - Don't use when: You want to see how a metric changed over time (call ``prometheus_query_range`` with start/end/step). - Don't use when: You don't know the metric name yet (call ``prometheus_list_metrics`` first to discover names). Returns: dict with ``query`` / ``time`` / ``result_type`` / ``result_count`` / ``data`` (list of samples with ``labels``, ``timestamp``, ``value``).
  • prometheus_query_rangeExecute a PromQL range query returning time-series data points. Wraps ``GET /api/v1/query_range``. Returns one series per matching time series, each with labels and a list of ``[timestamp, value]`` pairs. Total points across all series are capped at 5000 with a truncation hint. Prometheus may reject the query with HTTP 422 (bad_data) if the step produces too many data points (> 11,000 per series). Increase the step or narrow the time range if this happens. Note: The Prometheus API does not support filtering by branch or commit in this endpoint — filters are expressed purely in PromQL label matchers. Examples: - Use when: "Show me CPU usage over the last hour with 1-minute resolution" → ``query='rate(node_cpu_seconds_total[5m])'``, ``step='1m'``. - Use when: "Graph HTTP error rate for the last 24 hours" → ``query='rate(http_requests_total{status=~"5.."}[5m])'``, ``start='2024-01-15T00:00:00Z'``, ``end='2024-01-16T00:00:00Z'``, ``step='5m'``. - Use when: Investigating a past incident — pick the time window of the incident and use a fine step. - Don't use when: You only want the current value (call ``prometheus_query`` — faster and simpler). - Don't use when: You want alert history (call ``prometheus_list_alerts``). Returns: dict with ``query`` / ``start`` / ``end`` / ``step`` / ``result_type`` / ``series_count`` / ``total_points`` / ``truncated`` / ``data`` (list of series with ``labels``, ``point_count``, ``values``).
  • prometheus_list_alertsList all active and pending alerts from Prometheus. Wraps ``GET /api/v1/alerts``. Returns every alert that Prometheus currently tracks, with labels (including ``alertname``, ``severity``), state (``firing`` / ``pending``), the time it became active, and its current value. Also returns a summary grouped by state and a count by severity label. Examples: - Use when: "Are there any firing alerts right now?" → check ``firing_count`` and ``alerts`` where ``state='firing'``. - Use when: "Show me all critical alerts" → filter ``alerts`` by ``labels.severity == 'critical'``. - Use when: Checking system health during an incident — list alerts first to understand what's firing before querying metrics. - Don't use when: You want historical alert data (Prometheus stores only current state; use Alertmanager or a recording rule for history). - Don't use when: You want raw metric values (call ``prometheus_query`` or ``prometheus_query_range``). Returns: dict with ``total_count`` / ``firing_count`` / ``pending_count`` / ``state_summary`` / ``alerts`` (list with ``labels``, ``annotations``, ``state``, ``active_at``, ``value``). Enhanced with correlation information when requested.
  • prometheus_list_targetsList Prometheus scrape targets, summarised by job and health. Wraps ``GET /api/v1/targets``. Returns scrape targets with job name, instance address, health status (``up`` / ``down`` / ``unknown``), last scrape duration in milliseconds, and any last error. Also returns a summary grouped by job and health state. Examples: - Use when: "Which targets are currently down?" → filter ``targets`` where ``health='down'`` and check ``last_error``. - Use when: "How many instances of the 'node-exporter' job are up?" → check ``job_summary`` for the 'node-exporter' entry. - Use when: Investigating a scrape failure — list targets for the affected job to see which instances have errors. - Don't use when: You want metric values from a target (call ``prometheus_query`` with label matchers instead). - Don't use when: You want alert status (call ``prometheus_list_alerts`` instead). Returns: dict with ``state_filter`` / ``total_count`` / ``up_count`` / ``down_count`` / ``unknown_count`` / ``job_summary`` (per-job health counts) / ``targets`` (list with ``job``, ``instance``, ``health``, ``last_scrape_duration_ms``, ``last_error``, ``labels``).
  • prometheus_get_metric_metadataGet metric metadata (HELP text, TYPE, UNIT) from Prometheus. Wraps ``GET /api/v1/metadata``. Returns the metadata that Prometheus scraped from ``HELP``, ``TYPE``, and ``UNIT`` lines in the exposition format. Each metric may have multiple metadata entries if different scrape targets expose different help strings. Use this to understand what a metric measures, its type (counter, gauge, histogram, summary), and unit — essential for writing correct PromQL. For example, knowing a metric is a counter means you should use ``rate()`` or ``increase()``; a gauge can be used directly. Examples: - Use when: "What does http_requests_total measure?" → ``metric='http_requests_total'``; read ``help`` and ``type``. - Use when: "Show me all histogram metrics" → call with no filter; filter results where ``type='histogram'``. - Use when: Starting an investigation — check metric types before writing PromQL to avoid using rate() on a gauge. - Don't use when: You already know the metric type and want to query values (call ``prometheus_query`` directly). Returns: dict with ``metric`` / ``total_count`` / ``returned_count`` / ``truncated`` / ``metadata`` (dict of metric name → list of ``{type, help, unit}``).
  • prometheus_list_label_valuesList all values for a specific label from Prometheus. Wraps ``GET /api/v1/label/{label_name}/values``. Returns all distinct values for the named label across all time series, optionally filtered by a series selector. Use this to discover what entities exist for a given label dimension — for example, which jobs are running, which instances are scraped, or which namespaces have metrics. This is essential for building targeted PromQL queries during investigation. Examples: - Use when: "What jobs does Prometheus scrape?" → ``label='job'``; read the ``values`` list. - Use when: "What instances are in the 'node-exporter' job?" → ``label='instance'``, ``match='{job="node-exporter"}'``. - Use when: "What namespaces have metrics?" → ``label='namespace'``. - Don't use when: You want metric names (call ``prometheus_list_metrics`` — has substring filtering). - Don't use when: You want current metric values (call ``prometheus_query`` with a PromQL expression). Returns: dict with ``label`` / ``match`` / ``total_count`` / ``returned_count`` / ``truncated`` / ``values`` (sorted list).
  • prometheus_list_rulesList recording and alerting rules from Prometheus. Wraps ``GET /api/v1/rules``. Returns rule groups with their rules, including the PromQL expression, rule type (recording or alerting), and for alerting rules their current state (firing/pending/inactive). Use this to understand the alerting configuration, find recording rules that pre-compute useful aggregations, and investigate which rules are currently firing or have health issues. Examples: - Use when: "What alerting rules are configured?" → ``type='alert'``; inspect rule names and expressions. - Use when: "Are there any recording rules I can use instead of computing aggregations from scratch?" → ``type='record'``; look for rules matching your investigation. - Use when: "Why is this alert firing? What's its PromQL expression?" → call with no filter; find the alert by name; read its ``query``. - Don't use when: You want to see which alerts are currently firing (call ``prometheus_list_alerts`` — shows active alerts with state and value, without the PromQL definition). Returns: dict with ``type_filter`` / ``total_groups`` / ``total_rules`` / ``recording_count`` / ``alerting_count`` / ``groups`` (list of rule groups with ``name``, ``file``, ``rule_count``, ``rules``).
  • alertmanager_list_silencesList all silences from Alertmanager. Wraps ``GET /api/v2/silences``. Returns silences with matchers, status (active/pending/expired), creator, comment, and time bounds. Use this to understand which alerts are currently silenced and why. During incident handoffs, knowing what's silenced is critical — a silenced alert is invisible in Prometheus ``/alerts``. Examples: - Use when: "Is the HighCPU alert silenced?" → search silences for matching matchers. - Use when: "Who silenced alerts for the payment service?" → check ``createdBy`` and ``comment``. - Don't use when: You want active firing alerts (call ``alertmanager_list_alerts``). Returns: dict with ``total_count`` / ``active_count`` / ``pending_count`` / ``expired_count`` / ``silences`` (list with matchers, status, etc.).
  • alertmanager_list_alertsList alerts from Alertmanager with suppression state. Wraps ``GET /api/v2/alerts``. Returns alerts with their status (active/suppressed/unprocessed), silence IDs, and inhibition IDs. Unlike ``prometheus_list_alerts``, this shows WHY an alert is or isn't firing — suppressed alerts include ``silencedBy`` and ``inhibitedBy`` arrays. Examples: - Use when: "Why isn't the HighCPU alert firing?" → check if it's suppressed (silencedBy or inhibitedBy). - Use when: "Show all suppressed alerts" → filter by ``status.state == 'suppressed'``. - Don't use when: You want Prometheus-side alert state (call ``prometheus_list_alerts``). Returns: dict with ``total_count`` / ``active_count`` / ``suppressed_count`` / ``unprocessed_count`` / ``alerts`` (list with status, silencedBy, etc.).
  • alertmanager_get_statusGet Alertmanager cluster status, version, and config. Wraps ``GET /api/v2/status``. Returns cluster state (ready/settling), version info, uptime, and the raw configuration YAML. Examples: - Use when: "Is Alertmanager healthy?" → check ``cluster_status``. - Use when: "What version of Alertmanager is running?" → check ``version_info``. - Don't use when: You want to see active alerts (call ``alertmanager_list_alerts``). Returns: dict with ``cluster_status`` / ``version_info`` / ``uptime`` / ``config_yaml``.
  • alertmanager_list_alert_groupsList alert groups from Alertmanager showing routing topology. Wraps ``GET /api/v2/alerts/groups``. Returns groups with their labels, receiver, and alert count — shows how alerts are grouped for notification. Examples: - Use when: "Why did I get one notification instead of many?" → check which alerts are in the same group. - Use when: "What receiver handles payment alerts?" → find the group and check its receiver. - Don't use when: You want individual alert details (call ``alertmanager_list_alerts``). Returns: dict with ``total_groups`` / ``total_alerts`` / ``groups`` (list with ``labels``, ``receiver``, ``alert_count``).
  • +9 more on the listing page

MCP Grafana tools 81

  • add_activity_to_incidentAdd a note (userNote activity) to an existing incident's timeline using its ID. The note body can include URLs which will be attached as context. Use this to add context to an incident.
  • alerting_manage_routingManage Grafana alerting routing configuration, including notification policies, contact points and time intervals. Notification policies define how alerts are grouped, routed, and which contact points receive them. Time intervals define active/mute periods for alert notifications. When to use: - Understanding how alerts are routed to contact points/receivers - Debugging why an alert went to a specific receiver - Checking grouping, timing, or mute interval settings When NOT to use: - Checking alert rule configuration or state (use alerting_manage_rules)
  • alerting_manage_rulesManage Grafana alert rules with full CRUD capabilities and filtering. When to use: - Understanding why an alert is or isn't firing - Auditing alert rule configuration (queries, conditions, labels, notification settings) - Finding alert rules by state, folder, group, or name - Creating, updating, or deleting alert rules - Comparing rule versions to see what changed When NOT to use: - Checking how alerts are routed to receivers (use alerting_manage_routing)
  • alerting_manage_silencesManage Grafana alerting silences. A silence temporarily suppresses notifications for alerts whose labels match a set of matchers, without changing the alert rules themselves. Operations: - 'list': list existing silences. Optionally filter by rule_uid (matches the __alert_rule_uid__ label) or by matchers. - 'get': retrieve a single silence by silence_id. - 'create': create a new silence. Requires matchers, starts_at, ends_at (RFC3339) and comment. - 'update': modify an existing silence by silence_id. Requires matchers, starts_at, ends_at and comment. The id is only kept when the posted matchers and starts_at match the stored ones, so pass back the starts_at returned by 'get'; otherwise Alertmanager expires the old silence and returns a new id. - 'delete': expire/remove a silence by silence_id. When to use: - Muting noisy or expected alerts during maintenance windows - Inspecting or cleaning up existing silences When NOT to use: - Changing alert rule configuration or state (use alerting_manage_rules) - Changing how alerts are routed to receivers (use alerting_manage_routing)
  • analyze_loki_labelsAudits a Loki label strategy and optionally diagnoses query performance. Returns per-label verdicts, missing base labels, normalisation issues, and a recommended set. Pass datasourceUid for live cardinality or labels for static scoring; both may be combined.
  • check_datasources_healthCheck datasource health. Filter by type or UIDs; omit both to check all.
  • create_annotationCreate a new annotation on a dashboard or panel. Set format to 'graphite' and provide 'what' for Graphite-format annotations.
  • create_datasourceCreate a datasource. If type is ambiguous, call search_plugin_information first; install the plugin if needed. IMPORTANT: always call this tool twice. First call: provide only the type — the tool returns a field schema. After receiving the schema, you MUST ask the user for every required field value explicitly; do not infer or use defaults without user confirmation. Second call: provide the type, the display name in the top-level name argument, schemaReviewed=true, and the fields map populated with values confirmed by the user. Never handle credentials — remind the user to rotate any detected. Returns UID, health check, and a config page link.
  • create_folderCreate a Grafana folder. Provide a title and optional UID. Returns the created folder.
  • create_incidentCreate a new Grafana incident. Requires title, severity, and room prefix. Allows setting status, labels and custom fields. This tool should be used judiciously and sparingly, and only after confirmation from the user, as it may notify or alarm lots of people.
  • create_snapshotCreate a Grafana snapshot from a full dashboard payload. Supports optional expiration and external snapshot fields.
  • delete_annotationPermanently delete an annotation by ID. The annotation cannot be recovered afterwards.
  • +69 more on the listing page

Ready-to-paste client configs

Paste either block (or both) into your client config, e.g. claude_desktop_config.json or ~/.cursor/mcp.json. We only show a config when the install command is confirmed.

Prometheus MCP

mcpServers (Claude Desktop / Cursor)
{
  "mcpServers": {
    "prometheus-mcp": {
      "command": "uvx",
      "args": [
        "prometheus-mcp"
      ],
      "env": {
        "PROMETHEUS_URL": "YOUR_PROMETHEUS_URL_HERE",
        "PROMETHEUS_TOKEN": "YOUR_PROMETHEUS_TOKEN_HERE",
        "PROMETHEUS_USERNAME": "YOUR_PROMETHEUS_USERNAME_HERE",
        "PROMETHEUS_PASSWORD": "YOUR_PROMETHEUS_PASSWORD_HERE",
        "PROMETHEUS_SSL_VERIFY": "YOUR_PROMETHEUS_SSL_VERIFY_HERE"
      }
    }
  }
}

MCP Grafana

mcpServers (Claude Desktop / Cursor)
{
  "mcpServers": {
    "grafana-mcp-grafana": {
      "command": "uvx",
      "args": [
        "mcp-grafana"
      ],
      "env": {
        "GRAFANA_URL": "YOUR_GRAFANA_URL_HERE",
        "GRAFANA_SERVICE_ACCOUNT_TOKEN": "YOUR_GRAFANA_SERVICE_ACCOUNT_TOKEN_HERE"
      }
    }
  }
}

Frequently asked questions

Prometheus MCP is categorized under Monitoring and uses a local stdio subprocess. MCP Grafana belongs to Monitoring and uses a local stdio subprocess. Pick Prometheus MCP for monitoring work and MCP Grafana for monitoring.

Copy the mcpServers block from the config section on this page into your client's config (for example claude_desktop_config.json or ~/.cursor/mcp.json), then fully restart the client.

Prometheus MCP has no declared pricing — check the project's own site. MCP Grafana is listed as free. Auth: api key required. If a server needs environment variables such as API keys, define them under the env key in your client's MCP config.

Yes. MCP clients support multiple servers: add prometheus-mcp and grafana-mcp-grafana as separate keys in the same mcpServers object, and your assistant will call tools from either one.

On AllMCPs, Prometheus MCP has a quality signal of 56/100 (Good) with 5 views, 0 installs and 0 GitHub stars. MCP Grafana has 68/100 (Great) with 6 views, 0 installs and 3,595 GitHub stars.