Grafana MCP Server
@christian-schlichtherle
About Grafana MCP Server
An MCP server for the comprehensive discovery, editing, and testing of dashboards and folders in one or more Grafana clusters.
Config
Add this server to your MCP-compatible client using the configuration below.
{
"mcpServers": {
"grafana": {
"command": "uv",
"args": [
"--directory",
"/ABSOLUTE/PATH/TO/grafana-mcp",
"run",
"main.py"
],
"env": {
"GRAFANA_CLUSTERS": "local=http://localhost:3000 dev=https://dev.example.com/grafana",
"GRAFANA_TOKENS": "dev=glsa_abc123xyz"
}
}
}
}Tools
No tools detected
We auto-extract tools from the README. The maintainer can list them under a ## Tools heading to populate this section.
Overview
What is Grafana MCP Server?
Grafana MCP Server is an MCP (Model Context Protocol) server for discovering, editing, and testing dashboards and folders in one or more Grafana clusters. It enforces a security model based on labels and folders, and is intended for developers and operators managing Grafana resources programmatically.
How to use Grafana MCP Server?
Install dependencies with uv sync or pip install -e ., then set environment variables (GRAFANA_CLUSTERS, GRAFANA_TOKENS, GRAFANA_LABELS, GRAFANA_FOLDER) as needed. Run python main.py to start the server, which exposes MCP tools for discovery, editing, and testing.
Key features of Grafana MCP Server
- Dashboard protection with automatic labeling on creation
- Selective update/deletion only for protected dashboards
- Unrestricted reading of any dashboard
- Configurable access control to specific folders
- Multi-cluster management across Grafana instances
- Comprehensive search API with filtering options
Use cases of Grafana MCP Server
- Manage dashboards across multiple Grafana clusters from a single server
- Enforce access control by restricting operations to labeled or folder-scoped resources
- Copy dashboards between clusters with intelligent UID handling
- Validate dashboard schemas and compare structural differences
- Create snapshots and render panels for visual testing
FAQ from Grafana MCP Server
What are protection labels?
Protection labels are automatically added to dashboards created by Grafana MCP Server. Only dashboards with these labels can be updated or deleted, preventing accidental modifications.
How do I configure multiple Grafana clusters?
Set the GRAFANA_CLUSTERS environment variable as space-separated key=value pairs (e.g., localhost=http://localhost:3000 prod=https://grafana.prod.com). Optionally set GRAFANA_TOKENS for authenticated clusters.
Do I need authentication for local Grafana instances?
No. For local development, you can run Grafana with anonymous authentication enabled (see README for Docker command) and omit the GRAFANA_TOKENS variable. The server defaults to localhost=http://localhost:3000 without tokens.
How do I create a service account token for a production cluster?
Via the Grafana UI: go to Administration → Service Accounts, create an account with the desired role, generate a token (prefixed glsa_), and save it. Then set GRAFANA_TOKENS with the token value.
Can the server overwrite existing dashboards?
No. By design, dashboard creation uses automatic protection labels and prevents accidental overwrites. The copy_dashboard tool includes optional overwrite capabilities.
Frequently asked questions
What are protection labels?
Protection labels are automatically added to dashboards created by Grafana MCP Server. Only dashboards with these labels can be updated or deleted, preventing accidental modifications.
How do I configure multiple Grafana clusters?
Set the `GRAFANA_CLUSTERS` environment variable as space-separated `key=value` pairs (e.g., `localhost=http://localhost:3000 prod=https://grafana.prod.com`). Optionally set `GRAFANA_TOKENS` for authenticated clusters.
Do I need authentication for local Grafana instances?
No. For local development, you can run Grafana with anonymous authentication enabled (see README for Docker command) and omit the `GRAFANA_TOKENS` variable. The server defaults to `localhost=http://localhost:3000` without tokens.
How do I create a service account token for a production cluster?
Via the Grafana UI: go to Administration → Service Accounts, create an account with the desired role, generate a token (prefixed `glsa_`), and save it. Then set `GRAFANA_TOKENS` with the token value.
Can the server overwrite existing dashboards?
No. By design, dashboard creation uses automatic protection labels and prevents accidental overwrites. The `copy_dashboard` tool includes optional overwrite capabilities.
Basic information
Category
Developer Tools
Transports
stdio
Author
christian-schlichtherle
Submitted by
Christian Schlichtherle
More Developer Tools MCP servers
Altronis
sypherinMCP server + CLI for Altronis — Singapore AI consulting. Ask the Lyra consultant, generate a grant-matched AI transformation plan, pull curated SG AI events/news. Read-only, wraps altronis.sg.
AptiBuild AI — Career Intelligence
ParklandBuildsAptiBuild AI — Career Intelligence MCP Server Structured career decision scaffolding for AI agents. Provides personality-conditioned business idea generation, official BLS OEWS wage data, FRED labor market signals, and
ZeroBeacon — 1000-Tool Collision-Proof Commerce Router
DavidFox998ZeroBeacon.ai — Collision-proof commerce router for AI agents. 1000 MCP tools: commerce, trust, billing, sovereign ID + everyday tools. LIVE.
CodeSentinel
icohangar-opsCodebase health as MCP tools: dead code, circular dependencies, coupling, architectural drift.

discoverGPT
Joe MonastierodiscoverGPT is visualAI's unified MCP gateway for AI commerce, exposing 29 tools across four capabilities on one canonical product catalog: trimodal search (natural-language, precise-color, and image-similarity), AI cata
Comments