# Grafana (MCP server)

> 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 and… It has 3,671 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.3.0.

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,671 |
| License | Apache-2.0 |
| Language | Go |
| Transport | stdio, streamable-http |
| Packages | docker: docker.io/grafana/mcp-grafana:2.3.0 |
| 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.3.0 (Nov 10, 2026) |
| Last commit | Nov 13, 2026 |
| MCP registry name | io.github.grafana/mcp-grafana |

## Install

### Claude Desktop (claude_desktop_config.json)

```json
{
  "mcpServers": {
    "grafana": {
      "command": "docker",
      "args": [
        "run",
        "-i",
        "--rm",
        "-e",
        "GRAFANA_URL",
        "-e",
        "GRAFANA_SERVICE_ACCOUNT_TOKEN",
        "-e",
        "GRAFANA_PASSWORD",
        "docker.io/grafana/mcp-grafana:2.3.0"
      ],
      "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 grafana -- docker run -i --rm -e GRAFANA_URL -e GRAFANA_SERVICE_ACCOUNT_TOKEN -e GRAFANA_PASSWORD docker.io/grafana/mcp-grafana:2.3.0
```

### Cursor (.cursor/mcp.json)

```json
{
  "mcpServers": {
    "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.3.0"
      ],
      "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": {
    "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.3.0"
      ],
      "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 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
- `search_folders`: 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
- `create_folder`: Dashboard
- `list_datasources`: Datasources
- `get_datasource`: Datasources
- `check_datasources_health`: Datasources
- `create_datasource`: Datasources
- `update_datasource`: Datasources
- `get_query_examples`: Examples*
- `query_prometheus`: Prometheus
- `render_grafana_app`: Rendering
- `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

## Similar MCP servers

- [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,861 stars, MIT, official)
- [Omnara](https://appsgit.com/mcp-servers/omnara): Deploy durable AI agents with Omnara, an open-source managed-agent platform. (3,404 stars, Apache-2.0, official)
- [MCP Server Cloudflare](https://appsgit.com/mcp-servers/mcp-server-cloudflare): Product specific Cloudflare MCP servers. (4,470 stars, Apache-2.0, official, needs API key)
- [Thesvg](https://appsgit.com/mcp-servers/thesvg): The open SVG brand library: 7,600+ brand logos and cloud icons (AWS, Azure, GCP) as official SVG. (3,011 stars, MIT)
- [Dagu](https://appsgit.com/mcp-servers/dagu): Self-hostable workflow orchestrator for teams whose main work isn't orchestration. (4,615 stars, GPL-3.0)
- [Kubernetes MCP Server](https://appsgit.com/mcp-servers/kubernetes-mcp-server): A Model Context Protocol (MCP) server for Kubernetes and OpenShift. (2,252 stars, Apache-2.0)

---

Canonical page: https://appsgit.com/mcp-servers/grafana
Source: appsgit (https://appsgit.com), the app store for github. Data from the GitHub API, refreshed daily.
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.
