# MCP Grafana (MCP server)

> 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.

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

## Key facts

| Fact | Value |
|---|---|
| Repository | https://github.com/grafana/mcp-grafana |
| GitHub stars | 3,530 |
| License | Apache-2.0 |
| Language | Go |
| Transport | stdio, streamable-http |
| Packages | docker: docker.io/grafana/mcp-grafana:2.0.1 |
| Remote URL | https://mcp.grafana.com/mcp |
| Needs API key | yes |
| Official | yes |
| Works with | Claude Desktop, Claude Code, Cursor, VS Code, Claude.ai, ChatGPT |
| Category | Cloud & DevOps |
| Latest release | v2.0.1 (Oct 6, 2026) |
| Last commit | Oct 6, 2026 |
| MCP registry name | io.github.grafana/mcp-grafana |

## Install

### Claude Desktop (claude_desktop_config.json)

```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

```sh
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)

```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)

```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)

```sh
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 2026-10-07.

## Environment variables

- `GRAFANA_URL` (required): URL to your Grafana instance
- `GRAFANA_SERVICE_ACCOUNT_TOKEN` (secret): Service account token used to authenticate with your Grafana instance
- `GRAFANA_USERNAME`: Username to authenticate with your Grafana instance
- `GRAFANA_PASSWORD` (secret): Password to authenticate with your Grafana instance
- `GRAFANA_ORG_ID`: Organization ID for multi-org support. Can also be set via X-Grafana-Org-Id header in SSE/streamable HTTP transports.
- `GRAFANA_EXTRA_HEADERS`: JSON object of additional HTTP headers to send with all Grafana API requests
- `GRAFANA_FORWARD_HEADERS`: Comma-separated list of HTTP header names to forward from the incoming request to Grafana (SSE/streamable-http only). Example: Cookie,X-Session-Id

## Tools

- `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

## Similar MCP servers

- [Worldmonitor](https://appsgit.com/mcp-servers/worldmonitor): Real-time global intelligence dashboard. AI-powered news aggregation, geopolitical monitoring, and infrastructure tracking in a unified situational awareness interface. (87,920 stars, AGPL-3.0)
- [Netdata](https://appsgit.com/mcp-servers/netdata): Real-time infrastructure monitoring with metrics, logs, alerts, and ML-based anomaly detection. (80,817 stars, GPL-3.0, needs API key)
- [openstatus](https://appsgit.com/mcp-servers/openstatus): Manage monitors, status pages, incidents and maintenances in your openstatus workspace. (9,171 stars, AGPL-3.0, official)
- [MCP Server Cloudflare](https://appsgit.com/mcp-servers/mcp-server-cloudflare): Model Context Protocol (MCP) is a new, standardized protocol for managing context between large language models (LLMs) and external systems. (4,360 stars, Apache-2.0, official, needs API key)
- [Dagu](https://appsgit.com/mcp-servers/dagu): Self-hostable workflow orchestrator for teams whose main work isn't orchestration. (4,289 stars, GPL-3.0)
- [Azure MCP Server](https://appsgit.com/mcp-servers/azure-mcp-server): All Azure MCP tools to create a seamless connection between AI agents and Azure services. (3,738 stars, MIT, official)

---

Canonical page: https://appsgit.com/mcp-servers/mcp-grafana
Source: appsgit (https://appsgit.com), the app store for github. Data from the GitHub API, refreshed nightly.
Machine access: JSON API https://appsgit.com/api/v1/apps (OpenAPI: https://appsgit.com/openapi.json), MCP server https://mcp.appsgit.com/mcp, full index https://appsgit.com/llms-full.txt.
