Grafana MCP server
@grafana
About Grafana MCP server
MCP server for Grafana
Basic information
Config
Add this server to your MCP-compatible client using the configuration below.
{
"mcpServers": {
"grafana": {
"command": "uvx",
"args": [
"mcp-grafana"
],
"env": {
"GRAFANA_URL": "http://localhost:3000",
"GRAFANA_SERVICE_ACCOUNT_TOKEN": "<your service account token>"
}
}
}
}Tools
41Admin
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*
Overview
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.
More Developer Tools MCP servers
test
prysmaticlabsGo implementation of Ethereum proof of stake
Hello World MCP Server (Reference Extension)
anthropicsDesktop Extensions: One-click local MCP server installation in desktop apps
FastAPI-MCP
tadata-orgExpose your FastAPI endpoints as Model Context Protocol (MCP) tools, with Auth!
OpenSumi
opensumiA framework helps you quickly build AI Native IDE products. MCP Client, supports Model Context Protocol (MCP) tools via MCP server.
Stakpak Agent CLI
stakpakShip your code, on autopilot. An open source agent that lives on your machines 24/7 and keeps your apps running. 🦀
Comments