Sponsored byOutsenseAI that finds your next clients
SponsorGROUOutbound, LinkedIn content and leads for B2B teamsSponsorOutsenseAI that finds your next clientsAd+Your tool hereSeen by people installing AI tools@Weekly picksThe best new tools, one email a week

mcp-grafana

MCP server by dockndevai Community

Lets AI assistants search and edit Grafana dashboards, query Prometheus, Loki and SQL datasources, and inspect alert rules. It starts read-only, and write or delete tools are added only when the mode is raised. It is for teams that run Grafana and want an agent to work with it.

  • Score 78
  • 1 stars
  • 346 a week
  • MIT
  • Updated

Install mcp-grafana

Built from the published package, never by AI.

claude mcp add mcp-grafana -e GRAFANA_TOKEN=YOUR_GRAFANA_TOKEN -- npx -y @dockndevai/mcp-grafana

Run in your terminal. Add --scope user to use it in every project.

Step-by-step: install mcp-grafana in Claude Code

MCP servers run with your permissions and can read what you give them access to. Some need an API key: check the README and add it under env in the mcp-grafana block.

About

mcp-grafana is a Model Context Protocol server for Grafana. It lets an assistant search dashboards and folders, read dashboard JSON models, list and query datasources (PromQL, LogQL and SQL), inspect alert rules and annotations, and, in higher modes, create or update dashboards and folders, write annotations, and delete items. It connects to a Grafana instance using a service account token.

The server starts in read-only mode by default. Tools that change data are registered only when GRAFANA_MODE is set to read-write or admin, and deletes also need GRAFANA_ALLOW_DELETE. Folder and datasource allowlists, a dry-run option, an audit log and secret redaction are also described. The project is for Grafana users who want an AI agent to explore and operate their dashboards with controlled access.

Written from the project's README and checked against it.

Tools it gives your assistant

  • get_healthChecks that the Grafana instance is up and returns its version.
  • searchFinds dashboards and folders by name or tag so their UIDs can be used.
  • get_dashboardReturns the full dashboard JSON model and metadata.
  • list_datasourcesLists datasources with secrets redacted.
  • query_datasourceRuns PromQL, LogQL or SQL queries through the unified query API.
  • list_alert_rulesLists Grafana-managed alert rules.
  • list_annotationsLists events that are overlaid on graphs.
  • create_or_update_dashboardCreates or updates a dashboard, versioned and reversible. Needs read-write mode.
  • create_annotationAdds an annotation, such as a deploy or incident marker. Needs read-write mode.
  • delete_dashboardDeletes a dashboard. Needs admin mode and GRAFANA_ALLOW_DELETE.

What you need

  • A running Grafana instance
  • A Grafana service account token
  • Node.js (the server is run with npx)
SettingNeededWhat it is
GRAFANA_TOKENEnvironment variable, secretRequiredGrafana service-account token (Bearer). Use a Viewer-role account for read-only use.
GRAFANA_URLEnvironment variableOptionalBase URL of the Grafana instance (e.g. http://localhost:3000).
GRAFANA_MODEEnvironment variableOptionalAccess mode: read-only | read-write | admin. Starts read-only; writes need read-write.

From the publisher's entry in the official MCP Registry. Required settings are already in the install config below as placeholders.

Try asking

  • Search my Grafana dashboards for anything tagged with kubernetes
  • Query the Prometheus datasource for the error rate over the last hour
  • List the Grafana alert rules and tell me which ones are firing

Good to know

  • Starts in read-only mode; write tools need read-write mode.
  • Delete tools need admin mode and GRAFANA_ALLOW_DELETE.
  • Deletes are irreversible.
  • Datasource secrets, passwords and tokens are stripped from responses.

Security check

A

No download-and-run commands, hidden instructions or signs of sending keys out were found.

Checked automatically: README.md, package.json. This looks for known risky patterns and is not a full audit. How grades work

Alternatives to mcp-grafana

All alternatives →
Supabase supabase
97

Connects Supabase projects to AI assistants such as Cursor, Claude and Windsurf over the Model Context Protocol. It lets assistants manage tables, fetch config and query data in a Supabase project.

AAA Local and remote 172k/wk
ArcadeDB MCP Server ArcadeData
94

ArcadeDB MCP Server is the built-in Model Context Protocol server of the ArcadeDB multi-model database. It lets AI assistants and LLMs work with ArcadeDB's graph, document, time-series, vector and other data models. It suits people who already run ArcadeDB and want assistant access to it.

AAA Local 1.3k
DBHubbytebase
94

Connects MCP clients such as Claude Desktop, Cursor and VS Code to PostgreSQL, MySQL, MariaDB, SQL Server, Oracle, ClickHouse and SQLite. It exposes two tools by default, with read-only mode and query timeouts available as guardrails.

AAA Local 343k/wk
MCP Toolbox for Databasesgoogleapis
94

MCP Toolbox for Databases is an open source MCP server that connects AI agents, IDEs and applications to enterprise databases. It provides prebuilt tools for exploring schemas and running queries, plus a framework for custom tools. It is aimed at developers building agents that need database access.

AAA Local 17k
MCP Toolbox for Databasesgoogleapis
94

Connects AI agents, IDEs and applications to enterprise databases through the Model Context Protocol. Offers prebuilt database tools for MCP clients and a framework for building custom tools for production agents.

AAA Local 17k
mongodb-mcp-servermongodb-js
94

MongoDB MCP Server lets AI assistants interact with MongoDB databases and MongoDB Atlas. It is an official server from mongodb-js, run locally with npx or Docker. It works with self-managed deployments and Atlas clusters.

AAA Local 203k/wk

Compare with Supabase, ArcadeDB MCP Server or DBHub

mcp-grafana: common questions

Can the Grafana MCP server change my dashboards?

By default it is read-only. Dashboard and folder edits need read-write mode, and deletes need admin mode plus GRAFANA_ALLOW_DELETE.

Which query languages can it run against datasources?

The source says query_datasource runs PromQL, LogQL and SQL through the unified query API.

Does it expose my datasource passwords or tokens?

No. The source says datasource secureJsonData, passwords and tokens are stripped from every response.

How do I install mcp-grafana?

In Claude Code run claude mcp add mcp-grafana -e GRAFANA_TOKEN=YOUR_GRAFANA_TOKEN -- npx -y @dockndevai/mcp-grafana. For Claude Desktop, Cursor and VS Code, paste the config shown above and restart. See the install guides.

Is mcp-grafana the official server?

mcp-grafana is a community project by dockndevai, not verified by a company domain.

Is mcp-grafana free?

The code is published under the MIT licence. The service it connects to may have its own pricing.

Is mcp-grafana safe to use?

It scores 78 of 100. Grades: maintenance A, licence A, quality C. Security check: grade A, no risky patterns found in the files checked. Review the code before you install. How grades work.

What are alternatives to mcp-grafana?

Similar MCP servers: Supabase, ArcadeDB MCP Server, DBHub, MCP Toolbox for Databases.

Does mcp-grafana work with ChatGPT?

Not directly. It runs locally, and ChatGPT only connects to remote servers with a URL. Use it in Claude Code, Claude Desktop, Cursor, VS Code or Codex.

mcp-grafana Install

Add to stack

Loading.