Search & edit Grafana dashboards, query datasources (PromQL/LogQL/SQL), inspect alerts.
MCPpedia last refreshed this data
io.github.dockndevai/mcp-grafana is an MCP server that search & edit Grafana dashboards, query datasources (PromQL/LogQL/SQL), inspect alerts. Its tool list has not been published yet over stdio and http, requires no API key, and scores 61/100 on MCPpedia's security, maintenance and efficiency rubric.
Config is the same across clients - only the file and path differ.
{
"mcpServers": {
"grafana": {
"env": {
"GRAFANA_URL": "http://localhost:3000",
"GRAFANA_MODE": "read-only",
"GRAFANA_TOKEN": "glsa_..."
},
"args": [
"-y",
"@dockndevai/mcp-grafana"
],
"command": "npx"
}
}
}Are you the author?
Add this badge to your README to show your security score and help users find safe servers.
Search & edit Grafana dashboards, query datasources (PromQL/LogQL/SQL), inspect alerts.
Run this in your terminal to verify the server starts. Then let us know if it worked - your result helps other developers.
npx -y '@dockndevai/mcp-grafana' 2>&1 | head -1 && echo "✓ Server started successfully"
After testing, let us know if it worked:
Five weighted categories - click any category to see the underlying evidence.
No known CVEs.
Checked @dockndevai/mcp-grafana against OSV.dev.
Be the first to review
Have you used this server?
Share your experience - it helps other developers decide.
Sign in to write a review.
Others in analytics
Ask your agent about your own Apple Health data: 194 metrics, 21 tools, local, 0 deps.
MCP server for Dynatrace Managed to access logs, events, and metrics.
Official PostHog MCP Server for product analytics, feature flags, experiments, and more.
Read and manage Churnkey cancel flows, retention metrics, and payment recovery
MCP Security Weekly
Get CVE alerts and security updates for io.github.dockndevai/mcp-grafana and similar servers.
Start a conversation
Ask a question, share a tip, or report an issue.
Sign in to join the discussion.
A safe-by-default Model Context Protocol server for Grafana. It lets an agent explore and operate Grafana — search dashboards, read the dashboard JSON model, list and query datasources (Prometheus / Loki / SQL), inspect alert rules and annotations, and (in higher modes) create/update dashboards and folders, write annotations, and delete.
Part of the dockndevai MCP server suite — one governance model across all of them.

The server starts read-only (see Safe by default); higher-capability tools are only registered when you raise the mode.
| Tool | For | Needs mode |
|---|---|---|
get_health | check the instance is up, version | read-only |
search | find dashboards & folders by name/tag (get UIDs) | read-only |
list_dashboards / list_folders | enumerate dashboards / folders | read-only |
get_dashboard | the full dashboard JSON model + meta | read-only |
list_datasources / get_datasource | datasources (secrets redacted) | read-only |
query_datasource | run PromQL / LogQL / SQL via the unified query API | read-only |
list_alert_rules | Grafana-managed alert rules | read-only |
list_annotations | events overlaid on graphs | read-only |
create_or_update_dashboard | upsert a dashboard (versioned, reversible) | read-write |
create_folder | create a folder | read-write |
create_annotation | mark a deploy/incident on graphs | read-write |
delete_dashboard / delete_folder / delete_annotation | delete (irreversible) | admin + GRAFANA_ALLOW_DELETE |
npx -y @dockndevai/mcp-grafana
You need a Grafana service account token (Administration → Service accounts → Add service account → Add token). Give it the least role that works — Viewer for read-only use, Editor to create/update, Admin only if you must delete.
{
"mcpServers": {
"grafana": {
"command": "npx",
"args": ["-y", "@dockndevai/mcp-grafana"],
"env": {
"GRAFANA_URL": "http://localhost:3000",
"GRAFANA_TOKEN": "glsa_...",
"GRAFANA_MODE": "read-only"
}
}
}
}
See docs/CLIENTS.md for Claude Code / Cursor / Codex / VS Code / Windsurf snippets, and .env.example for every supported variable.
The access model is enforced by src/security.ts — defence in depth on top of the service-account token's own role:
GRAFANA_MODE — read-only (default) → read-write → admin. A tool is registered only if the mode allows its capability. Read-only exposes the 11 read tools; edits need read-write; deletes need admin.GRAFANA_ALLOW_DELETE — deletes are irreversible, so on top of admin mode they also require this flag.GRAFANA_FOLDER_ALLOWLIST / GRAFANA_PROTECTED_FOLDERS — confine which folders can be written to; mark folders (e.g. production) that may be read but never modified or deleted. Matched by folder UID or title. Writes check the target folder and, when overwriting, the folder the dashboard currently sits in; create_annotation checks the folder of the dashboard it attaches to; deletes resolve the target's folder first. The General (root) folder is scoped like any other (name it General in the allowlist or protected list). A protected folder also protects its sub-folders, and `dele