MCP Directory

Grafana MCP Server

Official

Grafana's official server for dashboards, Prometheus/Loki queries, alerts, and incidents.

Verified
stdio (local)
API key
Go

Add to your client

Copy the config for your MCP client and paste it into its config file.

Install / run
docker run --rm -i -e GRAFANA_URL -e GRAFANA_SERVICE_ACCOUNT_TOKEN grafana/mcp-grafana -t stdio

Paste into ~/Library/Application Support/Claude/claude_desktop_config.json

{
  "mcpServers": {
    "grafana-mcp-server": {
      "command": "docker",
      "args": [
        "run",
        "--rm",
        "-i",
        "-e",
        "GRAFANA_URL",
        "-e",
        "GRAFANA_SERVICE_ACCOUNT_TOKEN",
        "grafana/mcp-grafana",
        "-t",
        "stdio"
      ],
      "env": {
        "GRAFANA_URL": "https://your-grafana-instance.example.com",
        "GRAFANA_SERVICE_ACCOUNT_TOKEN": "<your-grafana-service-account-token>"
      }
    }
  }
}

Requires Docker to be installed and running.

Step-by-step guides: Add to Claude Desktop · Add to Cursor · Add to Windsurf

Before you start

  • A Grafana instance, version 9.0+ recommended for full datasource functionality
  • A Grafana service account token with RBAC permissions for the resources you want to access (create one under Administration > Service accounts)
  • Set GRAFANA_URL and GRAFANA_SERVICE_ACCOUNT_TOKEN environment variables
  • To install/build: the Go toolchain, or use the prebuilt binary, Docker image grafana/mcp-grafana, uvx, or the Helm chart

About Grafana MCP Server

Grafana MCP Server (mcp-grafana) is the official server from Grafana Labs that lets an AI assistant interact with a Grafana instance and its connected data sources. It can search and edit dashboards, run Prometheus and Loki queries, manage alert rules and notification policies, work with incidents and OnCall schedules, and drive Sift investigations.

It covers a broad surface: dashboard management (search, summary, JSONPath property extraction, update/patch), datasource discovery, and query execution across Prometheus, Loki, and Pyroscope by default — with many additional datasources (InfluxDB, ClickHouse, CloudWatch, Elasticsearch, Graphite, Athena, Snowflake, Quickwit) available behind feature flags. It also exposes annotations, deeplink generation, and panel image rendering.

The server is written in Go and authenticates with a Grafana service account token. It defaults to stdio transport but also supports SSE and streamable-http for remote deployments. A --disable-write read-only mode, RBAC integration, TLS/mTLS, and Prometheus/OpenTelemetry instrumentation make it suitable for production use. It is distributed as a binary, a Docker image (grafana/mcp-grafana), via uvx/go install, and a Helm chart. Licensed Apache-2.0.

Tools & capabilities (18)

search_dashboards

Find dashboards by name/metadata.

get_dashboard_summary

Get a compact dashboard overview without the full JSON.

update_dashboard

Create or modify a dashboard.

list_datasources

List configured Grafana data sources.

query_prometheus

Run instant or range PromQL queries against a Prometheus datasource.

list_prometheus_metric_names

List available Prometheus metric names.

query_loki_logs

Run LogQL queries against a Loki datasource.

list_loki_label_names

List Loki label names for log exploration.

alerting_manage_rules

Create, update, or delete Grafana alert rules.

alerting_manage_routing

Manage notification policies, contact points, and mute timings.

list_incidents

List Grafana Incident records.

create_incident

Create a new incident.

get_current_oncall_users

Get the users currently on call from Grafana OnCall.

list_sift_investigations

List Sift investigations for automated root-cause analysis.

find_slow_requests

Detect slow requests via Tempo using Sift.

query_pyroscope

Query Pyroscope continuous profiling data.

generate_deeplink

Generate an accurate URL to a Grafana dashboard or panel.

get_panel_image

Render a dashboard panel as a PNG image.

When to use it

  • Use it when you want to ask an assistant to run a PromQL or LogQL query and summarize the results during an investigation.
  • Use it when you need to find, summarize, or edit Grafana dashboards without manually clicking through the UI.
  • Use it when you're triaging an incident and want to pull OnCall schedules, current on-call users, and recent alert groups.
  • Use it when you want to create or update alert rules and notification routing through natural language.
  • Use it when you want Sift-powered root-cause help (error-pattern logs in Loki, slow requests via Tempo) on a live incident.
  • Use it when you want a read-only assistant: run it with --disable-write so it can query but not mutate anything.

Quick setup

  1. 1Create a service account in Grafana and generate a token with the RBAC scopes you need.
  2. 2Set GRAFANA_URL and GRAFANA_SERVICE_ACCOUNT_TOKEN in the server's environment.
  3. 3Install the server: run the binary, `uvx mcp-grafana`, the grafana/mcp-grafana Docker image, or the Helm chart.
  4. 4Register it in your MCP client (stdio by default; use SSE or streamable-http for remote setups).
  5. 5Optionally add --disable-write for read-only mode, then enable extra datasource/admin tool categories via flags as needed.
  6. 6Restart your client and verify by asking the agent to run search_dashboards or list_datasources.

Security notes

The service account token scopes what the agent can read or change in Grafana, so grant it only the roles needed (for example Viewer for read-only dashboards). Alerting tools can modify notification routing if the token has admin permissions.

Grafana MCP Server FAQ

How do I authenticate?

Create a Grafana service account token and pass it via GRAFANA_SERVICE_ACCOUNT_TOKEN, along with GRAFANA_URL pointing at your instance. The token's RBAC permissions determine what the server can do.

Why don't I see ClickHouse / CloudWatch / admin tools?

Many datasource and admin tool categories are disabled by default and must be explicitly enabled. Turn on the relevant category to expose those tools.

Can I run it in read-only mode?

Yes. Start the server with --disable-write so it can query dashboards, metrics, and logs but cannot create or modify resources.

Does it work with both Grafana Cloud and self-hosted Grafana?

Yes. Point GRAFANA_URL at either a Grafana Cloud stack or a self-hosted instance (9.0+ recommended) and supply a service account token for that instance.

Can it run remotely instead of as a local subprocess?

Yes. Besides the default stdio transport, it supports SSE and streamable-http, and ships a Docker image and Helm chart for remote/hosted deployment.

Alternatives to Grafana MCP Server

Compare all alternatives →

GitHub's official server for repos, issues, PRs, and Actions — local Docker or hosted remote.

Featured
Verified
stdio (local)
API key
Go
7 tools
Updated 3 days agoRepo

Official AWS Labs server that lets agents call any AWS API via the AWS CLI surface.

Verified
stdio (local)
API key
Python
3 tools
Updated 5 days agoRepo

HashiCorp's official server for Terraform Registry providers, modules, and IaC workflows.

Verified
stdio (local)
No auth
Go
12 tools
Updated 6 days agoRepo