mcp-grafana
v0.4.1Search & edit Grafana dashboards, query datasources (PromQL/LogQL/SQL), inspect alerts.
Values you need
| Variable | What it is | |
|---|---|---|
GRAFANA_URL | optional | Base URL of the Grafana instance (e.g. http://localhost:3000). |
GRAFANA_TOKEN | required secret | Grafana service-account token (Bearer). Use a Viewer-role account for read-only use. |
GRAFANA_MODE | optional | Access mode: read-only | read-write | admin. Starts read-only; writes need read-write. |
npm (npx) discovery passed
Requires Node.js 18+
Run in a terminal
claude mcp add mcp-grafana -e 'GRAFANA_TOKEN=<GRAFANA_TOKEN>' -- npx -y @dockndevai/mcp-grafana@0.4.1Add to
claude_desktop_config.json{
"mcpServers": {
"mcp-grafana": {
"args": [
"-y",
"@dockndevai/mcp-grafana@0.4.1"
],
"command": "npx",
"env": {
"GRAFANA_TOKEN": "<GRAFANA_TOKEN>"
}
}
}
}Add to
~/.cursor/mcp.json{
"mcpServers": {
"mcp-grafana": {
"args": [
"-y",
"@dockndevai/mcp-grafana@0.4.1"
],
"command": "npx",
"env": {
"GRAFANA_TOKEN": "<GRAFANA_TOKEN>"
}
}
}
}Add to
.vscode/mcp.json{
"inputs": [
{
"description": "GRAFANA_TOKEN",
"id": "grafana-token",
"password": true,
"type": "promptString"
}
],
"servers": {
"mcp-grafana": {
"args": [
"-y",
"@dockndevai/mcp-grafana@0.4.1"
],
"command": "npx",
"env": {
"GRAFANA_TOKEN": "${input:grafana-token}"
},
"type": "stdio"
}
}
}Add to
~/.codex/config.toml[mcp_servers.mcp-grafana]
command = "npx"
args = ["-y", "@dockndevai/mcp-grafana@0.4.1"]
env = { "GRAFANA_TOKEN" = "<GRAFANA_TOKEN>" }For AI agents
- Ask the user for: GRAFANA_TOKEN. Never invent or guess these values; secrets go into the client config, not into chat logs.
- Pick the user's MCP client and apply the matching config from the first install method (it is the one verified by the smoke test when available).
- Restart or reload the client so it starts the server.
- Verify: the server should expose these tools: get_health, search, list_dashboards, get_dashboard, list_folders, get_folder, list_datasources, get_datasource, ….
- If it fails, check that the required runtime is installed (Node.js 18+) and that the values above are set.
Machine-readable: install.md · manifest.json