Skip to content
appsgit

MCP Grafana

MCP Grafana is an MCP server that adds cloud and DevOps tools to AI assistants such as Claude Desktop, Claude Code and Cursor. An MCP server giving access to Grafana dashboards, data… It has 3,530 GitHub stars, is released under the Apache-2.0 license and runs locally with docker run -i --rm -e GRAFANA_URL -e GRAFANA_SERVICE_ACCOUNT_TOKEN -e GRAFANA_PASSWORD docker.io/grafana/mcp-grafana:2.0.1.

github.com/grafana/mcp-grafana (opens in a new tab)

Install MCP Grafana

Generated from the server's MCP registry entry. Replace your-value with your own values.

Claude Desktop

claude_desktop_config.json
{
  "mcpServers": {
    "mcp-grafana": {
      "command": "docker",
      "args": [
        "run",
        "-i",
        "--rm",
        "-e",
        "GRAFANA_URL",
        "-e",
        "GRAFANA_SERVICE_ACCOUNT_TOKEN",
        "-e",
        "GRAFANA_PASSWORD",
        "docker.io/grafana/mcp-grafana:2.0.1"
      ],
      "env": {
        "GRAFANA_URL": "your-value",
        "GRAFANA_SERVICE_ACCOUNT_TOKEN": "your-value",
        "GRAFANA_PASSWORD": "your-value"
      }
    }
  }
}

Settings > Developer > Edit Config. macOS: ~/Library/Application Support/Claude/, Windows: %APPDATA%\Claude\. Restart Claude Desktop afterwards.

Claude Code

claude mcp add --env GRAFANA_URL=your-value --env GRAFANA_SERVICE_ACCOUNT_TOKEN=your-value --env GRAFANA_PASSWORD=your-value --transport stdio mcp-grafana -- docker run -i --rm -e GRAFANA_URL -e GRAFANA_SERVICE_ACCOUNT_TOKEN -e GRAFANA_PASSWORD docker.io/grafana/mcp-grafana:2.0.1

Cursor

.cursor/mcp.json
{
  "mcpServers": {
    "mcp-grafana": {
      "type": "stdio",
      "command": "docker",
      "args": [
        "run",
        "-i",
        "--rm",
        "-e",
        "GRAFANA_URL",
        "-e",
        "GRAFANA_SERVICE_ACCOUNT_TOKEN",
        "-e",
        "GRAFANA_PASSWORD",
        "docker.io/grafana/mcp-grafana:2.0.1"
      ],
      "env": {
        "GRAFANA_URL": "your-value",
        "GRAFANA_SERVICE_ACCOUNT_TOKEN": "your-value",
        "GRAFANA_PASSWORD": "your-value"
      }
    }
  }
}

Project file; use ~/.cursor/mcp.json to enable it in every project.

VS Code

.vscode/mcp.json
{
  "inputs": [
    {
      "type": "promptString",
      "id": "grafana_service_account_token",
      "description": "GRAFANA_SERVICE_ACCOUNT_TOKEN",
      "password": true
    },
    {
      "type": "promptString",
      "id": "grafana_password",
      "description": "GRAFANA_PASSWORD",
      "password": true
    }
  ],
  "servers": {
    "mcp-grafana": {
      "type": "stdio",
      "command": "docker",
      "args": [
        "run",
        "-i",
        "--rm",
        "-e",
        "GRAFANA_URL",
        "-e",
        "GRAFANA_SERVICE_ACCOUNT_TOKEN",
        "-e",
        "GRAFANA_PASSWORD",
        "docker.io/grafana/mcp-grafana:2.0.1"
      ],
      "env": {
        "GRAFANA_URL": "your-value",
        "GRAFANA_SERVICE_ACCOUNT_TOKEN": "${input:grafana_service_account_token}",
        "GRAFANA_PASSWORD": "${input:grafana_password}"
      }
    }
  }
}

Claude Code (remote)

claude mcp add --transport http mcp-grafana "https://mcp.grafana.com/mcp"

The same server is also hosted as a remote MCP endpoint, so nothing runs on your machine.

Config formats checked against the official docs on Oct 7, 2026: modelcontextprotocol.io (opens in a new tab), code.claude.com (opens in a new tab), cursor.com (opens in a new tab), code.visualstudio.com (opens in a new tab).

Environment variables

Variables the server reads at startup.

NameRequiredDescription
GRAFANA_URLYesURL to your Grafana instance
GRAFANA_SERVICE_ACCOUNT_TOKENsecretNoService account token used to authenticate with your Grafana instance
GRAFANA_USERNAMENoUsername to authenticate with your Grafana instance
GRAFANA_PASSWORDsecretNoPassword to authenticate with your Grafana instance
GRAFANA_ORG_IDNoOrganization ID for multi-org support. Can also be set via X-Grafana-Org-Id header in SSE/streamable HTTP transports.
GRAFANA_EXTRA_HEADERSNoJSON object of additional HTTP headers to send with all Grafana API requests
GRAFANA_FORWARD_HEADERSNoComma-separated list of HTTP header names to forward from the incoming request to Grafana (SSE/streamable-http only). Example: Cookie,X-Session-Id

Tools (40)

Parsed from the Tools section of the README; check the repository for the current list.

  • list_teams

    Admin

  • list_users_by_org

    Admin

  • list_all_roles

    Admin

  • get_role_details

    Admin

  • get_role_assignments

    Admin

  • list_user_roles

    Admin

  • list_team_roles

    Admin

  • get_resource_permissions

    Admin

  • get_resource_description

    Admin

  • user_info

    User

  • search_dashboards

    Search

  • get_dashboard_by_uid

    Dashboard

  • list_dashboard_versions

    Dashboard

  • update_dashboard

    Dashboard

  • get_dashboard_panel_queries

    Dashboard

  • run_panel_query

    RunPanelQuery*

  • get_dashboard_property

    Dashboard

  • get_dashboard_summary

    Dashboard

  • list_datasources

    Datasources

  • get_datasource

    Datasources

  • get_query_examples

    Examples*

  • query_prometheus

    Prometheus

  • list_prometheus_metric_metadata

    Prometheus

  • list_prometheus_metric_names

    Prometheus

  • list_prometheus_label_names

    Prometheus

  • list_prometheus_label_values

    Prometheus

  • query_prometheus_histogram

    Prometheus

  • list_incidents

    Incident

  • create_incident

    Incident

  • add_activity_to_incident

    Incident

  • update_incident

    Incident

  • get_incident

    Incident

  • list_incident_custom_fields

    Incident

  • query_loki_logs

    Loki

  • list_loki_label_names

    Loki

  • list_loki_label_values

    Loki

  • query_loki_stats

    Loki

  • query_loki_patterns

    Loki

  • analyze_loki_labels

    Loki

  • suggest_loki_alloy_label_config

    Config

About MCP Grafana

A [Model Context Protocol][mcp] (MCP) server for Grafana. This provides access to your Grafana instance and the surrounding ecosystem.

FAQ

MCP Grafana FAQ

Still curious? Email info@appsgit.com.

What is MCP Grafana?

MCP Grafana is an MCP server that adds cloud and DevOps tools to AI assistants such as Claude Desktop, Claude Code and Cursor. An MCP server giving access to Grafana dashboards, data… It has 3,530 GitHub stars, is released under the Apache-2.0 license and runs locally with docker run -i --rm -e GRAFANA_URL -e GRAFANA_SERVICE_ACCOUNT_TOKEN -e GRAFANA_PASSWORD docker.io/grafana/mcp-grafana:2.0.1. The source code is at github.com/grafana/mcp-grafana.

How do I install the MCP Grafana MCP server?

Add the command docker run -i --rm -e GRAFANA_URL -e GRAFANA_SERVICE_ACCOUNT_TOKEN -e GRAFANA_PASSWORD docker.io/grafana/mcp-grafana:2.0.1 to your MCP client: put it in claude_desktop_config.json for Claude Desktop, run claude mcp add for Claude Code, or add it to .cursor/mcp.json (Cursor) or .vscode/mcp.json (VS Code). The snippets on this page are ready to paste.

Is MCP Grafana free?

The server is open source under the Apache-2.0 license, so running it is free. It needs credentials (GRAFANA_SERVICE_ACCOUNT_TOKEN and GRAFANA_PASSWORD) for the service it connects to, which may require a paid account.

Is MCP Grafana actively maintained?

The most recent commit was on Oct 6, 2026. The latest release is v2.0.1, published Oct 6, 2026. appsgit only lists MCP servers with a commit in the last six months and re-checks every server daily.