MCP.so
登录

Grafana MCP server

@grafana

关于 Grafana MCP server

MCP server for Grafana

基本信息

分类

开发工具

许可证

Apache-2.0

运行时

go

传输方式

stdio

发布者

grafana

配置

使用下面的配置,将此服务器添加到你的 MCP 客户端。

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

工具

41

Admin

Admin

Admin

Admin

Admin

Admin

Admin

Admin

Admin

Search

Dashboard

Dashboard

Dashboard

RunPanelQuery*

Dashboard

Dashboard

Datasources

Datasources

Examples*

Prometheus

Prometheus

Prometheus

Prometheus

Prometheus

Prometheus

Incident

Incident

Incident

Incident

Loki

Loki

Loki

Loki

Loki

Loki

Config

InfluxDB

ClickHouse*

ClickHouse*

ClickHouse*

CloudWatch*

概览

What is Grafana MCP server?

A Model Context Protocol (MCP) server that provides AI agents with programmatic access to your Grafana instance and its surrounding ecosystem. It allows querying dashboards, datasources, alerting, incidents, and more.

How to use Grafana MCP server?

Install via uv and add the server to your MCP client configuration (e.g., Claude Desktop, Cursor) with the GRAFANA_URL and GRAFANA_SERVICE_ACCOUNT_TOKEN environment variables. Alternative installation methods include Docker, binary, and Helm.

Key features of Grafana MCP server

  • Search, get, update, and patch dashboards
  • Query Prometheus, Loki, ClickHouse, and other datasources
  • Manage alert rules, notification policies, and contact points
  • Create and update Grafana incidents
  • View and manage Grafana OnCall schedules and alert groups
  • List teams, users, and roles (admin tools, disabled by default)

Use cases of Grafana MCP server

  • An AI assistant retrieves dashboard summaries and panel queries to answer monitoring questions
  • Automatically create or update alert rules based on incident analysis
  • Query Loki logs for error patterns and slow requests using Sift
  • Review on-call schedules and current responders during an incident
  • Execute PromQL or LogQL queries to gather metrics without manual dashboards

FAQ from Grafana MCP server

What Grafana version is required?

Grafana version 9.0 or later is required for full functionality. Earlier versions may not support datasource-related operations.

Why are some tools disabled by default?

Tools like Run Panel Query, Query Examples, and datasource-specific query tools (e.g., ClickHouse, Snowflake) are disabled by default. Enable them by adding the appropriate flag (e.g., --enabled-tools runpanelquery,examples,clickhouse) to the server configuration.

How can I reduce context window usage when working with dashboards?

Use get_dashboard_summary for an overview, get_dashboard_property with JSONPath to extract only needed fields, and avoid get_dashboard_by_uid unless you require the full dashboard JSON.

What authentication is required?

Provide a Grafana URL and a Grafana service account token via the GRAFANA_URL and GRAFANA_SERVICE_ACCOUNT_TOKEN environment variables. For Grafana Cloud, use the cloud instance URL.

Does the server support all Grafana datasources?

The server explicitly supports Prometheus, Loki, ClickHouse, CloudWatch, Elasticsearch/OpenSearch, Graphite, Athena, Snowflake, Quickwit, and InfluxDB. Other datasources are not covered.

评论

开发工具 分类下的更多 MCP 服务器