Search & edit Grafana dashboards, query datasources (PromQL/LogQL/SQL), inspect alerts.
Copy the AI prompt to install this server into Claude Code, Cursor, or another agent β or use 1-click editor setup below.
We haven't yet run this listing's install command through our automated sandbox check. This isn't a red flag β we're steadily working through the catalog.
π‘ Paste the JSON block into your client's configuration file under mcpServers, then restart the application.
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 |
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.
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.GRAFANA_DATASOURCE_ALLOWLIST β restrict which datasources query_datasource may hit.GRAFANA_DRY_RUN β validate and log writes without executing them.GRAFANA_AUDIT_LOG β a JSON audit line per guarded operation, on stderr (default on).secureJsonData, passwords and tokens are stripped from every response.See SECURITY.md.
Conventions for the dashboard JSON model, panel/target shapes, PromQL/LogQL/SQL query patterns, folder organisation and safe editing live in the bundled skill: .claude/skills/grafana-dashboards-and-queries/SKILL.md. Agents that load it can build and edit dashboards to a consistent standard without being re-taught each time.
MIT
No reviews yet β be the first to share how this listing worked for you.
Showcase your server listing on GitHub or your project documentation. Embed this dynamic SVG badge to highlight official listing status and live engagement.
[](https://allmcps.com/mcp/mcp-grafana)<a href="https://allmcps.com/mcp/mcp-grafana"><img src="https://allmcps.com/api/badge/mcp-grafana?style=directory" alt="MCP Grafana on AllMCPs" /></a>