Grafana (self-hosted)
Plugin that exposes the official Grafana MCP server for AI-assisted observability workflows.
Using Grafana Cloud? Use the Grafana Cloud plugin or the Grafana Cloud connector instead — no Docker or service-account token needed. This plugin is for self-hosted Grafana or token-based setups.
Note: This plugin adds dozens of MCP tools to your context window. Only enable it when you need to interact with a live Grafana instance.
Prerequisites
-
Docker must be installed and running.
-
Create a service account in Grafana with at least Viewer role (or Editor for write operations). Generate a token.
Setup
Claude Code
When you enable the plugin, Claude Code prompts you for:
- Grafana instance URL — e.g.
http://localhost:3000for local, orhttps://<stack>.grafana.netfor Grafana Cloud - Service account token — stored in your system keychain
No shell environment variables required.
Cursor
Export the environment variables before launching Cursor:
export GRAFANA_URL="http://localhost:3000"
export GRAFANA_SERVICE_ACCOUNT_TOKEN="<your token>"
For Grafana Cloud, use your instance URL instead (e.g. https://myinstance.grafana.net).
Available tools
The MCP server provides dozens of tools across these categories:
| Category | Examples |
|---|---|
| Dashboards | search, get summary, get property, patch |
| Datasources | list, get by UID or name |
| Prometheus | PromQL queries, metric metadata, label names/values |
| Loki | LogQL log/metric queries, label metadata, patterns |
| Alerting | list/create/update/delete alert rules, contact points |
| Incidents | search, create, add activity |
| OnCall | schedules, shifts, on-call users, alert groups |
| Navigation | generate deeplinks to dashboards, panels, Explore |
| Annotations | get, create, update, patch, list tags |
See the mcp-grafana README for the full tool reference and RBAC requirements.