MCP Directory

How to add Grafana MCP Server to Claude Desktop

Grafana's official server for dashboards, Prometheus/Loki queries, alerts, and incidents. Paste the config into ~/Library/Application Support/Claude/claude_desktop_config.json and restart Claude Desktop.

Last updated June 15, 2026 ยท 2.1kโ˜… ยท stdio ยท apikey ยท official

Claude Desktop config for Grafana MCP Server

docker run --rm -i -e GRAFANA_URL -e GRAFANA_SERVICE_ACCOUNT_TOKEN grafana/mcp-grafana -t stdio
{
  "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.

Setup steps

  1. 1Open Claude Desktop โ†’ Settings โ†’ Developer โ†’ Edit Config (this opens ~/Library/Application Support/Claude/claude_desktop_config.json).
  2. 2Paste the Grafana MCP Server config below under the top-level "mcpServers" key.
  3. 3Fill in any placeholder secrets (API keys, paths) in the snippet.
  4. 4Save the file, then fully quit and reopen Claude Desktop.
  5. 5Open a chat and confirm Grafana MCP Server's tools appear under the ๐Ÿ”Œ tools menu.

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

What Grafana MCP Server can do in Claude Desktop

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.

Security

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 + Claude Desktop FAQ

Where is the Claude Desktop config file?

Claude Desktop reads MCP servers from ~/Library/Application Support/Claude/claude_desktop_config.json. Paste the Grafana MCP Server config there under the "mcpServers" key and restart the client.

Is Grafana MCP Server safe to use with Claude Desktop?

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.

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.

View repo Full Grafana MCP Server page