This is documentation for the next version of Grafana documentation. For the latest stable release, go to the latest version.

Enterprise Open source

Grafana MCP server

This documentation helps you install and run the open source Grafana MCP server, connect MCP-compatible clients, and configure authentication, transports, and tools.

The Grafana MCP server is a Model Context Protocol (MCP) server that gives AI assistants and LLM clients access to your Grafana instance. You can query metrics and logs, search and manage dashboards, manage alert rules, work with Grafana Incident and Sift, and generate deeplinks to Grafana resources.

Choose the right Grafana MCP option

Grafana offers two MCP server options:

OptionBest forAuthentication
Open source Grafana MCP serverRunning and managing the MCP server yourself for Grafana Cloud or self-managed GrafanaService account token
Grafana Cloud MCP serverConnecting external AI agents to Grafana Cloud without installing a local serverOAuth 2.1 browser authorization, scoped to the signed-in Grafana user

Use this documentation for the open source server. For Grafana Cloud’s hosted MCP server, refer to Grafana Cloud MCP server.

Overview

Use the Grafana MCP server to let your preferred MCP-compatible client (for example, Claude Desktop, Cursor, or VS Code with Copilot) talk to Grafana. The server exposes tools for dashboards, datasources (Prometheus, Loki, and others), alerting, incidents, OnCall, and more. You configure which tools are enabled and how the server connects to Grafana (authentication and transport).

Quick start

This quick start requires uv. Add this to your MCP client configuration (for example Claude Desktop or Cursor):

JSON
{
  "mcpServers": {
    "grafana": {
      "command": "uvx",
      "args": ["mcp-grafana"],
      "env": {
        "GRAFANA_URL": "http://localhost:3000",
        "GRAFANA_SERVICE_ACCOUNT_TOKEN": "<your service account token>"
      }
    }
  }
}

When using this open source server with Grafana Cloud, set GRAFANA_URL to your instance URL (for example https://myinstance.grafana.net). Refer to Clients and Set up for next steps.

Grafana 9.0 or later is required for full functionality. Some features, particularly datasource-related operations, may not work correctly with earlier versions due to missing API endpoints.

Explore the docs

License

The project is licensed under the Apache License, Version 2.0.