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
Smithery CLI
smithery-aiInstall, manage and develop MCP servers and skills for agents
nuxt-mcp / vite-plugin-mcp
antfuMCP server helping models to understand your Vite/Nuxt app better.
DevDocs by CyberAGI 🚀
cyberagiincCompletely free, private, UI based Tech Documentation MCP server. Designed for coders and software developers in mind. Easily integrate into Cursor, Windsurf, Cline, Roo Code, Claude Desktop App
MCP-Bridge
SecretiveShellA middleware to provide an openAI compatible endpoint that can call MCP tools
Comments