Data as of

Grafana MCP Server for Claude Code: Setup & Config

Claude Code: Connect MCP assistants to Grafana dashboards, datasources, alerts, and incident workflows.

What you can do with Grafana in Claude Code

Choose it to investigate and manage Grafana observability resources from an MCP assistant.

  • Inspect a dashboard without loading its complete JSON.
  • Add investigation notes to incidents and inspect on-call coverage.

Before you start: Grafana in Claude Code

  • uv
  • Grafana 9.0 or later for full functionality
  • An MCP client
  • A configured Grafana connection and service-account token

The README's quick start uses uvx. Set the instance URL for local Grafana or Grafana Cloud. Several optional query groups and administrative tools are disabled by default.

Grafana Claude Code configuration

  1. Choose Claude Code configuration scope

    For Grafana MCP Server, open Project scope: .mcp.json at the repository root. Project JSON: merge into mcpServers; user scope: use the CLI.

  2. Add Grafana MCP Server to Claude Code

    Use the mcp-grafana entry below in mcpServers. Keep Grafana MCP Server's documented stdio connection fields and your other Claude Code entries.

  3. Check Grafana MCP Server in Claude Code

    Grafana MCP Server: Inspect claude mcp list and /mcp status.

Config file · Project scope: .mcp.json at the repository root

JSON
{
  "mcpServers": {
    "mcp-grafana": {
      "type": "stdio",
      "command": "uvx",
      "args": [
        "mcp-grafana"
      ],
      "env": {
        "GRAFANA_URL": "<URL of your Grafana instance>",
        "GRAFANA_SERVICE_ACCOUNT_TOKEN": "<Grafana service-account token>"
      }
    }
  }
}

CLI (POSIX shell)
claude mcp add-json --scope project 'mcp-grafana' '{"type":"stdio","command":"uvx","args":["mcp-grafana"],"env":{"GRAFANA_URL":"<URL of your Grafana instance>","GRAFANA_SERVICE_ACCOUNT_TOKEN":"<Grafana service-account token>"}}'

Grafana tools available to Claude Code

Grafana's stored tool list documents 40 tools; compare it with Claude Code's connected tool list, because the stored list is not a live check.

add_activity_to_incident

For Grafana's add_activity_to_incident, review the permission request and arguments in Claude Code before approval.

Append an investigation note and optional URL context to an incident.

alerting_manage_routing

For Grafana's alerting_manage_routing, review the permission request and arguments in Claude Code before approval.

Manage notification policies, destinations, and active or muted time intervals.

alerting_routing_write

For Grafana's alerting_routing_write, review the permission request and arguments in Claude Code before approval.

Create Grafana-managed alert contact points with integration settings.

alerting_rules_read

For Grafana's alerting_rules_read, review the permission request and arguments in Claude Code before approval.

Find and inspect alert rules using configuration and state filters.

alerting_rules_write

For Grafana's alerting_rules_write, review the permission request and arguments in Claude Code before approval.

Create, replace, or remove Grafana alert rules.

alerting_silences_read

For Grafana's alerting_silences_read, review the permission request and arguments in Claude Code before approval.

List or retrieve alert notification silences.

alerting_silences_write

For Grafana's alerting_silences_write, review the permission request and arguments in Claude Code before approval.

Create, update, or remove temporary notification suppression rules.

analyze_loki_labels

For Grafana's analyze_loki_labels, review the permission request and arguments in Claude Code before approval.

Assess Loki labels and optionally investigate query performance using live cardinality.

check_datasources_health

For Grafana's check_datasources_health, review the permission request and arguments in Claude Code before approval.

Test datasource health with optional type or UID filtering.

create_annotation

For Grafana's create_annotation, review the permission request and arguments in Claude Code before approval.

Add dashboard or panel annotations, including Graphite-format entries.

create_datasource

For Grafana's create_datasource, review the permission request and arguments in Claude Code before approval.

create_folder

For Grafana's create_folder, review the permission request and arguments in Claude Code before approval.

create_incident

For Grafana's create_incident, review the permission request and arguments in Claude Code before approval.

create_snapshot

For Grafana's create_snapshot, review the permission request and arguments in Claude Code before approval.

delete_annotation

For Grafana's delete_annotation, review the permission request and arguments in Claude Code before approval.

delete_snapshot

For Grafana's delete_snapshot, review the permission request and arguments in Claude Code before approval.

diff_tempo_traces

For Grafana's diff_tempo_traces, review the permission request and arguments in Claude Code before approval.

generate_deeplink

For Grafana's generate_deeplink, review the permission request and arguments in Claude Code before approval.

get_alert_group

For Grafana's get_alert_group, review the permission request and arguments in Claude Code before approval.

get_annotation_tags

For Grafana's get_annotation_tags, review the permission request and arguments in Claude Code before approval.

get_annotations

For Grafana's get_annotations, review the permission request and arguments in Claude Code before approval.

get_assertions

For Grafana's get_assertions, review the permission request and arguments in Claude Code before approval.

get_current_oncall_users

For Grafana's get_current_oncall_users, review the permission request and arguments in Claude Code before approval.

get_dashboard_by_uid

For Grafana's get_dashboard_by_uid, review the permission request and arguments in Claude Code before approval.

get_dashboard_panel_queries

For Grafana's get_dashboard_panel_queries, review the permission request and arguments in Claude Code before approval.

get_dashboard_property

For Grafana's get_dashboard_property, review the permission request and arguments in Claude Code before approval.

get_dashboard_summary

For Grafana's get_dashboard_summary, review the permission request and arguments in Claude Code before approval.

get_datasource

For Grafana's get_datasource, review the permission request and arguments in Claude Code before approval.

get_doc

For Grafana's get_doc, review the permission request and arguments in Claude Code before approval.

get_incident

For Grafana's get_incident, review the permission request and arguments in Claude Code before approval.

get_oncall_shift

For Grafana's get_oncall_shift, review the permission request and arguments in Claude Code before approval.

Read the details of a specific scheduled OnCall shift.

get_panel_image

For Grafana's get_panel_image, review the permission request and arguments in Claude Code before approval.

Render a panel, dashboard, or Explore view as a PNG using Grafana Image Renderer.

get_plugin

For Grafana's get_plugin, review the permission request and arguments in Claude Code before approval.

Check a Grafana plugin's installation and version details.

get_snapshot

For Grafana's get_snapshot, review the permission request and arguments in Claude Code before approval.

Retrieve a snapshot's metadata and dashboard payload by key.

get_tempo_trace

For Grafana's get_tempo_trace, review the permission request and arguments in Claude Code before approval.

Fetch a Tempo trace using its identifier.

get_tempo_traceql_docs

For Grafana's get_tempo_traceql_docs, review the permission request and arguments in Claude Code before approval.

Read TraceQL syntax guidance and examples before composing trace queries.

grafana_api_request

For Grafana's grafana_api_request, review the permission request and arguments in Claude Code before approval.

Call Grafana API endpoints with authentication and optional response filtering.

install_plugin

For Grafana's install_plugin, review the permission request and arguments in Claude Code before approval.

Look up a plugin's latest version or install an explicitly supplied version.

list_alert_groups

For Grafana's list_alert_groups, review the permission request and arguments in Claude Code before approval.

Find OnCall alert groups by state, integration, team, labels, or time range.

list_dashboard_versions

For Grafana's list_dashboard_versions, review the permission request and arguments in Claude Code before approval.

List saved dashboard versions and their authors, timestamps, and messages.

Grafana: full stored tool descriptions

Troubleshooting Grafana in Claude Code

  • If Grafana MCP Server fails to start, check uvx mcp-grafana (from uv, for Python tools), the working directory, and Claude Code's selected scope; inspect claude mcp list and /mcp.
  • Grafana MCP Server: check GRAFANA_SERVICE_ACCOUNT_TOKEN, GRAFANA_URL; keep credentials out of shared .mcp.json.
  • Grafana MCP Server uses stdio here: Claude Code must keep the configured process running; protocol output belongs on stdout and diagnostics on stderr.
  • Known limitation: Full functionality requires Grafana 9.0 or newer.
  • Known limitation: Some query and administrative groups need explicit enabling.
  • Known limitation: Rendering and datasource features have additional service prerequisites.
  • General Claude Code troubleshooting lives in the /clients/claude-code guide.

Grafana MCP Server — details. Claude Code guide

Frequently asked questions

Register Grafana MCP Server with the displayed claude mcp add-json --scope project command, or merge the JSON into .mcp.json at the repository root.