Purpose: mcp-grafana is a Model Context Protocol (MCP) server for Grafana, providing AI clients with the ability to access Grafana instances and their surrounding ecosystem, and can be used to search dashboards, investigate incidents, and query data sources.
Main capabilities: For dashboards, it supports searching by title, folder UID, tags, or stars, retrieving details by UID, listing saved versions, getting summaries, extracting specific attributes with JSONPath, as well as updating, creating, and partially patching dashboards; it also provides panel queries and data source information reading. For data sources, it supports listing and retrieving data source information, covering types such as Prometheus, Loki, ClickHouse, CloudWatch, Elasticsearch, OpenSearch, Snowflake, Athena, and more, and provides query tools such as PromQL, LogQL, InfluxQL/Flux, SQL, CloudWatch, Google Cloud Logging, Graphite, Elasticsearch/OpenSearch, Quickwit, and others. In addition, it includes Grafana Incident incident management, alert rule and notification route management, Grafana OnCall scheduling and on-call querying, team and user management capabilities, as well as Grafana Cloud-exclusive Agent Observability tools.
Usage: Requires uv. Add the corresponding configuration in the MCP client configuration; for Grafana Cloud, replace GRAFANA_URL with the instance URL (e.g., https://myinstance.grafana.net)。安装方式还包括 Docker, binary, and Helm. Some tools are disabled by default and need to be enabled via the --enabled-tools parameter, for example runpanelquery, examples, influxdb, sql, cloudwatch, cloudlogging, graphite, elasticsearch, quickwit, agento11y, assistant, admin.
Use cases: Directly retrieving dashboards, executing metric and log queries, troubleshooting alerts and incidents, viewing on-call information, and other operations and observability work in AI assistants.
Limitations: Grafana 9.0 or higher is required for full functionality; in earlier versions, some data source operations may not work properly due to missing API endpoints. Large dashboards consume a large amount of context window, and the official recommendation is to prioritize summaries and JSONPath attribute extraction. Google Cloud Logging requires plugin version 1.8.0 or higher and Grafana 11.2+. Agent Observability is only available in Grafana Cloud, and some write operations require the grafana-agento11y-app.eval:write permission. Assistant tools require the grafana-assistant-app plugin to be installed, and are write tools, so they will be skipped when --disable-write is used.